char LCD and PSoC 3 trouble | Cypress Semiconductor
char LCD and PSoC 3 trouble
I'm having a bit of trouble with character LCDs. I have a 2x16 and a 2x24 LCD , both have, or are based off of, the Hitachi 44780 chip. The LCD circuitry is assigned PORT0[1-7] (per psoc creator 3.0) and both LCDs are brancd new.
So, I power up the PCB I initialize everything and the LCD starts displaying data ( the PCB also has a heart beat LED).. Ok, we now know the PCB/LCD is ok. However, after some random amount of time the PCB will appear to be hung (heartbeat stoped) and the LCD is no longer showing changes (sometimes incorrect chars are displayed, but not always). If I power off/on the PCB the same thing happens but not always in the same place. If I unplug the LCD cable while the PCB appears hung the heartbeat now works.
Ok, so I now enable the debugger (Miniprog3) a let it run. Maybe I'll see a buffer overflow or something causing the LCD to shit itself. Nope. Couldn't be that easy. With the debugger enabled and running the PCB never stops (LCD keeps working too).
To me this now looks like a timing issue, where the debugger slows things down just enough to run propperly. I've tried increaing the delay in LCD_WrDatNib(uint8 nibble) from 1us to as high as 4us, but no help.
Has anyone had trouble like this?
Any other suggestions?