2
\$\begingroup\$

I am using a 20x4 LCD on PortC of an ATmega32. I have disabled JTAG and I am using the LCD library by Newbiehack.com. Until recently everything (characters included) was displaying fine. Then I changed my MCU to 16 MHz and LCD was not displaying anything. So I used a new MCU at 1MHz with JTAG disabled but is shows only cursor but not any characters.

I can get the cursor position to change but still can't get it to display data, even using the same code as before. I tried using a new LCD but still same problem persists: no data displayed. How do I solve this?

\$\endgroup\$

1 Answer 1

2
\$\begingroup\$

The correct answer, in each case of the MCU frequency, is to check all the waveforms that go to the LCD module and make sure that all the timing parameters are met. The timing data should be in either the LCD module data sheet or in the data sheet for the controller chip used in the module design. For proper functioning there are minimum widths for pulses such as that on the E (Enable) signal. There will also be minimum requirements for the amount of time that DATA, CS, RS and RW have to be valid before the E pulse and how long they have to stay valid after the E pulse.

The typical software control interface to the LCD module generates the timing of the interface signals through "bit banging" the port pins of the MCU. The timing of such an interface is fully dependent on how fast the MCU executes its instructions and how the mix of instructions was put together in the library module. Checking this is important because there is always the possibility that there is a timing violation in the signalling handshake to the LCD even when you operate with a slower MCU frequency.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.