Homework #3

Due 23 February, 1996

Once again, recall the unfinished part of the PIC program


For each input i on port A
      Set timeBi to maxTime, if input i is pressed
For each input i
      Set bit i of valueLED, if timeBi != 0
Turn on bit valueLED of pattLED
Set port B to pattLED
Increment countLo
If countLo = 0,
      decrement the TimeBi


In Homework #2, you wrote PIC assembly code to do the first two "for each" statements. Now write PIC assembly code for the remaining statements.

Use the constants defined in the handout 3 program.


Back to the Handout index
Return to Dean Brock's home page
UNCA CSCI logo Return to the UNCA Computer Science home page