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 Issues wit6h 16F877

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



Joined: 19 Feb 2004
Posts: 15

View user's profile Send private message

LCD Issues wit6h 16F877
PostPosted: Mon Mar 21, 2005 9:10 am     Reply with quote

Hey all

I made a PCB and among other things it is meant to use 4x20 LCD.

It's all connected to port D, as mentioned in the driver header.
It was showing signs of life for a while until it stopped be rational at all.

Now the signal lines( all 7) are not active any more. I could get them to be active with setting the TRIS before hand manually!

and also the moment I plug the LCD in it stops, my heart beat LED doesn't work anymore.

I tried the LCD and 4x20 LCD driver?!

is there a known issue with the driver?!
_________________
McMaster Solar Car Project
http://www.solarcar.mcmaster.ca
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Mon Mar 21, 2005 10:09 am     Reply with quote

So it was working. Well if you didn't change the code, then it is probably not the code. Probably hardware related. There is no problem with the driver to answer your question.
Guest








PostPosted: Mon Mar 21, 2005 11:30 am     Reply with quote

it was never fully working,

it was just showing some random characters. It might have been due tg some wiring issues, but now it doesn't do anything.


Does it somehow check for the presence of the LCD before it tries to contact it? I guess not, but without the LCD plugged there is no signal on the LCD lines!!!
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Mon Mar 21, 2005 11:55 am     Reply with quote

Try this code out:
Code:

#include <16F876.h>
#fuses HS,NOWDT,NOPROTECT,NOLVP
#use delay(clock=20000000)


#include <lcd.c>


void main() {

   lcd_init();

   lcd_putc("\fReady...\n");

   while (TRUE) {
   }
}


Note that you will need to subsitute you clock value if you are not at 20MHz.
jbmiller
Guest







lcd not working
PostPosted: Mon Mar 21, 2005 2:48 pm     Reply with quote

Sounds like a hardware problem. Perhaps the pinout/header for the LCD was reversed(odds vs even pins). If you need local support, I'm over in Dundas and have a PS+ and several F877s lying around.
Jay
jbmiller@cogeco.ca
Guest








PostPosted: Fri Mar 25, 2005 12:16 am     Reply with quote

This ended up being a software issue

I used the lcd420 driver, and I changed the header from LCD =6 to LCD= 8 to change from PORTB to PORTD which my hardware was setup to use.


However down in the code SET_TRIS_B was used three times, which meant the whenever it was reading a byte for INIT or whatever it waited forever.

I am still not sure why the hell it didn't get stuck when the LCD was unplugged and I really dislike the fact that the LCD driver has the potential to bring the software to halt in case of a hardware failure. I am not sure but I think one could get away without ever waiting indefinitely for a condition with these LCDs.

One day I'll grow up be an adult, then I'll sit down and write a driver for LCD and post it here. Very Happy Very Happy Very Happy
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Fri Mar 25, 2005 7:41 am     Reply with quote

Anonymous wrote:
This ended up being a software issue

I used the lcd420 driver, and I changed the header from LCD =6 to LCD= 8 to change from PORTB to PORTD which my hardware was setup to use.


However down in the code SET_TRIS_B was used three times, which meant the whenever it was reading a byte for INIT or whatever it waited forever.

I am still not sure why the hell it didn't get stuck when the LCD was unplugged and I really dislike the fact that the LCD driver has the potential to bring the software to halt in case of a hardware failure. I am not sure but I think one could get away without ever waiting indefinitely for a condition with these LCDs.

One day I'll grow up be an adult, then I'll sit down and write a driver for LCD and post it here. Very Happy Very Happy Very Happy


Well they give you the code. If you want to add a timeout then feel free to do so. If they would have used a timer or something, someone else would have complained about that! Can't please all the people all the time is how the saying goes.
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