Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- INCLUDE "modedefs.bas"
- INCLUDE "ALLDIGITAL.pbp"
- DEFINE OSC 4
- OSCCON = $60 ' Clock speed
- DEFINE DEBUG_REG PORTB
- DEFINe DEBUG_BIT 4
- define DEBUG_BAUD 9600
- define DEBUG_MODE 1
- '-----------Variables--------------------------------------------
- Btn VAR portb.0
- btnWrk VAR Byte
- Main:
- ' Try changing the delay value (200) in BUTTON to see the effect
- ' of its modes: 0 = no delay; 1 - 254 = varying delays before
- ' auto-repeat;
- ' 255 = no auto-repeat (only on action per button press)
- '
- ' The BUTTON instruction will cuase the program to branch to
- ' Press when the button is pressed
- PAUSE 5
- BUTTON Btn,0, 200, 20, btnWrk,1, Press
- GOTO main
- Press:
- DeBUG "*"
- GOTO Main
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement