I’m trying to interface 16*2 LCD with pic18f4550 using the code in attachment. I checked the pins and they are declared correctly alsoI’m using 8Mhz external crystal. I also checked one other LCD library which seems to be working, however when using this code I’m getting 1st row black squares like something hasn’t been initialized properly.
Hi, thanks for the answer. I did first run a LED test, and it works fine, perhaps a bit faster than expected so I also suspect that it is probably oscillator settings, but I can’t find whats wrong in config.h. I did set FOSC = HS in order to use external crystal. Did I miss something ?
It can be frequency problem, noise problem etc. Try reduce the wire length to LCD if you are using long wires and also try adding more filtering capacitors.
Hi. Something else lets me believe that its more probable to be code problem rather than hardware. When I tried it with the other LCD library but using internal oscillator (4 mhz input) it did work properly with multiple line outputs. But with this code it outputs some garbage. Will have to check datasheet again for the oscillator settings.