Reference no: EM133118079
Question: Write an Assembly program for the ATMega32 that does the following:
1. Display a running light sequence of 8 values on 8 LEDs connected to Port B
2. When the sequence ends, restart and continue forever.
The following restrictions apply...
1. The light sequence (8 values) must be stored in a table in CSEG
2. Only one of the 8 LEDs may be on at any time
3. The LEDs are connected in an active low manner - accommodate for this
4. Use Timer 1 to implement a visualisation delay as follows...
a. Timer 1 mode: Normal
b. Timer 1 clock source: Prescaled system clock (Use prescalar of 8 with assumption system clock is 16MHz)
c. Use polling of the Timer 1 Overflow Flag to implement a 3 second delay
d. The polling routine must be a callable subprogram
e. The subprogram is called as needed from the main loop
5. Explicitly Set or Clear bits in the appropriate I/O registers. Assume that all bit values are initially wrong.
6. Structure your program very clearly and logically into blocks of code.
7. Comment every code block - indicating the purpose of the code