I have an application working with a HD40778 4x20 lcd.
Within the application I have commented (/* */) the functions to load custom characters and to build 2x2 & 4x2 fonts.
When I compile the fonts functions the program crashes in spite of the fact that I never call them; I got some warnings of the uncalled functions.
The font functions call the same basic ones (write command & write data) that worked initially; the code constants (216 bytes) to define the customs characters were declared in the working version.
Here one that loads the custom chars for the 4x2 font:
unsigned char code fc420[8] = { 143, 143, 140, 140, 140, 140, 140, 140 }; unsigned char code fc421[8] = { 159, 159, 131, 131, 131, 131, 131, 131 }; -- -- void loadFont4(void) small { lcd_dwn_custom_char(0,fc420); lcd_dwn_custom_char(1,fc421); lcd_dwn_custom_char(2,fc422); lcd_dwn_custom_char(3,fc423); lcd_dwn_custom_char(4,fc424); lcd_dwn_custom_char(5,fc425); lcd_dwn_custom_char(6,fc426); lcd_dwn_custom_char(7,fc427); }
I have tried calling the font functions one at a time, using the SPEEDOVL & NOOVERLAY but it did not help.
To use the debugger I had to disable (comment /* */) the HD40778 input ports but it works as expected.
Any hint?
Tia
Federico
I've had many runs (pulling my white hair apart):
That's bad enough already. But why unload all that confusing mess on us, unfiltered? So we can lose our hair over it, too?
- The application is dead from the reset, not even the first part of the main executes.
That's a jump to conclusions. There's quite a bit of stuff going on between the hardware reset event and entry to main(). Just because execution don't reach the latter doesn't mean the former already failed. It could be anything from something having broken the startup routines to failure to inform startup about a watchdog. You'll have to debug into startup to see what's going on.