CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

LCD just show grey square

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
winson



Joined: 03 Dec 2008
Posts: 24

View user's profile Send private message

PostPosted: Tue Feb 03, 2009 4:51 am     Reply with quote

Finally the LCD is WORKING!

The problem is in the power supply. The 5V Vdd supply voltage drop to 4.33V when it is connect to the LCD. I was using a battery for the LCD, due to high supply current of the 9V battery, thus have to put a current limiting resistor to limit the current that goes into the LCD, And i think because of the LCD consist of certain amount of internal resistance(from calculation it is around 23.23K ohms), this resistance will form a voltage divider with my current limiting resistor and make the supply voltage to the LCD drop to 4.33V. Normally, for LCD it's Vdd range is from 4.5V to 5.5V in order for it to work correctly.

After adjust the value of the current limiting resistor to get back a Vdd which is around 4.6V then the LCD work nicely. Besides, for the Vo of the LCD i was directly connect it to ground to get maximum contrast, this is to avoid the variable resistor(pot) that use to control the contrast from disturbing the voltage value of the Vdd.

For the send_command() and send_data() function i was modify the code to first load the data to the Port D then toggle the E signal from low to high then goes back to low again. I think it also work by set the E signal to high first then load data to Port D and after that set E to low, but since the LCD is working then i will follow the modified code.

Thanks everybody for giving all the useful information!
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Feb 03, 2009 3:28 pm     Reply with quote

Normally a voltage regulator I.C. is used to avoid this problem.
A voltage regulator will maintain +5.0v within its specified maximum
current limit. The most commonly known type is called LM7805.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group