diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-02-24 18:42:24 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-02-24 18:42:24 +0000 |
commit | f508189682b6fba62e08feeb1596f682bad5fff9 (patch) | |
tree | 28aeb0e6c19386c385c1ce5edf8a92c1bca15281 /test/boost/interrupt.pic16.bas | |
download | piklab-f508189682b6fba62e08feeb1596f682bad5fff9.tar.gz piklab-f508189682b6fba62e08feeb1596f682bad5fff9.zip |
Added KDE3 version of PikLab
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/piklab@1095639 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'test/boost/interrupt.pic16.bas')
-rw-r--r-- | test/boost/interrupt.pic16.bas | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/test/boost/interrupt.pic16.bas b/test/boost/interrupt.pic16.bas new file mode 100644 index 0000000..370e582 --- /dev/null +++ b/test/boost/interrupt.pic16.bas @@ -0,0 +1,34 @@ +#include <basic\PIC16F877.bas> +' +' Basic sample for BoostBasic compiler. +' Use the "Led Block" plugin to see +' changing value on port B. +' + +' Set configuration word (sample only, ajust for your particular case) +#pragma DATA _CONFIG, _HS_OSC & _WDT_OFF + +Sub interrupt() + + portb = portb + 1 + + intcon = intcon & ~(1 << T0IF) 'clear TMR0 overflow flag + +End Sub + +Sub main() + + trisb = 0 'configure port B + portb = 0 'clear port B + + option_reg = 7 'set prescaler + + ' enable interrupts + intcon = intcon | (1 << T0IE) 'enable TMR0 overflow bit + intcon = intcon | (1 << GIE) 'set global interrupt bit + + ' endless loop + Do while 1 + Loop + +End Sub |