I am working on an application requiring that I digitally control the duty cycle of a fixed frequency oscillator. I did some research on the 'net and found a couple circuits to support this system. I spent a lot time understanding the circuit and decided to document how it worked here.
Oscillator
The CD4541BC programmable timer has a 16 stage binary counter, an integrated oscillator that uses an external capacitor and two resistors. The timer is also programmable by setting the digital inputs to divide the oscillator frequency by to 2^8, 2^10, 2^13, 2^16. The CD4541BC ocscillator frequency can be set by an external RC network that's by the following formula freq = 1 / (2.3 * Rtc * Ctc) where Rs = ~ 2Rtc and Rs >= 10,000 ohms. (Although I've had reasonable results with going down to 1k.)
Obviously there is a lot of flexibility to control the frequency of the oscillator. For my application I just needed a fixed frequency which I set using switch S1. Users that want to control the frequency digitally you could control the frequency by putting TTL control lines on ports A and B.
4-Bit Counter
The next portion of the circuit involves a 74191 4-bit binary counter. The 74191 recieves a clock input and triggers each of the four outputs to produce a series of 4-bit words. The 74191 is called an up/down counter which means it is reversable and count up or down after each clock cycle. When the counter is counting up it produces these outputs on the rising edge of each clock cycle.
Notice that the counter rolls over from 1111 to 0000 at the end of the series. Wiring for the 74191 is really simple. Pin 14 recieves the clock input from the timer and pins 1, 4, 5, 8, 9, 10, 15 are tied to ground. "N.C." stands for not connected. Pin 16 is tied to Vcc.
Stay tuned for the next post...
owen