simonbramble
Active Member
Long story short... I have picked up my PIC development kit after 10 years. I downloaded MPLAB X and installed it. It keeps crashing on startup, so I uninstalled it and reinstalled MPLAB V8.46. Code compiles, using Hi Tech PICC compiler
However, when single stepping through my code, it jumps over one line of code. See below
It comes out of the delay_10ms() routine, then immediately steps to the lcd_write() routine, bypassing the 'data = ' line thus loading garbage into the lcd_write() routine and not initialising the LCD
What am I doing wrong? It simulated well in MPLABx, but this takes 1.5 hours to install and crashes on startup.
I'm all ears (and heart)
Thanks - Simon
However, when single stepping through my code, it jumps over one line of code. See below
Code:
void lcd_initialise(void) /* initialise LCD */
{
unsigned char n, data;
setbit(global, 1); /* indicate 1x 4 bit transfer*/
for(n=0; n<10; n++)
{
delay_10ms(); /* wait for power to stabilise*/
}
for (n=0; n<3; n++)
{
data = 0b00110000; // it ignores this line and skips straight to the lcd_write()
lcd_write(data);
}
It comes out of the delay_10ms() routine, then immediately steps to the lcd_write() routine, bypassing the 'data = ' line thus loading garbage into the lcd_write() routine and not initialising the LCD
What am I doing wrong? It simulated well in MPLABx, but this takes 1.5 hours to install and crashes on startup.
I'm all ears (and heart)
Thanks - Simon