How to Monitoring the lines between an Atmega8 and a LCD using Atmega32

atmegaavrcharacter-lcdlcd

I have a device that it use an Atmega8 to send some data to a 2*8 character LCD. the LCD has 8 pins and the pins are as below from left to right:

DB7 | DB6 | DB5 | DB4 | En(Clock) | RS | VDD | VFF

I think it is a HD44780 with DB0…3 , Contrast and WR connected to GND.

By the way, I want to monitor the lines between this LCD and Atmega8 using an Atmega32. I mean I want to achieve the data that transferring between them and send it to my computer's COM port and ….

I checked the datasheet of HDD44789 (A 2*16 LCD) and I found this :

enter image description here

Although this has 8 bit for data and mine has 4 bit, but I think both have a single procedure to print data on the LCD.

Now I want to know, how I can read the data on the lines using an Atmega32. for example can I connect En to Interrupt-0 pin and in falling edge read DB4….7? Does it work?

And another question, when we send data to LCD in 4bit-packs, we send high nibble first or we send low nibble?

Best Answer

Can I connect En to Interrupt-0 pin and in falling edge read DB4....7?

Essentially, yes. You also want to read the RS pin to see if the data is for control or text.

And another question, when we send data to LCD in 4bit-packs, we send high nibble first or we send low nibble?

Higher nibble first.