"enable" statement in pic18 oshonsoft basic compiler causes syntax error

gta18

New Member
I copied and paste this code below from the oshonsoft manual, and when compiling I am getting a syntax error from the enable statement below.

any ideas?

thanks!


Dim t As Word
t = 0
TRISA = 0xff
ADCON1 = 0
TRISB = 0
option_reg.T0CS = 0
INTCON.T0IE = 1
Enable
loop:
Adcin 0, PORTB
Goto loop
End

On Interrupt
Save System
t = t + 1
INTCON.T0IF = 0
Resume
 
The 18F chips have high and low interrupts (read the PIC's manual and the Basic manual for the 18F series). You can setup to use both types; or default to just use High (i.e. everything is the same). From your example; change Enable to Enable High; change On Interrupt to On High Interrupt.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…