PIC16+Parallel lcd - by twitchy

Status
Not open for further replies.

Nigel Goodwin

Super Moderator
Most Helpful Member
Sorry twitchy, I'm having ADSL problems at the moment, and I accidently deleted your post instead of approving it!, so I'm re-posting it for you - moderator.

I want to use pic16f877 with a parallel lcd display (those based on hd44780). I use a schematic very similar to this one : , as you can see the pic is connected directly to the display pins. A friend argued with me, that i needed some current limiting resistors in order for the lcd to work , yet i saw quite a few schematics using that kind of LCD in which the PIC was wired directly to the LCD. I suppose the controller integrated in the lcd is fine with those kind of currents, but i still wonder, do i need any resistors to limit the current in my case ? Also can you suggest a parallel lcd with a nice datasheet, that has some electrical details about the display, most of the stuff i found only has physical dimensions and nothing else ?
 
Bad practice to reply to your own post! - but it wasn't really my post

Check my tutorials twitchy, they show how to connect an LCD to a PIC, and give full working source code - it's fast, it's reliable, and it's in use by many users all round the world. You don't need any current limiting resistors or anything because it's a simple logic connection, nothing else is required - no current is involved, at least none worth mentioning!.
 
Hi,
I have never used LCD display before. I see most of the design is using 4 bit, so 4 pins of the LCD display are not used. From Nigel's tutorial, if I have enough output pin and wish to use 8 bit, what I don't need to do is sending the upper 4 bits followed by the lower 4 bits, right?
Besides, the hex table in the tutorial, is it the hexadecimal representation of the character of the LCD display?
Just started to learn and will get one after my final exam


Thanks
 

Yes, the ASCII characters are stored in the display module - it's FAR better to use 4 bit than 8 bit though, generally it's important not to waste I/O, and there's no real speed difference.
 
Electrical characteristics of 44780-based LCD's can be found in the datasheet of the controller. Search in Google for "HD44780 datasheet" and it will give you plenty of results on this.
 
A bit OT but Nigel, what is the point in 8 bit data for LCD's? Why is it used now days. As you said, it gives no speed advantage (only very little) and takes almost double the pins on the controller.
 
bloody-orc said:
A bit OT but Nigel, what is the point in 8 bit data for LCD's? Why is it used now days. As you said, it gives no speed advantage (only very little) and takes almost double the pins on the controller.

I presume it's only included nowadays because the HD44780 spec requires it?, presumably it was originally ONLY 8 bit (before it was called the HD44780), and the 4 bit option was added later to minimise the pins required.

Certainly when I originally wrote my LCD routines I intitially wrote them as 8 bit, until I actually managed to get a working display - then I converted it to 4 bit mode. 8 bit is certainly slightly easier to write, but it's not a very practical solution.
 
As I know, the character can be created by the user, I don't remember where but I've read this somewhere.

From my understanding, the program codes for 4 bits and 8 bits have only very little difference. Besides, user need to call the LCD command only if there is any changes to the display.
 
Thanks for the re-posting, i thought i did something wrong when posting You wrote really good tutorials, Nigel . Also i downloaded the hd44780 datasheet as suggested by eng1 . As i read in Nigel's tutorials i really don't need any resistors and I saw similar wiring in other tutorials. I needed to ask, because that friend of mine, told me that connecting the LCD directly would severely damage the display, i told him that so many people are using this, but he wouldn't beleive me. Thank you very much for your help.
 
I've seen a few LCD displays that use a 3.3 volt interface - but these are very few and far between.

All the HD44780 I've ever bought and used have been 5v - I think its some of the OLED displays that seem to run on weird voltages.
 
twitchy said:
I needed to ask, because that friend of mine, told me that connecting the LCD directly would severely damage the display, i told him that so many people are using this, but he wouldn't beleive me.

If you are experimenting with LCD using codes you write yourself, then there is a possibility(with wrong codes) that you set the LCD module to output something but your port pins are also set to output. In this case, without the resistors, you will damage the LCD.
 
twitchy said:
I needed to ask, because that friend of mine, told me that connecting the LCD directly would severely damage the display, i told him that so many people are using this, but he wouldn't beleive me.

You can tell your friend he doersn't have the slightest idea what he's talking about!

You might suggest he trys reading the manufacturers datasheets?.
 
This inexpensive 24x1 LCD is hardwired for 8 bits.
**broken link removed**
 
3v0 said:
This inexpensive 24x1 LCD is hardwired for 8 bits.
**broken link removed**

But that doesn't appear to be an HD44780 type display?, and presumably it's a seriously old device, with the datasheet giving connection details for a Z80
 
It uses the HD66717 which is not hard to use.
The page has a simplified instructions on how to talk to it.

EDIT: IIRC I used a modified version of the HD44780 code to interface to it. Changed the init section and 4 to 8 bits. Not exactly sure about the details.

Once I was sure it worked I had the class write the interface code from scratch. Was not a problem.
 
Last edited:

No, it looks like a forerunner of the HD44780, before they added the 4 bit mode.
 
They are not quite that old and the command set is not compatiable with the HD44780. For people looking for a HD44780 they are not an option.

The controller can work in I2c, 4bit, and 8 bit modes but the actual device has the controller buried under an epoxy blob that makes it nearly impossible to use anything but the 8 bit mode. That and the .05 inch connector pitch is why the are under $2 each. There is a mod to put it in the I2C mode but the epoxy blob covers the trace that needs cutting on the units I have.

In quan 10+ they are $1.50 and for about 50 cents you can add a pair to 74HC595s to drive it with 3 lines.

It is not a great display but where it is sufficient it is a bargain. I picked up 20 of them for use on controllers that would otherwise be faceless.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…