Documente Academic
Documente Profesional
Documente Cultură
SUMARY: In the following writing is presented or Pre-scaler 10 bits (allows to divide the
described how to work in a timer0 FAST PWM mode by frequency).
introducing timer0 and an example in the AVR and Two sources of interruption: overflow and
PROTEUS software where the brightness control of a led equality in comparison (TOV0 and OCF0).
is made and the speed of a motor applying FAST PWM
for this example. The registers that intervene for the configuration of timer
0 are:
KEY-WORDS: Converter, signals, PWM, timer0.
TCCR0: This record is in charge of setting the
1 INTRODUCTION timer.
1
FAST PWM MODE
.
2
FAST PWM MODE
.
LDI R24,255
Bucle_Interno:
NOP
NOP
NOP
NOP
NOP
DEC R24
BRNE Bucle_Interno
DEC R25
BRNE Bucle_Externo
RET Figure 9.- Duty Cycle greater than 50%
EXAMPLE PROTEUS
3 CONCLUSIONS
4 REFERENCES
Figure 6.- Simulated Circuit [1] Mikel Etxebarria Isuskiza, Microcontroladores PIC: Teoria y
Practica 2011, Creaciones copyright.
EXAMPLES AVR AND PROTEUS FUNCTIONING [2] Muhamad Ali MAzidi, Sarmad Naimi, and Sepher Naimi,
The AVR microcontroller and embedded system using
assembly and C, Pearson.
The operation of the circuit is that it will vary the pulse
width depending on the external interrupts INT0 to raise
the PWM and INT1 to lower the PWM.