Hi
thanks Richard , my code as below
Code:define osc 48 TRISB = $00 ' Set digit pins to output mainloop: toggle portB.5 pause 200 Goto mainloop ' Forever End
Hi
thanks Richard , my code as below
Code:define osc 48 TRISB = $00 ' Set digit pins to output mainloop: toggle portB.5 pause 200 Goto mainloop ' Forever End
your not paying attention the solution has already been offered , and for an issue like this its important to include the config section
config + program are inseparable for diagnosing this problem
RTFMCode:define osc 48 TRISB = $00 ' Set digit pins to output mainloop: toggle portB.5 pause 200 Goto mainloop ' Forever End
;wrong define osc 48 DEFINES ARE CASE SENSITIVE
define OSC 48
Warning I'm not a teacher
Just testing, as sometimes I've noticed that when pasting code copied from MCS into the forum, it sometimes re-formats it and changes upper to lower case
Just ignore this
Edit: - seems to work fine so it's not that, so must be human error ;-)Code:DEFINE OSC 20 ' 18F4520, 20mhz crystal
In MCS keywords are reformatted on the fly - but for display purposes only. The case in which you type it in is what's stored in the actual file. If you typ HsERiN that's what stored when you save the file even if MCS displays HSERIN on the screen.
define is a keyword so when you type that in MCS it gets reformatted to upper case (if you have your formatting setup that way) but if you then copy/paste that into Notepad or whatever it reverts to the way you typed it (which can be DefINe or whatever). OSC on the other hand - which is the important thing here - is NOT a keyword that MCS recognizes so it does NOT get reformatted and that's a good thing in this case because if it did you'd see OSC on the screen even if you typed it as osc which would then cause the assembler to not recognize it as OSC.
/Henrik.
Bookmarks