Sei sulla pagina 1di 2

AVR Microcontroller ATMEGA32 and interfacing

Assignment 2:
1. With interfacing diagram explain seven segment interfacing with ATMEGA32 and write a
program to display 0 to 9 with appropriate delay between the display of the subsequent digits.
2. Write an assembly as well as C program to transfer the message ELECTION serially at
2400 buad, 8-bit data, 1 stop bit. Perform this program for 25 times.
3. Explain with necessary sketch, interfacing the LCD with ATMEGA32 and write a C program
to Display WELCOME in the first line and in centre of the 16X2 line display.
4. Explain interfacing of RTC with ATMEGA32 microcontroller. Write program to get values
of hour, minute and second from RTC to RAM locations 60h, 61h and 62h respectively.
5. Write a program to interface a unipolar stepper motor, by 64 in clockwise direction.
Assume the motor has a step angle of 2. Use the 4 step sequence.
6. Write a program for speed control of DC motor using PWM.
7. Explain ATMega32 interfacing with ADC 0804 in self clocking mode.
8. Interface LCD with ATMega32 microcontroller. Connect data lines with port P0,
control lines with any three port pins of port P1. Write program to display message
Microcontroller on the first line and Interfacing on the second line.
9. Consider that common anode seven segment display is connected with port P0 and switch
is interfaced at port pin P1.0 of ATMega32 microcontroller. Draw interfacing diagram.
Write assembly language program to monitor the switch. If switch is pressed, display 0 on
common anode display and if switch is not pressed display 1 on common anode display.
10. Explain interfacing of DC motor with ATMega32 using IC L293D. Write program to rotate
motor in clockwise as well as anticlockwise direction.
11. Explain interfacing of RTC with ATMega32 microcontroller. Write program to get values
of hour, minute and second from RTC to RAM locations 80h, 81h and 82h respectively.
12. Draw circuit diagram to interface stepper motor with ATMega32. Write program to
rotate motor in clockwise direction using half step mode.
13. Explain with interfacing diagram, 7 segment interfacing with ATMega32 and write a
program to display data accordingly.
14. Explain with necessary sketch, interfacing the LCD with ATMega32 and write a program
to Display GTU in the second line and in centre of the 16X2 line display.

15. Two switches (SW0 and SW1) are connected to pin P2.0 and P2.1 respectively.
Write an assembly language program to monitor the status of SW and perform the following
with diagram of interfacing. (1) If SW0 is pressed, the stepper motor moves clockwise (2) If
SW1 is pressed, the stepper motor moves anticlockwise. (3) If both switches are pressed
simultaneously, motor stops.
16. Assume that input at port P1 is data for temperature. Two LEDs are connected at P0.0 (RED)
and P0.1 (GREEN) with their anodes pulled up through 820
resistor and cathodes are
connected with pins. LEDs Write a program to acquire temperature data and indicate the status
on LED as below. Note: It is require continuously monitoring the temperature and indicating
status on LEDs.

If TEMP 10 RED LED ON and GREEN LED OFF

If 10 < TEMP 80 RED LED OFF and GREEN LED ON

IF TEMP > 80 RED LED ON and GREEN LED OFF