![]() |
![]() |
![]() |
|
|
|||||||
| 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) |
|
I'm not trying to make it a stopwatch. Once I set it, I'm probably setting it for good. Using it as a timestamp.
|
|
|
|
|
|
|
(permalink) |
|
Then set the seconds last, you can't simple turn a bit on. You have to write the whole byte.
|
|
|
|
|
|
|
(permalink) |
|
Isn't the best way to use burst mode then the registers all get updated at the same time - once the 8th register is written.
Or, write the seconds first. As long as the value written is not 59 then there is no chance of the minutes/hours etc. rolling over during the update. Mike. |
|
|
|
|
|
|
(permalink) |
|
The burst mode is the way to go, since SPI is very fast you can update the RTC in a fraction of a second.
|
|
|
|
|
|
|
(permalink) |
|
How much faster would the burst mode be compared to accessing the register contents one at a time?
|
|
|
|
|
|
|
(permalink) |
|
It's not that it is faster. Burst mode has the advantage that none of the registers are written until you write the eight one, therefore ensuring that a register can't rollover during the update.
Alternatively, writing the seconds register first with a value other than 0x59 will make sure that rollover can't happen during the update. Mike. |
|
|
|
|
|
|
(permalink) |
|
hi,
I downloaded the attached asm file from the web yesterday. Recently got a couple of DS1307's, used the asm file as a quick test with a 16F628A, worked OK. Time set/read is via RS232. I will re-search the web so I can credit the author.. EDIT: The full description is here: http://pdfserv.maxim-ic.com/en/an/AN3921.pdf
__________________
Eric "Good enough is Perfect" PIC tutorials: Gramo's: www.digital-diy.net/ Bill's: www.blueroomelectronics.com/ Last edited by ericgibbs; 7th July 2008 at 11:23 AM. |
|
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Latest |
| Real Time FLIR Video Feed | digital0ne | Robotics Chat | 3 | 11th April 2004 06:21 PM |
| digital clock setting the time mode | Jay Duluguin | Electronic Projects Design/Ideas/Reviews | 0 | 19th February 2004 10:09 PM |
| real time clock | finst | Micro Controllers | 4 | 17th January 2004 12:11 AM |
| list of Real Time Clock | thendo | Micro Controllers | 2 | 8th November 2003 05:41 PM |
| time clock | gogo01 | Electronic Projects Design/Ideas/Reviews | 2 | 22nd August 2003 05:05 AM |