Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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.
 
Gordz said:
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. :D

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. :D

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
 
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. :D

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.

Latest threads

New Articles From Microcontroller Tips

Back
Top