Professional Documents
Culture Documents
BIT, MESRA
18-04-2019 EE561:ECSPC 1
Presented by:
Table of Contents
Introduction to Atmega
Modes of Operation
Fast PWM Mode
16bit timer/counter control register
Example
18-04-2019 EE561:ECSPC 2
Introduction to ATmega
18-04-2019 EE561:ECSPC 3
Modes of Operations
18-04-2019 EE561:ECSPC 4
Fast PWM Mode
18-04-2019 EE561:ECSPC 5
Fast PWM Mode
18-04-2019 EE561:ECSPC 6
Fast PWM Mode
18-04-2019 EE561:ECSPC 7
Fast PWM Mode
18-04-2019 EE561:ECSPC 8
16bit timer/counter control register
TCCR1A:
TCCR1B:
TCCR1C:
18-04-2019 EE561:ECSPC 9
Example
2)Decide the WGM bits (for fast PWM mode where TOP=ICRn
WGMn3=1,WGMn2=1 ,WGMn1=1 )
4)Decide ICRn and and OcnX for 20KHz and 40% duty cycle
18-04-2019 EE561:ECSPC 11
Example
Program:
18-04-2019 EE561:ECSPC 12
Example
Output:
18-04-2019 EE561:ECSPC 13
Any Queries ……