Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 1 of 1

Thread: Teensy 4.0 - synchronizing PWMs and left/center/right-aligned configurations

  1. #1
    Junior Member
    Join Date
    Aug 2019
    Posts
    12

    Teensy 4.0 - synchronizing PWMs and left/center/right-aligned configurations

    Greetings All!

    Using the Teensy 4.0 with a PWM switching output of 25kHz for an AC-DC boost converter. I am using an external parallel interface ADC to simultaneously sample input voltage, input current, and output voltage at the same 25kHz rate.

    --> In terms of the Teensy 4.0, I'm using:

    1 analogWrite PWM to trigger the external ADC conversions (constant duty cycle, let's say 50%)
    1 PWM to switch the switching transistor (variable duty cycle - this is the output of the control law on the Teensy)

    I want:
    The switching transistor PWM to be center-aligned
    The ADC trigger PWM to be left-aligned
    Both PWMs to be synchronized to the same clock.

    Is this possible?

    Diagram here to illustrate what I'm looking for (external ADC "conversion start" is triggered by a positive edge).
    Click image for larger version. 

Name:	PWM_synch.jpg 
Views:	6 
Size:	77.8 KB 
ID:	20838
    Last edited by rt54321; 07-02-2020 at 03:44 PM. Reason: Added timing diagram

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •