Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MCLU 1. Test 2017
- 1. porta[3..0] = (buttonl[2..1]*6/4) + buttonl[7]*2
- 2. Set j12 to GND, enable INT7 and show the number 47 on the LCD and PORTA.
- show_num function is given, you should only call it. But before you call it, you should push the parameter for this function to stack, e.g.:
- in temp, PORTA
- push temp
- call show_num
- ...->state0->state1->state2->state3->state0...
- State0->(button press)->State1 - increment porta
- state1->(button release)->state2 - increment porta
- state2->(button press)->state3 - increment porta and call show_num function
- state3->(button release)->state0 - increment porta and call show_num function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement