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

Go To Last Post
7 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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?

 

Last Edited: Sun. Dec 28, 2014 - 08:17 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You can make a 'sniffer' that uses an avr and  4  data inputs and e and rs. Wait for each e, read the data and rs and save the nibble in ram.  Maybe combine the nibbles into bytes and  send them out the uart. What is the data you are grabbing from the lcd?

 

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It is some numbers (0-9) and some letters (a-z , A-Z) and ':'. I want to analyse them and change the input of Atmega8 based on those data. For example I want to send 'x' to atmega8 if it sends 'y' to LCD and send 'y' to atmega8 if it sends 'x' to LCD. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

bobgardner wrote:

Wait for each e, read the data and rs and save the nibble in ram.

 

I configure my Interrupt on rising edge or falling edge on E?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Rising I think, but I could verify this if I can get a scope within a probes length of the lcd.

 

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There are several HD44780 simulators.    What do you think that Proteus does?

 

I would guess that there is a protocol analyser for most Logic Analysers.    However, my Saleae LA does not.

Perhaps the BusPirate does.

 

It would be easy enough to sniff it yourself.

I really can't understand your "position".

 

If you are buying "security" products for your job,   you ask the manufacturer about the capabilities of their product(s).

If you are making your own products,   you have full control over the design.

 

If you don't trust the manufacturer's claims,   you buy products from a different manufacturer.

Or are you just trying to crack a rival's product?

 

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The topic continues here: https://www.avrfreaks.net/forum/a...

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Topic locked