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 CCS Technical Support

LCD test source code?
Goto page 1, 2  Next
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
fushion3



Joined: 28 Sep 2006
Posts: 24

View user's profile Send private message

LCD test source code?
PostPosted: Thu Apr 08, 2010 9:46 am     Reply with quote

I'm sure this has been done many times, but I can't find a search function on the site, so I'll ask for any LCD test source code for an 16F877A using a 4X20 LCD. Thanks in advance!
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Thu Apr 08, 2010 10:00 am     Reply with quote

Quote:
I can't find a search function on the site
See "Search" on top of each page, just under the CCS logo.

Example code can also be found in C:\Program Files\PICC\Examples.
I don't have the compiler here, but it looks something like ex_lcd*.c
fushion3



Joined: 28 Sep 2006
Posts: 24

View user's profile Send private message

PostPosted: Thu Apr 08, 2010 10:09 am     Reply with quote

Yes, I just found the 'search area' once I submitted the post. I was looking for a small "hello World" test for each line of the LCD and didn't want to write something if its been done a 1000 times before.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Apr 08, 2010 10:45 am     Reply with quote

Look in the Code Library forum. Click on CCS Forum Index in the
upper part of the screen. Then go to Code Library. Look at the Flex
4x20 lcd driver. It has a sample test program.
fushion3



Joined: 28 Sep 2006
Posts: 24

View user's profile Send private message

PostPosted: Thu Apr 08, 2010 1:00 pm     Reply with quote

I read through the sticky regarding the lcd420 driver & code and found you wrote a couple of each and tried them all with no luck. I have even tried grounding the WR lead and still get rows 2 & 4 having solid pixel illumination. I will say, I'm using a plain breadboard and not a CCS test board, but as long as my pin assignments match all should be OK. I am also using an older version compiler, 2.31 or so, but it has worked just fine so far. Any suggestions are welcome.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Apr 08, 2010 1:12 pm     Reply with quote

Post the manufacturer and part number of your 4x20 LCD module.
dezso



Joined: 04 Mar 2010
Posts: 102

View user's profile Send private message

PostPosted: Thu Apr 08, 2010 1:14 pm     Reply with quote

Is your display have 2 "E" line ?
I have not read or checked how is the 4x20 CCS example works, but if you have just a black square's than most likely your LCD has 2x44780 and the second chip not getting initialized at all.

I have 100's Character LCD, 2 Enable line is very common on long"2x80" or tall "4x40"

???


Last edited by dezso on Thu Apr 08, 2010 1:16 pm; edited 1 time in total
fushion3



Joined: 28 Sep 2006
Posts: 24

View user's profile Send private message

PostPosted: Thu Apr 08, 2010 1:15 pm     Reply with quote

I'm using a Goldentek GC2004A0SHN1B
fushion3



Joined: 28 Sep 2006
Posts: 24

View user's profile Send private message

PostPosted: Thu Apr 08, 2010 1:17 pm     Reply with quote

The pinouts are:
1 Vss
2 Vdd
3 Vo
4 RS
5 R/W
6 E
7-14 data
dezso



Joined: 04 Mar 2010
Posts: 102

View user's profile Send private message

PostPosted: Thu Apr 08, 2010 1:28 pm     Reply with quote

yup, that is a ordinary 4x20, GC2004A0SHN1B

My CCS not working and I don't know when I get it up and running again.
It should be simple, check this page to understand how its works, section "2.3.3. 4-line displays".
_________________
I'm could be wrong many time's, at least I know what I'm doing Smile
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Apr 08, 2010 1:32 pm     Reply with quote

Quote:
I am also using an older version compiler, 2.31 or so, but it has worked just fine so far.

I installed vs. 2.314 (I had it on the original floppy) and it won't compile
the Flex 20x4 lcd driver. It doesn't like the 'int8' declarations. Vs. 2.314
is from early 1997. I know that vs. 2.734, which is from early 2001,
does support 'int8'. Did you go through all the code and change 'int8' to 'int' ?

I'm going to be truthful. I don't want to spend the time to convert all
my code to be 2.314 compatible, just to test it.
fushion3



Joined: 28 Sep 2006
Posts: 24

View user's profile Send private message

PostPosted: Fri Apr 09, 2010 6:16 am     Reply with quote

Sorry, I must have dyslexia because the version I have is 3.249 not 2.3 as previously mentioned. Your code compiles with no problems, I just have to place all the includes in the same folder to be able to read them.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Apr 09, 2010 11:15 am     Reply with quote

Look at the links to the schematics in this post. Make sure you have
the LCD connected correctly to your PIC.
http://www.ccsinfo.com/forum/viewtopic.php?t=30026&start=5
fushion3



Joined: 28 Sep 2006
Posts: 24

View user's profile Send private message

PostPosted: Fri Apr 09, 2010 1:35 pm     Reply with quote

Yeah, those are the same as my data sheet on the LCD and I have more than double checked them to make sure.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Apr 09, 2010 2:07 pm     Reply with quote

Quote:

I still get rows 2 & 4 having solid pixel illumination

Post your small, compilable test program. Don't post the Flex driver.
Just include the Flex driver in the test program with an #include
statement. The test program should have an #include for the PIC,
#fuses statement, #use delay(), and a main().
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
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