Posted:
February 1, 2000
Due:
Monday, February 14, 2000, by 16:00 in the ENSC departmental office
The push button functions should be, in order of highest to lowest priority:
Flash the cursor at all times so you know where it is located on the LCD.
To move from one row to the next, make sure the move left and right functions have the ability to wraparound to the next row of the LCD. If the cursor moves off the left side of the top row, it should reappear at the right side of the bottom row, and vice versa. Same for at the end of the bottom row, it should rotate back up to the left side of the top row. HINT: Recall the size of the LCD that you see, and the actual size of the LCD that the HC12 sees. What are you going to do?
Recall that there is only one /IRQ pin, and one IRQ service, so your interrupt routine must be able to decode which button has been pushed. Recall that the buttons are connected to PortA.
Each time you draw a character, start at "A". So, every time you move to a new cursor position, you start scrolling through the characters at "A".
OPTIONAL: There is a lot of "bounce" on the switches of the Altera board. Make sure that your program is not sensitive to this phenomenon. This problem can be solved by writing a creative algorithm on the HC12 using pauses.
Marks awarded for efficency of coding and algorithm. Make sure to provide comments in the code.