EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

16X 2 LCD with PIC16F684

Started by Sumit Bhatnagar October 23, 2008
I have tried to work with the LCD 16X2 but could not get it to work.
Even with the code from myke predkos book(123 PIC Microcroller
Experiments...).

I doubt there is any problem with the code listed here
http://www.bizto.co.kr/PicEx/cLCD.c


OR

with my circuit. I am not sure what I am missing here, but it will
surely help if someone who has done it has some suggestions.

I am using the MPLAB for programming the chip and have the PICKIT1.

Best Regards,

Sumit.

(My previous message did not get posted . This is also a test message)
Actually, your previous message did get posted, although it only came
through a minute before this one.

If you got anything to work, and its a normal 16x2 LCD, then the problem
isn't your circuit, it has to be software somewhere. In your previous note
you said one row live and the other blank. That is a clue that you are
initializing the LCD to single line, or you are using the wrong address for
the second line. Or (ulnlikely) you just have a bad LCD.

Nothing in your code leaps right out as being incorrect, although I do see a
possible gotcha. DDRAM address changes tend to take more time than some
operations, and it is quite possible that the C compiler is optimizing out
your null loop. The timing on the LCD datasheet is the MINIMUM. Try some
other delay mechanism, even if it is way too slow, and see if that helps.
If it works, then you can work on finding that minimum delay that will work.

72/73 de WB8RCR http://www.qsl.net/wb8rcr
didileydadidah QRP-L #1446 Code Warriors #35
----- Original Message -----
From: Sumit Bhatnagar
To: p...
Sent: Monday, October 06, 2008 6:45 PM
Subject: [piclist] 16X 2 LCD with PIC16F684
I have tried to work with the LCD 16X2 but could not get it to work. Even
with the code from myke predkos book(123 PIC Microcroller Experiments...).
I doubt there is any problem with the code listed here
http://www.bizto.co.kr/PicEx/cLCD.c
OR
with my circuit. I am not sure what I am missing here, but it will surely
help if someone who has done it has some suggestions.
I am using the MPLAB for programming the chip and have the PICKIT1.
Best Regards,
Sumit.
(My previous message did not get posted . This is also a test message)

not sure if i can help i only work in asm.
in 4bit mode i use the upper 4 bit of port for data
and other pot for control bits
are you using a long enough wait on data write
8 mg needs more time than 4mg
if you can use asm i can post my code i use

--- In p..., "Sumit Bhatnagar"
wrote:
> I have tried to work with the LCD 16X2 but could not get it to work.
> Even with the code from myke predkos book(123 PIC Microcroller
> Experiments...).
>
> I doubt there is any problem with the code listed here
> http://www.bizto.co.kr/PicEx/cLCD.c
> OR
>
> with my circuit. I am not sure what I am missing here, but it will
> surely help if someone who has done it has some suggestions.
>
> I am using the MPLAB for programming the chip and have the PICKIT1.
>
> Best Regards,
>
> Sumit.
>
> (My previous message did not get posted . This is also a test
message)
>

can u send r ckt deisign. r u using some driver or not. if not than u have
to .

On Fri, Oct 24, 2008 at 10:25 AM, d70mike wrote:

> not sure if i can help i only work in asm.
> in 4bit mode i use the upper 4 bit of port for data
> and other pot for control bits
> are you using a long enough wait on data write
> 8 mg needs more time than 4mg
> if you can use asm i can post my code i use
>
> --- In p... , "Sumit
> Bhatnagar"
> wrote:
>
> >
> >
> > I have tried to work with the LCD 16X2 but could not get it to work.
> > Even with the code from myke predkos book(123 PIC Microcroller
> > Experiments...).
> >
> > I doubt there is any problem with the code listed here
> > http://www.bizto.co.kr/PicEx/cLCD.c
> >
> >
> > OR
> >
> > with my circuit. I am not sure what I am missing here, but it will
> > surely help if someone who has done it has some suggestions.
> >
> > I am using the MPLAB for programming the chip and have the PICKIT1.
> >
> > Best Regards,
> >
> > Sumit.
> >
> > (My previous message did not get posted . This is also a test
> message)
> >
>

The 2024 Embedded Online Conference