Hi--
I've got PBP2.6 with a U2 programmer here, and I have been happily writing and debugging PICBASIC programs since 1996, so I'm not a newbie. However, I'm having a problem here that I just can't find the source of... PIC is an 18F4520 assembling with MPASM, and here's the deal:
This code (and this is the ENTIRE program) works:
As expected, this program flashes the LED on portd.5. I should point out that there is no LCD attached to the board, I removed it during my debugging process, along with all the other code.Code:DEFINE OSC 8 OSCTUNE = %11000000 'int low speed clock from osc OSCCON = %01110000 '8mhz internal oscillator start: low portd.5 'LED on pause 100 high portd.5 'LED off pause 100 goto start lcdout $fe, 1
Here's the really weird part, the code below DOES NOT work:
The only difference is I eliminated the LCDOUT command, which isn't inside the loop of the code that executes in the above (working) example anyway, so why does the code that contains the command work, whereas the lower code without it does not?Code:DEFINE OSC 8 OSCTUNE = %11000000 'int low speed clock from osc OSCCON = %01110000 '8mhz internal oscillator start: low portd.5 'LED on pause 100 high portd.5 'LED off pause 100 goto start
Configuration in MeProg is set to INTRC, PWRT ON, brownout reset off, WDT enabled, MCLR set to RESET (and yes, there is a pullup on MCLR pin).
Any ideas where to look??
Thanks--
--Alan




Bookmarks