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.

LCD, Picbasic and 16F627

Status
Not open for further replies.

Adam

New Member
Wired up lcd as in picbasic manual, used this program:

Code:
@ device INTRC_OSC_NOCLKOUT
cmcon = 7
DEFINE OSC 4 

Lcdout $FE, 1 
PAUSE 500 

LCDOUT $FE, 1, "Hello"

It doesn't display anything on the lcd, i've checked th pic is working by having it blink the backlight on and off.

Anything I've missed?

The only thing I can think of is that the LCD might not be Hitachi 44780 compatable, it came out a parts box, but had the right number of wires, and the backlight connections are the same as a Hitachi 44780 (I know because it lights up), are there loads of other 'standards' for LCDs, or not really?
 
Adam said:
Wired up lcd as in picbasic manual, used this program:

Code:
@ device INTRC_OSC_NOCLKOUT
cmcon = 7
DEFINE OSC 4 

Lcdout $FE, 1 
PAUSE 500 

LCDOUT $FE, 1, "Hello"

It doesn't display anything on the lcd, i've checked th pic is working by having it blink the backlight on and off.

Anything I've missed?

The only thing I can think of is that the LCD might not be Hitachi 44780 compatable, it came out a parts box, but had the right number of wires, and the backlight connections are the same as a Hitachi 44780 (I know because it lights up), are there loads of other 'standards' for LCDs, or not really?

They are almost all standard, it's exceedingly rare to find one which isn't. Do you have the contrast control wired up correctly, if that's connected correctly you can turn the contrast up and get a single line of solid blocks even without having it connected to a micro.

Some very old LCD's require a negative voltage on the contrast pin, and won't work without it - I've never seen one, but in a recent thread somebody had one.
 
Thanks, I messed around with the contrast pin and got it working :D

The diagram had shown a 20k pot connected between positive and negative with the wiper to the contrast pin, I did not have a 20k pot so did the following,

Code:
(+) -----+--|22K|---+-----+-----+---|22k|---+-------(-)
         |          |     |     |           |
         ---|22K|----     |      ---|22k|---- 
                          |
                           --------(contrast pin)

To approximate a 20K pot set halfway (well really a 22K pot), thinking that it might be a bit hard to read, but I should see 'something'.

Connecting contrast pin straight to negative resulted in all the blocks turning black, I found that connecting via three 1k resisters in series to negative gave a reasonable contrast.

Thanks

Thread solved
 
Adam said:
The diagram had shown a 20k pot connected between positive and negative with the wiper to the contrast pin, I did not have a 20k pot so did the following,

There's no need to get carried away with paralleling resistors, the pot value isn't at all critical - I used a 5K pot in my tutorials. Using just two 22K should be fine - but it's far better to use a preset, the contrast is temperature dependent, so being adjustable is a good idea.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top