bsodmike
New Member
Hello guys!
I was trying out some code to get the LCD to work and instead the PIC started acting quite strangely.
It was pretty much as follows:
And the strangest thing happened. the LED was blinking...
I had the config bits set to HS, no WDT, with PUT enabled. I however suspect the WDT still being on. Tomorrow I'm gonna try and strip the code down to:
main{
led on
delay
led off}
and see if it does the SAME thing...
Also I can not compile the code with:
__CONFIG(HS & WDTDIS & UNPROTECT & PWRTEN); //Configuration Fuses
It gives an error saying ')' expected. I'm really confused why, picclite compiler.
--Mike
I was trying out some code to get the LCD to work and instead the PIC started acting quite strangely.
It was pretty much as follows:
Code:
int main()
{
TRISA = 0x00;
TRISB = 0x00;
PORTA = 0x00;
PORTB = 0x00;
CLK=1;
DelayMs_100(1); // this is the delay to warm up the LCD
CLK=0;
LCD_Init();
Mode_char(); // send this before sending chars to LCD
snd_char(atoi("------EVAC------"));
DelayMs_100(5);
clr_snd(); // clears the screen and sets cursor back to home
}
And the strangest thing happened. the LED was blinking...
I had the config bits set to HS, no WDT, with PUT enabled. I however suspect the WDT still being on. Tomorrow I'm gonna try and strip the code down to:
main{
led on
delay
led off}
and see if it does the SAME thing...
Also I can not compile the code with:
__CONFIG(HS & WDTDIS & UNPROTECT & PWRTEN); //Configuration Fuses
It gives an error saying ')' expected. I'm really confused why, picclite compiler.
--Mike