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.

16 x 1 LCD Display

Status
Not open for further replies.
It was as 1 line (command 0x30). Now changed to 0x38. Still same problem continues. I doubt whether this is a defective piece since 8 to 16 didn't change with contrast (when supply alone is given) while 0 to 7 became black boxes.

Sorry for asking a question which was answered earlier in this forum. But I couldn't locate that answer. Question is that there is a way to give variable delay to the LCD unit (instead of giving fixed delay) by monitoring the status of some pin or so. What is that method?
 
Sorry for asking a question which was answered earlier in this forum. But I couldn't locate that answer. Question is that there is a way to give variable delay to the LCD unit (instead of giving fixed delay) by monitoring the status of some pin or so. What is that method?

Yes, consult my LCD PIC tutorial, the last one does just that.
 
I couldn't locate the answer. Is it by checking DB7? Can somebody explain a little?

hi,
Look at this image.

When the PIC is writing to the LCD D0 thru D7 are outputs from the PIC.

To read the status of the BUSY bit D7, the PIC pin connected to D7 must be switched to the READ state ie: input.

So the sequence could be.
loop:
Read the state of D7, if BUSY then keep waiting till /BUSY. You must also set the R/W pin on the LCD to READ
Set the PIC to write, write the data or command to the LCD. You must also set the R/W pin on the LCD to WRITE

Keep repeating this 'loop' until all the data or commands are written to the LCD.

You should test the BUSY bit every time before you WRITE to the LCD.

Do you follow OK.?:)
 

Attachments

  • Busy1.png
    Busy1.png
    56 KB · Views: 142
Last edited:
hi,
Look at this image.

When the PIC is writing to the LCD D0 thru D7 are outputs from the PIC.

To read the status of the BUSY bit D7, the PIC pin connected to D7 must be switched to the READ state ie: input.

So the sequence could be.
loop:
Read the state of D7, if BUSY then keep waiting till /BUSY. You must also set the R/W pin on the LCD to READ
Set the PIC to write, write the data or command to the LCD. You must also set the R/W pin on the LCD to WRITE

Keep repeating this 'loop' until all the data or commands are written to the LCD.

You should test the BUSY bit every time before you WRITE to the LCD.

Do you follow OK.?:)

Yes. Thanks a lot. Earlier I gave a constant delay. I will try this method (later since I am busy with something else now).:)
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top