Click here to Skip to main content
15,891,943 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: So my little arduino clone is fun but I was wondering something Pin
David Crow2-Oct-20 10:08
David Crow2-Oct-20 10:08 
GeneralRe: So my little arduino clone is fun but I was wondering something Pin
honey the codewitch2-Oct-20 10:40
mvahoney the codewitch2-Oct-20 10:40 
AnswerRe: So my little arduino clone is fun but I was wondering something Pin
Robotek232-Oct-20 11:10
Robotek232-Oct-20 11:10 
GeneralRe: So my little arduino clone is fun but I was wondering something Pin
honey the codewitch2-Oct-20 11:34
mvahoney the codewitch2-Oct-20 11:34 
AnswerRe: So my little arduino clone is fun but I was wondering something Pin
_WinBase_4-Oct-20 22:37
_WinBase_4-Oct-20 22:37 
AnswerRe: So my little arduino clone is fun but I was wondering something Pin
Member 148590765-Oct-20 2:54
Member 148590765-Oct-20 2:54 
AnswerRe: So my little arduino clone is fun but I was wondering something Pin
Matt McGuire5-Oct-20 5:07
professionalMatt McGuire5-Oct-20 5:07 
AnswerRe: So my little arduino clone is fun but I was wondering something Pin
Peter Shaw6-Oct-20 9:41
professionalPeter Shaw6-Oct-20 9:41 
Whenever you work with something like this, always look for the "Data Sheet" they are the source of all truth no matter what any user guides you get with the product say.

In your case, this is the one you need:

https://www.sparkfun.com/datasheets/LCD/HD44780.pdf

The HD44780 is the driver chip (Probably under a blob of black rubber) on the back of the display, and 99.9% of all this types of display use that driver chip.

Even the 3 wire I2C ones use that driver chip, they just put a multi port I2C GPOI chip (Such as an MCP23017) in front of the Hitachi one and take care of the pin handling for you.

The wiring you need for the display will look something like this:
(https://hacksterio.s3.amazonaws.com/uploads/attachments/1138784/basic_lcd_control_B4wegmYYMt.png)

That diagram is wired for "4 bit mode", these displays can be wired up to work in either 4 or 8 bit mode (The former is to save some connecting wires) in 4 bit mode you have to make 2 writes to the display to send a full byte, otherwise the programming commands (Values of the bytes sent) are identical between both modes.

Also pay close attention to those pre made boards you get with the kits, they are often wired from right to left, rather than left to right. This means that "Bit 0" of your 4 or 8 data pins is actually right most (Like in the diagram above) and bit 7 is left most.

Once you have your power hooked up, and your data lines, you need to pay close attention tot he 3 lines marked 'RS', 'R/W' and 'E'

The RS line is called register select and is toggled to a 1 or a 0 depending on what your sending to the display. If your sending a command byte (as described in the data sheet) EG: enable display, turn cursor on/off, set 4/8 bit mode etc then you need to be sending 0v on this line BEFORE you write the command byte.

If your sending a byte of data EG: a letter to display on the LCD, then 'RS' MUST be set to +5V

Your R/W line is the "Read NOT write line", pay close attention tot he fact that there is a vertical bar drawn over the top of the letter.

This vertical bar means that the signal is what's called "Active Low", or in laymans terms "it does something when it's held at 0v", in our case when the signal is "High" (+5v logic) then the signal tells the device to be in "Read Mode" for all of the 8 data bus lines, and when it's "NOT write" it's in write mode.

Why does this display have a read mode? Well LCD displays using this chip can read the letters entered from CG ram on the device, so you can actually use them as a single line input text console. The Cobalt RaQ3 Web server for example used this to great effect to allow the user to input things like the IP address of the server when setting it up, using no more than a simple 4 way up-down/left-right d-pad switch.

If your NOT planning on using this display for input and ONLY display (Which is pretty much the most common) then connect this line to your 0v supply ground line, and that will place the device permanently into "Write Mode" and you won't have to worry about syncing that signal.

Lastly we have the 'E' signal, this line is more of a strobe signal than anything else, this signal should be held at 0v for most of the time, the only time it goes to logic 1 (+5v) is once you have the data pins, and R/W + RS lines set up and ready to go.

Once all the other lines are ready, you toggle this to +5V, wait a mill second or two then toggle it back (The delay depends on the speed of your device and a lot of other conditions), some experimentation here will be needed. You will need to toggle this line once for every byte (date or instruction) you send to the LCD, if you do not the driver chip WILL NOT look at your signals and act on them.

The DX (0 to 7) lines are your 8 bit data interface, you send the bit patterns for the bytes you wish to send on these lines.

The power on these devices is quite easy, but you do need to be careful, as others have pointed out it's easy to get them reversed and "pop" a device, although if I'm honest, I've yet to kill one by getting the power wrong, they are quite surprisingly tough little displays most of them.

That said, there are often 2 different power supplies to hook up.

On ALL the ones I have, I have 2 separate +5/0v pins for the back light AND the device operation.

You can power the device just from the two power pins on the right, but without the backlight powered it can often be difficult to see what's on the display, this is where "OLED" versions of these displays are better, because they don't require a separate backlight given that they are self illuminating.

The remaining one that people are saying "needs a variable resistor" doesn't actually NEED one per say, but it does help.

This final pin is your contrast control, and needs a voltage any where between 0v and +5V, the closer to 0v the voltage is, the lighter the display is. What I often do is just hook this line directly to my +5V line, thus giving out maximum contrast/darkness, and ensuring I'm able to see something, then once I have it working and my code works, then I either put a fixed value in, something like 4.7k to get it roughly half way, or I'll put a small 10k trimming pot of some kind in.

Needless to say ALL of this is much easier on a bread board, if your going to do a lot of experimenting like this I highly encourage you to get some decent bread boards and some good quality du-pont hook up wires.

Hope that lot helps

Shawty

PS: I do Arduino, rPI, and Bare back AVR & MCP/PIC Microcontrollers, and the .NET book I'm on writing (when I get it finished) will have a section on .NET IoT using the .NET Core IoT libs (Well if I can get the code stable it will anyway) Smile | :) feel free to hit me up on twitter if you want to ask anything "@shawty_ds"
AnswerRe: So my little arduino clone is fun but I was wondering something Pin
Chad3F6-Oct-20 13:08
Chad3F6-Oct-20 13:08 
AnswerRe: So my little arduino clone is fun but I was wondering something Pin
Luc Pattyn9-Nov-20 6:08
sitebuilderLuc Pattyn9-Nov-20 6:08 
GeneralRe: So my little arduino clone is fun but I was wondering something Pin
honey the codewitch9-Nov-20 6:11
mvahoney the codewitch9-Nov-20 6:11 
GeneralHas Win 10 Task Mangler changed... Pin
glennPattonWork32-Oct-20 4:41
professionalglennPattonWork32-Oct-20 4:41 
GeneralRe: Has Win 10 Task Mangler changed... Pin
Gerry Schmitz2-Oct-20 4:55
mveGerry Schmitz2-Oct-20 4:55 
GeneralRe: Has Win 10 Task Mangler changed... Pin
OriginalGriff2-Oct-20 5:43
mveOriginalGriff2-Oct-20 5:43 
GeneralRe: Has Win 10 Task Mangler changed... Pin
glennPattonWork32-Oct-20 6:19
professionalglennPattonWork32-Oct-20 6:19 
GeneralThought of the Day Pin
OriginalGriff2-Oct-20 4:36
mveOriginalGriff2-Oct-20 4:36 
GeneralRe: Thought of the Day Pin
Daniel Pfeffer2-Oct-20 5:00
professionalDaniel Pfeffer2-Oct-20 5:00 
GeneralRe: Thought of the Day Pin
megaadam2-Oct-20 5:06
professionalmegaadam2-Oct-20 5:06 
GeneralRe: Thought of the Day Pin
rnbergren2-Oct-20 5:43
rnbergren2-Oct-20 5:43 
GeneralRe: Thought of the Day Pin
W Balboos, GHB2-Oct-20 6:21
W Balboos, GHB2-Oct-20 6:21 
GeneralChange signature Pin
pkfox2-Oct-20 3:37
professionalpkfox2-Oct-20 3:37 
AnswerRe: Change signature Pin
ZurdoDev2-Oct-20 3:40
professionalZurdoDev2-Oct-20 3:40 
GeneralRe: Change signature Pin
pkfox2-Oct-20 3:48
professionalpkfox2-Oct-20 3:48 
GeneralRe: Change signature Pin
  Forogar  2-Oct-20 3:40
professional  Forogar  2-Oct-20 3:40 
GeneralRe: Change signature Pin
pkfox2-Oct-20 3:49
professionalpkfox2-Oct-20 3:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.