Advertisement
Guest User

MCLU 1. Test 2017

a guest
Mar 24th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. MCLU 1. Test 2017
  2.  
  3. 1. porta[3..0] = (buttonl[2..1]*6/4) + buttonl[7]*2
  4.  
  5. 2. Set j12 to GND, enable INT7 and show the number 47 on the LCD and PORTA.
  6. 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.:
  7.  
  8. in temp, PORTA
  9. push temp
  10. call show_num
  11.  
  12. ...->state0->state1->state2->state3->state0...
  13. State0->(button press)->State1 - increment porta
  14. state1->(button release)->state2 - increment porta
  15. state2->(button press)->state3 - increment porta and call show_num function
  16. state3->(button release)->state0 - increment porta and call show_num function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement