Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 22:27 26 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : (MM) RTC choice and access to it’s bus?

Author Message
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9307
Posted: 06:35pm 05 Jan 2013
Copy link to clipboard 
Print this post

Hello all.


I note two things with respect to the MM Colour hardware:

1) RTC is the 1307, which is an old faithful, but it drifts over time and is not that accurate long-term. A much better option would be the DS3232 SMD RTC with built-in crystal oscillator. This RTC is very accurate, and auto-corrects itself regularly so that it cannot go off time long-term.

2) With the above in mind, I plan to design a DS3232 into my MM clone(I will buy pre-programmed MCU's from Silicon Chip), however, I note that the original 1307 sits on one of the I2C ports on PIC32, which I don't think you have any access to via the BASIC - correct?

This is not that critical, as the 1307 and 3232 have exactly the same commands for reading and writing to the clock, and I am pretty sure that they also have the same slave-address on the I2C bus too, meaning that you can interchange them as there should not be any code porting needed. The 3232 also runs at 400kHz bus speed, but is also happy at the slower 100kHz speed(so I understand), so should still work.

I plan to test all this on the prototype board once I have it ready.

However, there are useful features in the 3232 such as setting register 0Eh to 0 to make an LED on pin5 blink at 1Hz to show the clock is running, plus 256 bytes of battery-backed up RAM - useful in the event of power loss.

Are there any plans to substitute the 1307 for something along the lines of the 3232 in a future release of the MM?

I am now going to find the 1307 datasheet and have a read, but from what I remember, there are no special features or battery-backed RAM areas in the 1307 device...

EDIT: Found the 1307 datasheet, and it DOES have a small amount of battery-backed RAM - 56 bytes.

Q: Does MM BASIC enable the SQW/OUT to blink an LED at 1Hz? I know it is not on the PCB by default, but perhaps the code sets this to happen anyway?
Edited by Grogster 2013-01-07
Smoke makes things work. When the smoke gets out, it stops!
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024