• 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.

I have an error in writing on the LCD 2*16 by using PIC16F877A by microc

Status
Not open for further replies.

mooos

New Member
Hi
I have a problem in writig on the LCD
I have to write in my project about 20 texts on the LCD 2*16 and each text is about 14 character. The problem is that it writes only 10 texts and it doesnt write the other 10 but I dont get any errors in the microc after building the project but it doesnt display the other text in the Oshon compiler and on the actual LCD.
I found that if I decrease the number of the characters in each text it may fit more than 10 texts.
But I need to write the whole texts that contains 14 char each, so can anyone help me please as soon as posible.
 

ericgibbs

Well-Known Member
Most Helpful Member
Hi
I have a problem in writig on the LCD
I have to write in my project about 20 texts on the LCD 2*16 and each text is about 14 character. The problem is that it writes only 10 texts and it doesnt write the other 10 but I dont get any errors in the microc after building the project but it doesnt display the other text in the Oshon compiler and on the actual LCD.
I found that if I decrease the number of the characters in each text it may fit more than 10 texts.
But I need to write the whole texts that contains 14 char each, so can anyone help me please as soon as posible.
hi,:)
Post your code and I'll run in thru my Oshon OK.
Whats the LCD type.?
 

tresca

Member
Just a thought, but are you going to a new line per text and then back to the origin ?
I believe the HD47780 driven LCDs address go from 0x00 to 0x27 and then line 2 begins at address 0x40 to 0x67.

A 16x2 character lcd is visible only between address 0x00-0x0f and 0x40-0x4f

If you writing your texts consectively, then your first text would appear, then your second text would be outside the visible region. Text 3 would appear on the second line, text 4 would be invisible.

If you able to only see 10, out of 20 texts, then it seems that the missing 10 are outside the visible address locations.

Make sure you are going to a new line(address 0x40) or back to the beginning(address 0x00).

If thats not it, post your code and someone will be able to help.
 
Last edited:

mooos

New Member
Thank you so much ericgibbs and tresca I solved the problem. The problem was that I had to make a function to clear the buffer after each display and I made it.
Thank you so much : )
 
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading

 
Top