Offline
Full Member
Karma: 0
Posts: 118
|
 |
« Reply #45 on: October 20, 2011, 01:10:48 pm » |
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
Newbie
Karma: 0
Posts: 43
I ♥ Code :D
|
 |
« Reply #46 on: October 21, 2011, 05:23:18 am » |
|
|
|
|
|
Logged
|
|
|
|
|
nr Bundaberg, Australia
Offline
Tesla Member
Karma: 73
Posts: 6839
Scattered showers my arse -- Noah, 2348BC.
|
 |
« Reply #47 on: October 21, 2011, 05:47:09 am » |
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
|
|
|
|
|
|
|
nr Bundaberg, Australia
Offline
Tesla Member
Karma: 73
Posts: 6839
Scattered showers my arse -- Noah, 2348BC.
|
 |
« Reply #49 on: October 21, 2011, 07:36:19 am » |
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=0This 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  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
|
|
|
|
|
Sydney, Australia
Offline
Newbie
Karma: 0
Posts: 43
I ♥ Code :D
|
 |
« Reply #50 on: October 21, 2011, 07:57:07 am » |
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
Tesla Member
Karma: 73
Posts: 6839
Scattered showers my arse -- Noah, 2348BC.
|
 |
« Reply #51 on: October 21, 2011, 08:21:35 am » |
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. 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  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
|
|
|
|
|
Sydney, Australia
Offline
Newbie
Karma: 0
Posts: 43
I ♥ Code :D
|
 |
« Reply #52 on: October 23, 2011, 08:29:38 pm » |
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.pdfI have the DIP8 version.
|
|
|
|
|
Logged
|
|
|
|
|
nr Bundaberg, Australia
Offline
Tesla Member
Karma: 73
Posts: 6839
Scattered showers my arse -- Noah, 2348BC.
|
 |
« Reply #53 on: October 23, 2011, 08:55:00 pm » |
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. He said it was a voltage regulator About as wrong as you can get. 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  , 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=KEYWORDor http://jaycar.com.au/productView.asp?ID=ZS5014&keywords=74ls14&form=KEYWORDHave you ordered your logic analyzer yet? ______ Rob
|
|
|
|
« Last Edit: October 23, 2011, 10:56:56 pm by Graynomad »
|
Logged
|
|
|
|
|
Sydney, Australia
Offline
Newbie
Karma: 0
Posts: 43
I ♥ Code :D
|
 |
« Reply #54 on: October 23, 2011, 10:43:08 pm » |
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
Full Member
Karma: 0
Posts: 118
|
 |
« Reply #55 on: October 24, 2011, 01:14:51 pm » |
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
Tesla Member
Karma: 73
Posts: 6839
Scattered showers my arse -- Noah, 2348BC.
|
 |
« Reply #56 on: October 24, 2011, 06:38:07 pm » |
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
|
|
|
|
|
Sydney, Australia
Offline
Newbie
Karma: 0
Posts: 43
I ♥ Code :D
|
 |
« Reply #57 on: October 25, 2011, 12:14:55 am » |
Ok, I've edited the code to work on a rising edge... this is the output I'm getting in HEX 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 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
Tesla Member
Karma: 73
Posts: 6839
Scattered showers my arse -- Noah, 2348BC.
|
 |
« Reply #58 on: October 25, 2011, 12:34:15 am » |
There are 4 combinations to try.
Rising/falling edge. With/without inverter. ______ Rob
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Jr. Member
Karma: 0
Posts: 91
Digital Power Engineer
|
 |
« Reply #59 on: November 11, 2011, 11:19:52 pm » |
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."
|
|
|
|
|