You are on page 1of 11

VII Department of Electronics and

Telecommunications

AVR microcontroller
T based
Real World Interfacing and
programming - III
(Unit VI)
Instructor
Dr. Yogesh H. Dandawate , Prof. Pravin G.Gawande and Prof.Rahul
S.Pol
Department of Electronics and Telecommunications (C005)
Vishwakarma Institute of Information Technology,Pune
Email : yogesh.dandawate@viit.ac.in

Unit VI-AVR Microcontroller based Interfacing 1


Unit VI :
AVR microcontroller based VII Department of Electronics
and Telecommunications

Real World Interfacing and programming - III


T
• Interfacing peripheral devices: Servo motor interfacing, Input
capture and Wave Generator, PWM programming and DC motor
control, SPI protocol and LCD Display interfacing, I2C Protocol with
RTC interfacing, temperature sensor LM35 interfacing.
• Implement simple multichannel data acquisition system using
AVR/8051

Unit VI-AVR Microcontroller based Interfacing 2


Speed Control of VII Department of Electronics
and Telecommunications
DC Motor
• Methods of DC motor speed control
T
• What is chopper / H Bridge speed control.
• PWM based speed control.
• Interface DC motor with AVR microcontroller.

Unit VI-AVR Microcontroller based Interfacing 3


Unidirectional Control VII Department of Electronics
and Telecommunications

T Source : AVR
Microcontroller
by M.Mazidi

Unit VI-AVR Microcontroller based Interfacing 4


H Bridge Operation VII Department of Electronics
and Telecommunications

• Bidirectional Control
T
• Switches can be
• Power BJT
• Power MOSFETS
• Power IGBT

Electrosome.com

Unit VI-AVR Microcontroller based Interfacing 5


Bidirectional Control VII Department of Electronics
and Telecommunications

T Source : AVR
Microcontroller
by M.Mazidi

Unit VI-AVR Microcontroller based Interfacing 6


Pulse Width ModulationVII Department of Electronics
and Telecommunications
(PWM) Control
• The Concept
T Source : AVR
Microcontroller
by M.Mazidi

• H.W. Timer Counter Control Register (TCCR 0)

Unit VI-AVR Microcontroller based Interfacing 7


Fast PWM VII Department of Electronics
and Telecommunications

T Source : AVR Microcontroller


by M.Mazidi

Fast PWM
Mode

F generated =Fosc / 256*N

N= Prescalar

Unit VI-AVR Microcontroller based Interfacing 8


Phase Correct PWM VII Department of Electronics
and Telecommunications
Mode
T

Unit VI-AVR Microcontroller based Interfacing 9


Program for generating VII Department of Electronics
and Telecommunications
PWM
• #include 'avr/io.h''
T
int main()
{
DDRB = 0b11111111
OCRO = 191;
TCCRO =Ox61; //Phase c. PWM, no prescaler, non-inverted
while (1);
return 0;
}
Unit VI-AVR Microcontroller based Interfacing 10
Home Work VII Department of Electronics
and Telecommunications

T
• Write Programs to rotate the motor clockwise and anticlockwise.
• Ref. M.Mazidi AVR microcontroller –Chapter 16

Unit VI-AVR Microcontroller based Interfacing 11

You might also like