Pages: 1 2 3 [4]   Go Down
Author Topic: Stealing data sent to an LCD  (Read 7722 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Full Member
***
Karma: 2
Posts: 199
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

 Sorry if I haven't looked at everything again but it looks like you are moving along.

You mentioned something about the PIC and 4800 baud. If the PIC is only being used to drive the LCD by receiving serial commands then it would be easier to "steal " those than trying to dechiper the ones on the LCD.

It might help to at least define the model# of what you are interfacing to see if there is any data on it to help in this.
Pictures?

Assuming that you still need to look at the pins of the LCD then the LCD still might be driven by using the R/W function rather than by delays so by removing the LCD it would never be able to respond correctly.If you have gotten your program to trigger on the falling edge of E (enable) then I would at first see if the R/W (pin5) is being used. The R/W would be driven to the LCD so it does not to be in the circuit to test this.Just log that for awhile.If all you see are 0's then it's a safe bet that the programmer just used delays for timing. If the R/W is being used then the LCD must be in the circuit to be able to read anything (it could be fooled but that's another thing) useful on the data bus. So when R/W is High just ignore what is on the data bus.

I would also just look at DB4-DB7 (upper nibble) because even though it can be an 8 bit bus pretty much of the start up commands are  done using the upper nibble.

What you are really after is the initial sequence to see how this LCD is being driven.



Logged

Sydney, Australia
Offline Offline
Newbie
*
Karma: 0
Posts: 43
I ♥ Code :D
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It's a kind homebrew / semi professional device. I bought it second hand (notice the hot glue :S)

I wouldn't be surprised if it was programmed with just delays it's not a very industrial device.

Here some pics if it helps... (sorry about the crappy phone pics)











Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 126
Posts: 8471
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I'm from Sydney by the way.
So I guess it was even later for you then, I'm in WA at present.

Do you have an octal latch to hand, a '374, '373 or similar? 373 would be best probably.

______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Sydney, Australia
Offline Offline
Newbie
*
Karma: 0
Posts: 43
I ♥ Code :D
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Not on hand no.... But I can pick one up tomorrow.

This is what you are referring to correct?
http://jaycar.com.au/productView.asp?ID=ZS5273&keywords=octal+latch&form=KEYWORD

Datasheet: http://jaycar.com.au/products_uploaded/ZC4858.pdf

Looks like its a 373 as well.
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 126
Posts: 8471
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes that's what I had in mind, but I've decided a '374 would be better

http://jaycar.com.au/productResults.asp?keywords=74ls374&keyform=KEYWORD&SUBMIT.x=0&SUBMIT.y=0

This is the circuit I'm thinking of.



Note you need an inverter as well.

This should latch the data and hold it until the next read/write to/from the LCD. This will give the Arduino longer (the entire time between LCD accesses) to grab the data, it still may not be long enough, in which case you better go buy a logic analyzer smiley

Use the interrupt-driven code I first posted.

As justone says you may want to look at R/W as well and even RS, if it is working with 8 bits you can add a second 374 to grab these two control lines as well.

______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Sydney, Australia
Offline Offline
Newbie
*
Karma: 0
Posts: 43
I ♥ Code :D
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I assume you mean a HEX inverter?

Any model number / info specific? The 741G04 doesn't give any results...

While I'm at Jaycar, what type of logic analyzer would I need? May as well grab one to test out.
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 126
Posts: 8471
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
741G04
1G == one gate, I only use SMDs so that's a single-inverter version of the 74xx04 (note it only has 4 pins). Yes get a HEX DIP version, LS, HCT etc, doesn't really matter I think.

Quote
While I'm at Jaycar, what type of logic analyzer would I need?
No chance at Jaycar I'm afraid. I use one of these

http://www.saleae.com/logic/

Only $150 and will sort this stuff out in no time. I never leave home without one smiley

If you plan to spend any time with microprocessors do yourself a favour and buy one, or something similar.

______
Rob
« Last Edit: October 21, 2011, 08:26:55 am by Graynomad » Logged

Rob Gray aka the GRAYnomad www.robgray.com

Sydney, Australia
Offline Offline
Newbie
*
Karma: 0
Posts: 43
I ♥ Code :D
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok, so I've got the octal latch, but I don't think I have the correct inverter.

The one the guy gave me is a UA741CN. He said it was a voltage regulator and has the exact same function. It has 8 pins how ever :/

Jaycar doesn't have a datasheet for it either. But there is an external datasheet here

http://www.datasheetcatalog.org/datasheet/SGSThomsonMicroelectronics/mXyywtw.pdf

I have the DIP8 version.

Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 126
Posts: 8471
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Typical of most (all?) employees in so-called electronics stores these days, they could find their arse with both hands and a map. Now if you had a question about a laughing clock or toy helicopter you'd be right.

Quote
He said it was a voltage regulator
About as wrong as you can get.

Quote
has the exact same function
Wrong again.

The 741 is an opamp, I grant that it can be used as an inverter but it is not an equivalent to a 74xx14/04.

I think you need to find a new shop smiley, actually don't bother, I think they're all the same these days.

This is what you need

http://jaycar.com.au/productView.asp?ID=ZS5004&keywords=74ls04&form=KEYWORD

or

http://jaycar.com.au/productView.asp?ID=ZS5014&keywords=74ls14&form=KEYWORD

Have you ordered your logic analyzer yet?

______
Rob
« Last Edit: October 23, 2011, 10:56:56 pm by Graynomad » Logged

Rob Gray aka the GRAYnomad www.robgray.com

Sydney, Australia
Offline Offline
Newbie
*
Karma: 0
Posts: 43
I ♥ Code :D
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Actually funny story... when I was there, one of the employees were showing off a 90 Lumen torch to a group of cops and boasting how good it was compared to all the rest of the torches...

I just walked by and said check the lumen rating... then tapped on a torch half the size with 190 Lumen rating.

I know I should have asked for a second opinion cause this guy has given me problems before. I'll go back tomorrow for round two.
Logged

Offline Offline
Full Member
***
Karma: 2
Posts: 199
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

 Don't know why all the troubles with getting the data but I do see where you are trying to grab the data on the falling edge E (enable pin).
 
I went and looked at what I've written for the avrs (I usually write in assembly and have just gotten into the arduino) and I also looked at the arduino library for the lcd's . The enable pin is usually held low when not writting to it. The data is placed on the bus then the enable is brought high for a brief period then it is brought low to write the data to the display.

If it were me I would enable the interrupt on the RISING edge of the enable pin.
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 126
Posts: 8471
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You may be right justone, the data sheet I looked at showed the data being valid on the falling edge and I assumed that they are all the same but maybe not.

In that case, as you say, change the interrupt level and ditch the inverter.

Maybe it will just work without the extra hardware if that's the problem.

______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Sydney, Australia
Offline Offline
Newbie
*
Karma: 0
Posts: 43
I ♥ Code :D
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok, I've edited the code to work on a rising edge... this is the output I'm getting in HEX

Code:
0
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F
3F

And this in BIN

Code:
0
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
111111
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 126
Posts: 8471
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

There are 4 combinations to try.

Rising/falling edge.
With/without inverter.
______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Offline Offline
Jr. Member
**
Karma: 0
Posts: 91
Digital Power Engineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Can you reverse engineer the PCB? I would guess that it's amplifying the signal to be digitized by the PIC for display. If you can reconnect that PIC input to a potentiometer, you can plot voltage input vs. display output and reverse engineer an equation for conversion.
Logged

"Optiboot: the Tiffany Yep of Arduino bootloaders."

Pages: 1 2 3 [4]   Go Up
Jump to: