|
First thing to do: Check your wiring, especially ground and the supply voltage. If that does not help, get yourself the datasheet of the display (the one that you have, not the one you assume you have!). I have had such things before. in my case it was a MAX232 Rs232 level shifter. I wired it up according to the datasheet from Texas Instruments and the output voltage levels were not anywhere near RS232 specifications. Then I got the original datasheet and one of the external capacitors was indeed connected to ground instead of VCC. Now it actually works.
Edit: Have you tried to read something from the display's registers instead of writing? This way you might cut some corners. I would also take a look at the signals with my oscilloscope, but I assume you don't have one just waiting for something to do...
I have lived with several Zen masters - all of them were cats.
His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.
modified 2-Oct-20 14:29pm.
|
|
|
|
|
|
Grrr, yes it is one of those 16 pin interface LCDs. I think you're probably right that it's a bad jumper wire or something. I guess I need to go ahead and order a multimeter. I just overlooked it when i got the kit.
Real programmers use butterflies
|
|
|
|
|
Get yourself the datasheet and take a good look at the pinout of that connector. Never assume anything. Guessing never helps.
I have lived with several Zen masters - all of them were cats.
His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.
|
|
|
|
|
I know that the pinout is a de facto standard 16 pin interface for small LCDs like this. I don't need to assume anything about it. I just need to get it to respond.
A multimeter will help. A datasheet won't solve my current issue.
Real programmers use butterflies
|
|
|
|
|
And some guy in China never heard of your de facto interface or had his own ideas. Are the signals at least labeled on the display's board? That would help a little, even without the datasheet.
I have lived with several Zen masters - all of them were cats.
His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.
|
|
|
|
|
They're labeled, but not in way that's helpful.
Let me put it this way. The LCD is either the standard hitachi interface for it, just like the one the genuine arduino has, or it's just garbage because exactly one person knows how to use it and that's the person that designed it. if that's the case, no datasheet exists.
So datasheets still aren't the solution.
Real programmers use butterflies
|
|
|
|
|
Why don't you make a pic or two and post the links? I think that might help people to help you.
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
Good idea. But I've since dismantled the circuit. I'll try again later today.
Real programmers use butterflies
|
|
|
|
|
*SIGH* What a noob!
honey the codewitch wrote: They're labeled, but not in way that's helpful. You mean unmeaningful stuff like VSS, VDD, V0, RS, RW, E, D0 - D7? These don't tell you anything? Are you painting by numbers (= blindly following some examples)?
VSS is the source voltage, or ground. VDD is your supply voltage (probably +5V). Mess these up and your display will be sending smoke signals and die. Check these.
Vo, if I remember right, is not an input. It's a voltage that's produced in the display from the supply voltage. You are supposed to use a potentiometer to regulate the display's contrast. You should not take my word for it and check this in the datasheet.
RS is a digital input to select one of two registers in the display. What are the registers for? Don't
know, but you can always check the datasheet. In any case, you must make sure that only an output pin of the Arduino is connected here and is set to the correct value (0 or 1), depending on which register you want to access.
RW is the read/write signal, oldschool 6800 style. 1 if you want to read the selected register and 0 if you want to write to it. A datasheet would tell you that. It's another input, so it must be hooked up to yet another output pin of the Arduino.
E is the enable signal, also old 6800 style. It's also an input, so you will need another output pin from the Arduino here.
D0 - D7 are your eight data bits. You will need eight bidirectional signals from the Arduino, or if it does not have such data lines, reconfigure these I/O pins to the right direction for every access of the display. Here you can easily send both the Arduino and the display to east hyperspace when you read from the display and the Arduino's I/O pins are still set to be outputs. Here you should read up on how the Arduino handles bidirectional parralel data lines and make sure that such a collision never happens. Short two outputs together and you get a nice short circuit which will fry a few transistors and permanently damage your devices.
A and K are simple. They are the anode and cathode of the LED that lights the display. You only need to hook them up to +5V and ground with a resistor to limit the current. Which value? Ask the data sheet. It will tell you the maximum current that is allowed and Ohm's law will tell you the rest. Just guessing, but a typical single LED works nicely with a 470 Ohm resistor in series. I have some that survived more than 40 years that way.
I have lived with several Zen masters - all of them were cats.
His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.
|
|
|
|
|
A lot of that jibes with what the schematic suggested. I think you're right about V0 for example.
The short answer is no, I don't know what I'm doing. I used to build simple circuits when I was little. After that I took up programming. I've never taken classes or read books about this.
Eventually I got this Arduino and here I am. So I'm learning.
*steps off your lawn*
Real programmers use butterflies
|
|
|
|
|
Ok, let's try it a different way, then.
I assume you use a small breadboard to wire everything up. Ignore the wiring guide for the breadboard. Use a schematic instead, like this one[^]. I hope this is the right one, please check that.
First you should understand howw to use a breadboard[^]. It's not really hard to understand, but you do not want to produce shorts or unwanted connections.
First you hook up the voltages. VSS or GND are ground, VCC, VDD or +5V are typically supply voltages. V0 is a special voltage that is provided by the display. It's an output, not an input, so you do not have to worry about it right now. You must be very careful with voltages. You can really fry your hardware when they are reversed. Double and triple check everything before ever switching it on.
Now you can take care of the backlight. Here you can do less harm, but you have the additional complication of having to use external potis and resistors. Just follow the schematic and check your wiring then it will be ok. The A and K signals might also be labled as LED+ and LED-.
RW is simply tied to ground (aka VSS). That means you can only write to the display and not read anything. That's good, because this way the display will never use D0 - D7 as outputs and a collision with the Arduino's I/O pins is impossible.
The Arduino does not have the old 6800 bus signals. It's a microcontroller that has to emulate these signals on its general I/O pins. Let's assume for now that the little software library you have does this correctly. On the hardware side it's relatively simple. You must hook up the right Arduino signal to the right signal of the display, as shown in the schematic. On the Arduino side you will have signals named D0 - D(whatever). These are the general I/O pins. They have nothing to do directly with D0 - D7 on the display. Don't confuse them. They are different signals that just happen to use similar naming conventions. Just follow the schematic and the labels on the connectors. Do not go by pin numbers, because they may not be as standardized as we would like them to be. Once you have wired up the display's RS, E and D0 - D7 signals to the right Arduino signals you are almost done.
Last thing to do: Check everything. This is debugging. Question everything, rethink everything and make sure that everything as it should be. Assume nothing. Just like debugging software.
Good luck.
I have lived with several Zen masters - all of them were cats.
His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.
modified 2-Oct-20 20:23pm.
|
|
|
|
|
Thank you! This is even more than enough information for me to tinker with. I greatly appreciate it.
Real programmers use butterflies
|
|
|
|
|
I don't want to spoil your fun, but this is not playing with Lego and it will never be. It's programming and you know how far cut and paste solutions will get you. The real trophy here is not getting that display to work. It's learning why it does not work right now and learning from it. You should know how addictive that can get once you get a taste of accomplishment. Just ask Tom Hanks[^].
I have lived with several Zen masters - all of them were cats.
His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.
|
|
|
|
|
I'm not doing cut and paste solutions. I'm learning. There's a difference. Understand the difference.
Edit: I'm not done. If I wanted a copy and paste solution I would have asked someone for that. I never did. I asked about a way to test a device i suspected i broke (or came broke) for signs of life. If anything I'm debugging.
I did not ask you to develop a monitor for my father in law's pump house. If I had wanted a cut and paste solution I would have asked for that.
Instead, you didn't even know what I was building.
I don't know where you got that, and frankly, it was offensive. I am working with a kit that came with no instructions, no labels, and in an area where I haven't had any practice since 1986 when i was a small child.
I've already build several working widgets with this. I just wanted to know a way to figure out if I broke the LCD or not. That's all I was asking for.
Sincerely, thank you for you help with that. But you can keep your most recent comment.
Real programmers use butterflies
modified 3-Oct-20 8:01am.
|
|
|
|
|
I don't now what specific device you're talking about, as you only specified "16 pin"; some identification could have been useful, or even a link to the thing you bought.
However, most low-end LCD displays include a control chip that is either a Hitachi HD44780 or some derivative thereof. It has been launched over 30 years ago, it got its own Wiki page here[^] and you can find its complete datasheet everywhere[^].
I used it a couple of times, but that was long ago (using 8-bit microcontroller and assembly code); I can't remember but I would expect the backlight to be working as soon as you apply 5V to the appropriate pins with a double caveat:
My best guess is you already killed the backlight, either by applying a reverse voltage, or by not including a series resistor; some if not all such LCD displays need a resistor in pin 15, and yes there are Youtube-quality instructions that don't show that. But this one does.[^]
Anyway the best way to test is by properly connecting everything up, and sending the appropriate commands and data. A library is not essential, you could perform each of the steps required using simple instructions, even when the backlight isn't working (use incident light at an angle of some 45 degrees). It is all a matter of sending some bytes to some addresses (which is true for all software of course).
Using the Arduino "LiquidCrystal" library can make it a little easier: Example (warning: the essential resistor is lacking here!)[^].
PS: You can't just try and retry until it works, your hardware deteriorates when maltreated so you better get it mostly right from the start. It ain't software, it is called hardware for a reason.
Luc Pattyn [My Articles]
If you can't find it on YouTube try TikTok...
modified 2-Oct-20 15:39pm.
|
|
|
|
|
Luc Pattyn wrote: is either a Hitachi HD44780 or some derivative thereof
Yes, this is it. I didn't know the model number. I just knew the interface was a hitachi type and it's used by a lot of these displays.
I was trying to use LiquidCrystal with it. Oh well, if I can't get it to work I can always buy the one that uses that 3 wire arduino serial interface (I2C? i forget what it's called)
I'm not sure if I trashed it, as I didn't set it up randomly. I carefully followed the instructions on arduino's site and triple checked it, so while it's not impossible that I wrecked it, there's a good chance i didn't - or at least it may have been dead when i got it.
Real programmers use butterflies
|
|
|
|
|
Did you or didn't you include a resistor?
Most I2C models basically are the 16-pin version plus an extra board (example[^]) which takes care of and makes it harder to destroy the backlight
The extra board[^] is also available separately!
You would probably also want another library[^] then.
Luc Pattyn [My Articles]
If you can't find it on YouTube try TikTok...
|
|
|
|
|
It did indeed have a resistor. Cool - i figured it worked something like that but i didn't know you could get the board separately. Thanks.
Real programmers use butterflies
|
|
|
|
|
If you had the resistor in place from the start, that strongly reduces the probability you wrecked the display; so either it was broken already, or it is still OK and your observations are flawed.
I did mention the existence of the separate I2C convertor, I did not intend that as a suggestion; when in doubt about the state of the current display, maybe just replacing it is a better idea than adding to it.
Or doing some more tests: If you connect the current display, you could try writing and reading its registers, even when no crystals are seen moving. First step though would be to check the power pins (you have ordered a multimeter by now I hope), a resistor plus a LED could suffice to check anything is present between the GND and 5V pins.
Luc Pattyn [My Articles]
If you can't find it on YouTube try TikTok...
|
|
|
|
|
Yes I have ordered one. And I can by with an LED+resistor for now. Someone else gave me a good breakdown of what the pins did. Seemed maybe I frustrated them for being a noob , but at least I learned something.
Real programmers use butterflies
|
|
|
|
|
I use a 4x20 LCD display from Parallax. It only has 3 pins: power, ground, receive. Sounds completely different from a 16-pin Hitachi.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
Yeah it sounds like you're using that little 3 pin serial bus popular with arduino devices. This is a more general device, but it can and should work with arduinos, and has shipped with arduino kits in the past. the little serial bus one like you're using is an alternative. A good one, but it didn't come with my kit.
Real programmers use butterflies
|
|
|
|
|
Way down the list I seen that someone mentioned HD44780 with some links. This is the link I used to get things going. I found a box of these surplus at $1 or something a bunch of time ago, but all the connectors are reversed like the connector is on the wrong side of the board....but once I got that figured out, I got it going....
And the site that helped me get going with it.[^]
Good luck and enjoy.
|
|
|
|
|
Thanks
Real programmers use butterflies
|
|
|
|