• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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

Status
Not open for further replies.

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
 

languer

Active Member
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.
 
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading

 
Top