Guest User

Untitled

a guest
Feb 20th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2. ;;;;;;;;;;;;;; Super simple button sanity test ;;;;;;;;;;;;;;
  3. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  4. .include "tn45def.inc"
  5. .cseg
  6. .org 0x00
  7.  
  8. .equ BTTN = 3
  9. .equ SERIN = 1
  10.  
  11. sbi DDRB,SERIN
  12. cbi DDRB,BTTN
  13.  
  14. sbi PORTB,SERIN
  15.  
  16. Main:
  17. sbic PINB,BTTN ; Jump to main if button is not pushed
  18. rjmp Main
  19. cbi PORTB,SERIN ; Turn on LED
  20. sbis PINB,BTTN ; Turn off LED if button is not pushed
  21. sbi PORTB,SERIN
  22. rjmp Main ; Go to beginning of loop
  23. .exit
  24. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Add Comment
Please, Sign In to add comment