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

Showing date and time of a DS1302 RTC into a LM016 LCD

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



Joined: 16 Oct 2007
Posts: 2

View user's profile Send private message

Showing date and time of a DS1302 RTC into a LM016 LCD
PostPosted: Tue Oct 16, 2007 7:54 pm     Reply with quote

Hello everybody,
I'm just starting programming PICs and I made some small programs, play putiing ports at high and low states, displayed some characteres on a LM016 display.
Now I want to use a DS1302 RTC to tell me the date and time and display it on a LCD display (LM016). I'm using a PIC 16F877a.
I tried a few times but I couldn't get it to work. Could anybody show me how to do that?

Thanks for the help in advance,
Fernando.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Oct 16, 2007 8:06 pm     Reply with quote

See this CCS example file:
Quote:
c:\Program Files\PICC\Examples\Ex_rtclk.c
fernandoagf



Joined: 16 Oct 2007
Posts: 2

View user's profile Send private message

PostPosted: Tue Oct 16, 2007 8:32 pm     Reply with quote

Thank you man. It really helped a lot. Now I have one question? In order to put the keyboard to work, do I have to put any resistor between the keyboard and the PIC? Would it be some pull-up resistor? What would be their values?
nother question: The KBD.C driver and the ds1302.c driver are using the same port (B) so I changed the port for the RTC. So now I have the conectors of the DS1302 connected to the pic as follows:
RST on port C2
CLK on port C1
IO on port C3
So I changed the ports on ds1302.c Is it ok? Can I use these pins?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Oct 16, 2007 9:02 pm     Reply with quote

The keypad needs pull-up resistors on the Row pins. You can use
4.7K or 10K ohm resistors.

Yes, you can use those other pins for the DS1302.
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