Wanted to let you all know that I’ve uploaded the driver and instructions to Fezzer.com to connect a Maxim DS1307 I2C RTC to the Fez Panda.
Hello,
I would like to point out for a couple of improvements.
1. Get rid off FEZ_Components class and use the FEZ_Components name as the name of the namespace instead of using GHIElectronics.NETMF.FEZ. This should save space
2. Change
static I2Device I2C;
to
private I2CDevice I2C;
-You use it as a non static object. (You allocate and dispose that object in non static methods).
-Very bad things will happen when you have more than one instance of RTC_DS1307 object.
Regards,
Valentin
Great job, Eric!
I am wondering if the diagram and the connection description of you DS1307 Driver is a little off?
Since DS1307 also needed 32.768kHz external oscillator (page 6 of the datasheet).
I would say the diagram from the link below or excerpt from the datasheet would be more appropriated.
[url]Mixed-signal and digital signal processing ICs | Analog Devices
It’ll be back online soon.
Changes posted
Very nice example.
Thank you!
There is also 56 bytes of user ram on these devices,
Why don’t you include a little storage for non volatale variables.
Very good work!!!
Cheers Ian
[quote]There is also 56 bytes of user ram on these devices,
Why don’t you include a little storage for non volatale variables.[/quote]
Simply because I didn’t need it (yet), but I will look into it soon.
Eric
What would I have to do to patch the DS1307 code for setting/reading the DOW (Day of week)?
I believe Sunday = 1?
It’s user define. So you can have Sunday = 1.
It mentioned in Maxim’s DS1307 datasheet, page 8.
The default DOW is Sunday = 0 when the time/date is set with the driver.
Also, this same driver will work, without modifications, with the accurate DS3231 RTC eg
Macetech’s ChronoDot RTC.
Sweet … I have been looking for an RTC and this seems to fit my needs perfectly.