First page Back Continue Last page Overview Graphics
Laboratory 4.1 : Arrays
Write a program that outputs the sequence shown below to the LEDs.
- The LEDs are connected to Port S (address $d6).
- The data direction register for port S (address $d7) will need to be programmed to make port S an output port.
The program should loop continuously, outputting the data to the LEDs. When the end of the data list is reached, the program should start over at the beginning of the list outputting the data.
Use a pointer to access the list. You may use a terminator (while style loop) at the end of the list or a counter to count to the end of the list (for style loop).
To debug, step through the program. If the program is run at speed, all the lights will appear to be on.