Setting a Constant Duty Cycle

Setting a Constant Duty Cycle

Pulse-based Control Technique

This technique will work with any GreenPAK.

Setting an immutable duty cycle requires one CNT/DLY block, an oscillator, and a DFF. The macrocells should be configured as shown in Figure 27.

Figure 26 CNT/DLY Config

Figure 27 Simple Duty Cycle Configuration

The oscillator determines the period, the DFF is a rising edge detector, and the CNT/DLY block determines the duty cycle. When the rising edge from the oscillator is registered by the DFF it will send a LO pulse to the CNT/DLY block. This will set the CNT/DLY output LO, and the output will only rise after the Delay Counter data has been met.

From the DFF’s initial configuration change the Q output polarity to Inverted (nQ) and connect the output of the DFF. This will allow it to operate as a rising edge detector; it will remain HI until a rising edge is detected on the clock, whereupon it will briefly drop LO. The FILTER/EDGE DET block can also be configured for this purpose.

The oscillator OUT0 or OUT1 is connected to the DFF’s clock input to generate the period. The period should always be greater than the duty cycle. In this example the period, set by ‘OUT1’ second divider by, is set to OSC/64.

The CNT/DLY block’s Counter data option sets the duty cycle. The delay time sets the duration of the low signal. The duty cycle is calculated as:

Figure 28 Simulation of Duty Cycle = 50%

< Previous: I2C Level Shifter   |   Table of Contents   |   Next: H-bridge Control >