Hey Brian,
> a/ Can I perform a full PIC reset in code ?
No. With a 16F, you can reset the program, but not the pic itself. (unless you tie an output pin to the MCLR pin, and set the output LOW). But even that doesn't reset everything to "Power-ON" settings. However, that won't solve your problem anyways.
> b/ Any one else experienced this and found a fix?
Yes, see below.
> c/ Bad news that the forum does not allow a serach on 3 characters. LCD is automatically thrown out and there are no hits found searching for "Liquid Crystal Display"
See this thread. It's a sticky at the top of the FAQ forum that you posted this message in. (but I've moved this thread)
A better Search tool for the Forum
http://www.picbasic.co.uk/forum/showthread.php?t=4751
Now for the LCD.
LCD's can't initialize while the pins are floating, which is the state they are in on power-up of the PIC. Once those pins are taken to the proper state, it then needs a short delay for it's internal initialization. It's usually safe to wait around 500ms, but most of the ones I have only need about 250ms.
In your program, this section...
Code:
[************************** Initialise *********************************
loopctr = 0
pause 500 'wait for LCD to start
doesn't do anything for the LCD since the pins are still floating. It just spends a half second doing nothing.
Then here...
Code:
StartLCD:
pause 500
It uses another half second doing nothing again.
Then here...
Code:
lcdout $FE, $01 ' Get LCD registers into active states
pause 100 ' wait for LCD to start
lcdout $FE, $01 ' for justin
This is the first place that the pins are no longer floating, but the pause is only 100ms so the next lcdout will interfere with the start-up.
So here's how to fix it.
Up at the ***** Initialise ****** lines, change it to this...
Code:
LCDOUT $FE,1
pause 500 'wait for LCD to start
.. Remove all the other pauses and clear screens.
.. Remove the LCD_COMMANDUS 5000 and LCD_DATAUS 250 lines, they are way too high.
It'll start up every time.
Bookmarks