All About Circuits Forum  

Go Back   All About Circuits Forum > Electronics Forums > General Electronics Chat

Notices

General Electronics Chat Discussion forum for general chat about anything electronics related, including asking questions about material in the All About Circuits E-book, Worksheets, and Videos.

Reply   Post New Thread
 
Thread Tools Display Modes
  #1  
Old 06-03-2011, 05:18 AM
Maged A. Mohamed Maged A. Mohamed is offline
Junior Member
 
Join Date: Apr 2011
Location: Cairo,Egypt
Posts: 18
Default Problem with 1x16 LCD

Hi,
I made a simple temperature alarm with 89c52 and LMB161 1x16 LCD
the problem is the LCD displays data on the left 8 locations only, even increasing contrast affects only those locations, while the rest looks not connected.
I tried a small initialization program and manipulated all bits in data sheet, but nothing seems to have any effect on them.
I thought the display is bad so I got from another vendor JHD161A which is the same.
Repeating all steps now using the JHD161A data sheet, the same results

The only time I get full 16 characters, if I cut power then put on quickly several times, it may happen and stays that way as long as power is on, then back to 8 characters again.

I went to the vender asking if anyone solved that problem, he said, they normally buy 2x16 and this display is not sold often.
Please Help
Reply With Quote
  #2  
Old 06-03-2011, 09:01 PM
SgtWookie's Avatar
SgtWookie SgtWookie is offline
Expert Member
 
Join Date: Jul 2007
Location: In the vast midwest of the USA; CST
Posts: 22,030
Default

Your power may be coming up to operating voltage too slowly; so your LCD might be left in an uninitialized state.

You might monitor the state of the power supply, and wait to start communicating with the LCD for at least 15mS after the power is good (close to the normal operating voltage).

Then proceed with the software initialization as documented in the datasheet:
http://www.ram-e-shop.com/ds/lcd/LMB161ABC.pdf
The 8-bit initialization starts on page 13, 4-bit on page 14.

Are you certain of your MCU's clock speed? Are you certain that your timing loops are accurate? You have to delay a number of mS (see datasheet) between each initialization command, and check the busy flag before writing more commands.
__________________
General info:
If you have a question, please start a thread/topic. I do not provide gratis assistance via PM nor E-mail, as that would violate the intent of this Board, which is sharing knowledge ... and deprives you of other knowledgeable input.
Reply With Quote
  #3  
Old 06-04-2011, 06:01 AM
Maged A. Mohamed Maged A. Mohamed is offline
Junior Member
 
Join Date: Apr 2011
Location: Cairo,Egypt
Posts: 18
Default

Thanks a lot for replying
Quote:
Originally Posted by SgtWookie View Post
Your power may be coming up to operating voltage too slowly; so your LCD might be left in an uninitialized state.
I used a delay loop before staring the initialization code about 0.5 second as first part in the program, reduced the clock from 4.4M to 3 Meg, even used the reset button to further delay starting, finally reset should start the software initialization, but nothing seem to have any effect
Quote:
You might monitor the state of the power supply, and wait to start communicating with the LCD for at least 15mS after the power is good (close to the normal operating voltage).

Then proceed with the software initialization as documented in the datasheet:
http://www.ram-e-shop.com/ds/lcd/LMB161ABC.pdf
The 8-bit initialization starts on page 13, 4-bit on page 14.

Are you certain of your MCU's clock speed? Are you certain that your timing loops are accurate? You have to delay a number of mS (see datasheet) between each initialization command, and check the busy flag before writing more commands.
I used the timing provided by Batronix designed for 12 MHz clock on my 3 Meg clock and further increased the loop count to increase the time , not you see the display write a character them moves to next as a long periodes
The only thing I will do is as you said check the busy flag, it may have unlisted feature that helps

Best regards and thanks
Reply With Quote
  #4  
Old 06-04-2011, 02:06 PM
ErnieM's Avatar
ErnieM ErnieM is offline
Senior Member
 
Join Date: Apr 2011
Location: Lon Guyland, Noo Yawk
Posts: 5,190
Default

OK, so HALF the display works normally? You send some text and that exact text appears? That does not sound like a timing problem or a hardware problem.

I know on some of the 4x20 displays I used in the dim past there were gaps in the memory where the character codes were stored. So perhaps try just sending letters to the display to every address possible by letting the address pointer increment along.

I'm thinking perhaps the manufacturer uses an 8 by 4 display driver, so the second half of the line is not in a continuous memory location.


Note: I think I found a reference to same problem here.
Reply With Quote
  #5  
Old 06-04-2011, 02:29 PM
Maged A. Mohamed Maged A. Mohamed is offline
Junior Member
 
Join Date: Apr 2011
Location: Cairo,Egypt
Posts: 18
Default

Thank you very much,

1st it seems that every display number have different memory locations for display, I have 3 different sets now, I will try this new set. I used a continous writing program but did not access the 2nd 8 locations.

2nd I may find the solution in this link you provided, i.e. sending command for a second line

I will try and report back

Best regards and thanks again very much
Reply With Quote
  #6  
Old 06-08-2011, 06:01 AM
THE_RB's Avatar
THE_RB THE_RB is offline
Senior Member
 
Join Date: Feb 2008
Posts: 5,222
Default

Lots of old 1x16 displays have the characters set up as 2x8.

If you use code from a driver that runs 2x8 display or 2x16 it will work fine.

If you want to modify your code, the second 8 characters start at the second display line. The hex address for the start of the second line (I can't remember) but it is shown in the 44780 datasheet.
__________________
Roman Black - PICs and electronics. Author of BTc PIC-sound encoder, Shift1-LCD project, the TalkBotBrain talking PIC controller, LiniStepper open-source microstepping motor driver, the Black Regulator 2-transistor SMPS, and probably some other stuff; www.RomanBlack.com
Reply With Quote
Reply   Post New Thread

Tags
, ,


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem connecting LCD to PIC YazanJuve General Electronics Chat 4 12-29-2009 09:43 PM
lcd problem kppp Embedded Systems and Microcontrollers 2 02-09-2009 02:10 PM
help......problem with lcd h.d Embedded Systems and Microcontrollers 2 03-11-2008 07:55 PM
LCD graphic display problem electronics wiz General Electronics Chat 5 03-18-2007 03:37 AM
LCD Problem allied General Electronics Chat 2 03-17-2007 04:00 PM

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:35 AM.


User-posted content, unless source quoted, is licensed under a Creative Commons Public Domain License.
Powered by vBulletin
Copyright ©2000 - 2014, vBulletin Solutions, Inc.