Guest User

Untitled

a guest
Sep 24th, 2012
762
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $regfile = "attiny13.dat"
  2. $crystal = 9600000
  3. $hwstack = 16
  4. $swstack=8
  5. $framesize=24
  6.  
  7. Config Portb.2 = Input
  8. Config Portb.1 = Output
  9. Config Portb.0 = Output
  10. Dim W As Word
  11. Do
  12. Pulsein W , Pinb , 2 , 1
  13.  
  14. If W > 170 And W <= 200 Then
  15. Portb.0 = 1
  16. Else
  17. Portb.0 = 0
  18. End If
  19. If W <= 130 And W > 100 Then
  20. Portb.1 = 1
  21. Else
  22. Portb.1 = 0
  23. End If
  24. Loop
  25. End
Advertisement
Add Comment
Please, Sign In to add comment