![]() | ![]() | ![]() |
| | |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
| | Thread Tools | Display Modes |
| | (permalink) |
| Experienced 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 |
| | |
| | (permalink) |
| Experienced Member | 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. |
| | |
| | (permalink) | |
| Experienced Member | Quote:
but do u have a sample code iam not to use the interrupts as our instructor said | |
| | |
| | (permalink) |
| Experienced Member | 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. |
| | |
| | (permalink) |
| Experienced Member | If you can tackle assembler Microchip has the code for a 16f. Just search Maestro. http://ww1.microchip.com/downloads/e...int.readme.pdf It is one of the supplied modules, does leap years and is good to the year 12700<g> |
| | |
| | (permalink) | |
| Experienced Member | Quote:
and do u think that will run on PIC16F877A thanx again i will try the code | |
| | |
| | (permalink) | |
| Super Moderator | Quote:
| |
| | |
| | (permalink) |
| Experienced Member | 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. |
| | |
| | (permalink) | |
| Experienced Member | Quote:
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 | |
| | |
| | (permalink) |
| Experienced Member | Post the code you've done so far. |
| | |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
| | ||||
| Thread | Thread Starter | Forum | Replies | Latest |
| Using Oscilloscopes | mechie | Electronic Theory | 9 | 29th November 2007 09:48 PM |
| Help me to calculate the interrupt time | Suraj143 | Micro Controllers | 20 | 11th October 2007 04:54 AM |
| PIC18F2550 with real time counter (DS1302) | ash87 | Micro Controllers | 8 | 30th July 2007 03:21 AM |
| Real Time Clock RTC 8583 | sonic | Micro Controllers | 0 | 16th May 2004 07:32 PM |
| Real Time voltmeter | CarElectronics | Electronic Projects Design/Ideas/Reviews | 1 | 4th September 2002 02:16 PM |