UPC EETAC Bachelor's Degree in Telecommunications Systems and in Network Engineering EEL

 

 

Basic concepts on PWM peripheral

L12


Adjustable rectangular waveform generator

1. Architecture and configuration bits

The Microchip PWM is attached to the TMR2 peripheral.

  1. Firstly, study the TMR2.
  2. Search for the peripheral section in the microcontroller datasheet. 
  3. Analyse the peripheral's schematic or block diagram in Fig. 1. Determine how does it work and how the output waveform is modulated.
  4. Determine its design equation on how to use it in our applications.

 

Fig 1. Hardware components (a kind of RTL view) of the PWM of the Microchip PIC18F46K22.

 

 

Fig 2. Interpretation of the PWM architecture using CSD conventions. 

 

2. Example project: LED dimmer.

 Visit the capstone dimmer project at DEE.