wannaBinventor
Member
I'm trying my hand at some SF Basic. I'll be using the internal oscillator and I found that it has to be set up before anything else executes, which makes since. I was building of some of the samples and info I found on the SF wiki to generate this code.
That's about as basic as it gets, but I get an error that reads:
Identifier not declared: osc
Also, if I remove the "END" I get an error for that, but looking at other codes I didn't think it was required.
What is weird is that I can compile this without a problem:
Notice the only difference is that the bottom code is for the PIC18F1220 and it uses PORTB instead of PORTD because the 18F4550 listed in the first code has PORTD, but the 1220 does not. Also, I'm using "INTIO" instead of "INTIO2" in my first code because the 18F4550 doesn't have an INTIO1 and INTIO2, just INTIO.
Any idea why this is happening? This is what I dreaded. Being halfway proficient in ASM makes it really demoralizing when you can't even compile a hello world in your new language. LOL
Code:
Device = 18F4550
Clock = 8
Config
osc = INTIO
OSCCON = %01110010
End
// alias to port pin...
Dim LED As PORTD.0
// main program...
Low(LED)
Repeat
Toggle (LED)
DelayMS (500)
Until false
That's about as basic as it gets, but I get an error that reads:
Identifier not declared: osc
Also, if I remove the "END" I get an error for that, but looking at other codes I didn't think it was required.
What is weird is that I can compile this without a problem:
Code:
Device = 18F1220
Clock = 8
Config
osc = INTIO2
OSCCON = %01110110
End
// alias to port pin...
Dim LED As PORTB.0
// main program...
Low(LED)
Repeat
Toggle (LED)
DelayMS (500)
Until false
Notice the only difference is that the bottom code is for the PIC18F1220 and it uses PORTB instead of PORTD because the 18F4550 listed in the first code has PORTD, but the 1220 does not. Also, I'm using "INTIO" instead of "INTIO2" in my first code because the 18F4550 doesn't have an INTIO1 and INTIO2, just INTIO.
Any idea why this is happening? This is what I dreaded. Being halfway proficient in ASM makes it really demoralizing when you can't even compile a hello world in your new language. LOL