Go Down

Topic: Datasheet and reversed pins? [SOLVED] (Read 2537 times) previous topic - next topic


Aug 18, 2009, 03:19 am Last Edit: Aug 19, 2009, 12:20 am by Chris.H. Reason: 1
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.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)


(Sorry for any grammatic errors etc, but it's now 03.20AM and my brain is beginning to shut down...)


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.


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..


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..

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):





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? :D[/joke]

It always feels better figuring out your problems! :D


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.  :)


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! :?)

Go Up