Pages: [1]   Go Down
Author Topic: Datasheet and reversed pins? [SOLVED]  (Read 1062 times)
0 Members and 1 Guest are viewing this topic.
Lidköping, Sweden
Offline Offline
Newbie
*
Karma: 0
Posts: 8
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I recentelly bought a cheap LCD Display (JHD202A/C, 2x20 blue, for $13) that I want to hook up to my Arduino (diecimila), hopefully through a Shift register.

There's a bit "background history" here. If it's to much, skip it..

On the website, from where I ordered it (http://www.electrokit.se/opto-display-lcd-lcd-2x20-tecken-jhd202a-stn-bla-vit-led_41003002  [Swedish]), the part ID is said to be JHD202A, and the same is printed on the bag in which I got it.
BUT on the back of the display it says JHD202C.. Fine, I thought that it's probably a revision of the component, no big deal..

I Googled JHD202C to find a datasheet but found nothing (Just some sites mentioning it, no datasheets, not even on JHDs site). Then I googled JHD202A and found some datasheet (among others I found one at the site where I bought the LCD, for a yellow/green LCD.

So I set out to connect my LCD to my arduino, I soldiered on pins in the "pin-holes" on the LCD to make it easier to connect to the arduino (and I checked the pins for shortcuts etc)..
The plan is to use an IDE-cable (http://upload.wikimedia.org/wikipedia/commons/6/61/IDE_cable_40_pin_%26_80_pin.jpg ) to connect the LCD, buttons Rotary encoders etc to the arduino. (I checked it for continuity...).

I looked up different tutorials on how to connect it to the arduino:
http://www.arduino.cc/en/Tutorial/LiquidCrystal
http://www.hacktronics.com/Tutorials/arduino-character-lcd-tutorial.html  (This last one is the one I used, as it connects the backlight, but with a trimpot instead of a fixed resistor for contrast)

The pins used matches the ones in the datasheet, and as far I gathered it is compatible with HD44780, so I hooked it up.
BUT it didn't work and the backlight wasn't lit.
As I use pin 13 for backlight and the built-in LED of the arduino was lit I started with "debugging" the backlight and disconnected all other pins. I used my multimeter to make sure (again) that the holes of the IDE-cable match etc.
Just to be sure, I switched the pins  (So if pin 15 was connected to pin 13 on the arduino and 16 to ground, 15 was now connected to ground and 16 to pin 13) and voila, it lit upl

End of background/"gibberish" ;?)

So if we look at the datasheet (http://www.electrokit.se/download/JHD202A%20SERIES.pdf ) we need to "reverse" pin 15 (to LED-) and pin 16 (to LED+). So now I'm a little confused, so I need some advice:

Should i "reverse" (odd to even, even to odd: 1 <-> 2) the rest of the pins, or is it more likely that it's just the LEDs??
What can happen if I reverse the pins? Can I destroy the LCD (or the controllers on it)?

Any ideas are highly welcome (and if you want, semo tips for using a shift register with the LCD)

/Chris

(Sorry for any grammatic errors etc, but it's now 03.20AM and my brain is beginning to shut down...)
« Last Edit: August 18, 2009, 05:20:45 pm by Chris.H. » Logged

- Why do as everyone else does, when everyone else does it?
- He who walks in others footprints will never discover something new.

Gothenburg, Sweden
Offline Offline
Jr. Member
**
Karma: 0
Posts: 87
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Did you place you pins on the bottom side of the board?

Seen from the bottom side, the pairs of pins are swapped (left<->right) so the numbers in the data sheet and lead number of the IDE cable will be swapped in the manner you describe.
  
Logged

Lidköping, Sweden
Offline Offline
Newbie
*
Karma: 0
Posts: 8
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the response.

Yeah, I'm pretty shure that I've connected it correctely (But I needed to dubble-check).

I checked visualy (the top left [front view] pin [15] is connected to the pin under the blocked pin of the IDE contact, and so is the white lead to ground) and by using my multimeter.

I also plugged the two pins directely into the "rail" on the arduino (as you have GND next to pin 13).

The first image below shows the pins and back of the LCD, where you can see that the odd pins are on the inside.
The second image shows it connected to the arduino on pin 13 (yellow) and gnd (white) and that the backlight is lit...


Large (14MP/8MB): http://seasight.se/stuff/Arduino2.jpg

Large (14MP/5MB): http://seasight.se/stuff/Arduino1.jpg

This is a illustration including the example from the datasheet and how I connected my panel..

Logged

- Why do as everyone else does, when everyone else does it?
- He who walks in others footprints will never discover something new.

Lidköping, Sweden
Offline Offline
Newbie
*
Karma: 0
Posts: 8
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

So, I figured: All or nothing... I hooked up the rest of the pins in "reverse".
I started with +5v and GND and started the arduino and nothing happend (as before when I only had the backlight hooked up), besides that the backlight lit, as expected. I reversed the pins (to match the datasheet) and then the backlight didn't work..

So I put the GND and +5v in "my way" and did so with the rest.
I started up my arduino and there it was "Hello World!"! :?D
One thing I noticed was that my 220K trim-pot wasn't the best for this application, it's very hard to set the contrast right, I'm gonna replace it with a trim-pot (value unknown atm) I found in an old CD-ROM unit..

Q.E.D.:
For some reason, the panel JHD202C (which is sold as JHD202A) has the pins flipped to what's normal (as JHD202A)...
Figure that...

Now I can go on with my Rot.Enc-problem again :?D

Some pics (It's a bit messy, but it's color-coded):

http://seasight.se/stuff/LCD-1.jpg

http://seasight.se/stuff/LCD-2.jpg

http://seasight.se/stuff/LCD-3.jpg
Logged

- Why do as everyone else does, when everyone else does it?
- He who walks in others footprints will never discover something new.

Spokane, Washington
Offline Offline
God Member
*****
Karma: 0
Posts: 686
My name is Bob, and I'm an addict.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

OMG! Why didn't I think of the IDE cable idea?! That's awesome!

As for the Potentiometer, I've been most successful with a 10k trimmer. I set it at like 85% brightness, end up with about 9.2k when it's set (I think I measured right, haha)

I don't know if it's the pictures.. but the quality of your LCD looks.. way sexier than mine! [joke]Did you use photoshop? smiley-grin[/joke]

It always feels better figuring out your problems! smiley-grin
Logged

Lancashire, UK
Offline Offline
Edison Member
*
Karma: 8
Posts: 1992
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Blow the code and stuff, just how did you take such great pictures of an LCD panel ?  I'm struggling to make mine show anything on the panel, with or without using flash.  smiley
Logged


Lidköping, Sweden
Offline Offline
Newbie
*
Karma: 0
Posts: 8
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

@CaptainObvious:
It started with that I didn't want to like 3 separate wires that essentially went to/from the same place. So I took wires from an old IDE-cable (I have a few...) so I got "ribbons"... Then I figured, why don't just use the whole cable to connect my components (as my project can't be put on a single board, there's a front-panel etc). :?)
The "scavenged trim-pots" look to be around 20k, so at least they should do better than the 220k...

@pluggy & CaptianObvious:
I didn't edit them in PS, but I changed some basic parameters in Lightroom.. :?)
The pictures looks basically (First "Hello World" without flash, the rest with..) the same as they did right from the camera.
It's the camera that's the "secret" ;?P
I have a Pentax K-7, a very nice (and new) dSLR, which takes great pictures when you set it right...
The LCD looks way better in the pics than what it does irl (but it still looks pretty good..), probably due to a little "over saturation" (that is what I generally use for my "normal" photos too).
If you want to take nice pictures with less effort you need a nice camera (pref. a dSLR, but there's some really nice compacts too..)

Thanks for the responses! :?)
Logged

- Why do as everyone else does, when everyone else does it?
- He who walks in others footprints will never discover something new.

Pages: [1]   Go Up
Jump to: