|
Basic concepts on PWM peripheral |
||
Adjustable rectangular waveform generator
The Microchip PWM is attached to the TMR2 peripheral.
Discussion on the PIC PWM module architecture. The PWM module will be conceived as an adaptation of the PWM-TMR2 Microchip PIC18F diagram copied in Fig. 1. from the datasheet or from this technical brief reference: Barbulescu, G., Bujor, I., "TB3270: Getting Started with PWM Using CCP on PIC18", Microchip.
|
|
|
Fig. 1. The initial idea on generating PWM waveforms from the datasheet: the PWM module is associated with TMR2. The output wave is generated setting and resetting a simple RS latch cell. TMR2 comparator will drive S, establishing the waveform period (WP) determined by the value stored in PR2. Another comparator, by means of the duty cycle register will drive R configuring the pulse width (PW). |
|
|
|
Fig 2. Waveform parameters as depicted in the datasheet. |
Visit the capstone dimmer project at DEE.