Real Time calendar

Status
Not open for further replies.

engkhlaif

New Member
i need a help in a real time calendar using PIC16F877A
iam using c language and then i need to display the time and date on lcd 16*1 like:
10:15:59
21 jan 2008
i just need the function that calculate the time and the date and thanx for every one who can help me
 
most of it can be done with simple counters and a real time interupt. In the interupt service routine ripple through each counter. Say the interupt happenes every second, increment the seconds counter each time and see if it has reached sixty. When it does reach sixty, clear it and increase the minutes counter by one and so on until you are counting hours, days, months and years.
 
thanx
but do u have a sample code
iam not to use the interrupts as our instructor said
 
If you download the 16F88 data sheet you will find the code you require on page 77 in example 7-3. Aren't Microchip a nice company.

BTW, don't use the interrupt, just poll the timer1 bit.

Mike.
 
Pommie said:
If you download the 16F88 data sheet you will find the code you require on page 77 in example 7-3. Aren't Microchip a nice company.

BTW, don't use the interrupt, just poll the timer1 bit.

Mike.
thanx man i will do that
and do u think that will run on PIC16F877A
thanx again i will try the code
 
engkhlaif said:
thanx man i will do that
and do u think that will run on PIC16F877A
thanx again i will try the code

They both have the same 14 bit core, so there should be no problems.
 
iam not to use the interrupts as our instructor said[/QUOTE]

OK, you did not specify that in your requirement. Like Mike said, poll TMR1.
 
Pommie said:
If you download the 16F88 data sheet you will find the code you require on page 77 in example 7-3. Aren't Microchip a nice company.

BTW, don't use the interrupt, just poll the timer1 bit.

Mike.
thanx for ur hint
but i dont know the assembler iam just using PICC C compiler in MBLAP v7.31
and iam using c language not assembly
so any one just has the code that find the time and date and iam very glad to him
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…