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 not displaying

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



Joined: 02 Mar 2017
Posts: 6
Location: Kochi

View user's profile Send private message

lcd not displaying
PostPosted: Mon Mar 06, 2017 11:02 am     Reply with quote

Here LCD is not displaying anything, when the contrast is adjusted Dark squares only visible. When checked on Proteus the lcd pins are not ON.

LCD used is 20x4 Character LCD Module (Green), works on 5v.. Jhd204a


The Author of this program is ccs blogspot,
Real time clock with alarm using PIC16F877A and DS1307 RTCC CCS C
[code][/img]


Last edited by sobinstn on Mon Mar 06, 2017 11:48 pm; edited 1 time in total
temtronic



Joined: 01 Jul 2010
Posts: 9198
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Mon Mar 06, 2017 12:43 pm     Reply with quote

Without knowing the LCD module part number....
you should always post that information.

If the LCD does not display anything it might be that the 'contrast' pin is not connected or incorrectly powered. Some need <.5VDC to 'show'.

Also most LCD modules are 5 volts, so be careful if you try to power with 3V it won't work.

Jay
temtronic



Joined: 01 Jul 2010
Posts: 9198
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Tue Mar 07, 2017 5:49 am     Reply with quote

You need to post the code or a link to the actual code. I use 2004 LCD modules all the time now and if you get the black squares, it's good indication the module is OK. I suspect incorrect wiring or wrong pin assignments or bad code. You need to post the code and the LCD driver.
All the hardware is same as I have so they can work together.

Jay
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Mar 07, 2017 6:12 am     Reply with quote

temtronic,
He originally had code from this link posted:
http://ccspicc.blogspot.com/2016/09/ds1307-i2c-rtcc-alarms-set-buttons-circuit.html

And it's not "ccs blogspot", its ccspicc blogspot.
Ttelmah



Joined: 11 Mar 2010
Posts: 19436

View user's profile Send private message

PostPosted: Tue Mar 07, 2017 8:33 am     Reply with quote

I'd add the simple suggestion to add a 0.5 second delay, before calling lcd_init at the start of the code.

It could be the 'old chestnut' of just trying to initialise the LCD too quickly. One classic problem is that different LCD's, and even different batches of the same LCD, take different amounts of time to actually wake up. It could even be that his power supply is being a bit slow getting to 5v. The PIC then starts before the LCD is ready.
sobinstn



Joined: 02 Mar 2017
Posts: 6
Location: Kochi

View user's profile Send private message

lcd not displaying
PostPosted: Tue Mar 07, 2017 11:35 am     Reply with quote

Hii,

That too is not working, i checked it connecting lcd only. Still no.
Only pin D4 is high, all other pins are low.
What that could be ?

Thanks..
sobinstn



Joined: 02 Mar 2017
Posts: 6
Location: Kochi

View user's profile Send private message

lcd not displaying
PostPosted: Tue Mar 07, 2017 11:38 am     Reply with quote

Hii,,

I tried this on proteus, after trying on breadboard.


thanks..
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Mar 07, 2017 11:59 pm     Reply with quote

Black squares means either the contrast voltage on the LCD is wrong (it should be about 0.4 volts), or the LCD is not being initialized.

The most common reasons for the LCD not being initialized are:

1. Incorrect wiring between the PIC and the LCD.

2. PIC not running, or running at the wrong frequency.


There are many threads on lcds with black squares on the forum.
Here is one of them:
https://www.ccsinfo.com/forum/viewtopic.php?t=45292
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