Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Blinking my very first led, LCD ?

Status
Not open for further replies.

joshua17ss2

New Member
I recieved my new pickit2 in the mail the other day and hooked it up to my protoboard, and was able to blink my very first led with the Pic 18f2550, There really is quite a sense of accomplishment in that small task :)
Now im gonna shoot for displaying text on an lcd and accepting inputs from buttons,


I was wondering, i have a 4x16 lcd display, i know that 2x16 displays get connected up with 4 wires for the data and a few other for CLS, R/S, E, ect...
is there a different connection setting for a 4 x 16, does it require more wires or does the lcd driver handel that aspect of it?

thanks
josh
 
joshua17ss2 said:
is there a different connection setting for a 4 x 16, does it require more wires or does the lcd driver handel that aspect of it?
Same connections. They pretty much all use the same driver chip, and internally are the same display. The different display widths and number of lines are just "windows" onto the actual display, which is the same size in all 44780 driven LCDs. Just imagine you're looking thru a small window onto a larger display. You can only see what's under the window at any given time, but you can move the window to see the rest with the right commands. Or you can just tell the LCD to print stuff in the part of the display that's under the window.

Confused yet? You will be! But then it'll make sense. :D
 
So the only change between the small lcd and the larger a line in the code right, WriteAt(1,1,"Test") so i would just change the 1,1 to what ever space i need to write at?
 
joshua17ss2 said:
So the only change between the small lcd and the larger a line in the code right, WriteAt(1,1,"Test") so i would just change the 1,1 to what ever space i need to write at?
Line 1 and line 2 (I think) always start at the same address, so if you want to print to line 1 you tell it to go to that address and print away. If you exceed the width of the display it prints into undisplayed memory. Once you exceed the undisplayed width of line 1 (40 characters? - can't remember) then the text will show up in line 2.

For an excellent guide, get these two PDFs from EPE:
https://www.electro-tech-online.com/custompdfs/2008/05/lcd1.pdf
https://www.electro-tech-online.com/custompdfs/2008/05/lcd2.pdf
They're a must-read if you're learning LCDs.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top