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 : MMBasic I2C RTC Addressing Problem?
Author | Message | ||||
DuinoMiteMegaAn Senior Member Joined: 17/11/2011 Location: AustraliaPosts: 231 |
MMBasic I2C RTC Addressing Problem? The problem is the DS3231M uses 7 bit addressing as opposed to 10 bit addressing per spec. sheet Using the DS3231M is rejected by MMBasic 3.1 because the device addressing is above 127? Is it possible to allow this precision low cost RTC device using 7 bit addressing in MMBasic? The following Maxim-IC battery backup compatible I2C RTC devices have the following slave addressing: DS1307 DEC 104 0x68 <------- +- 20 ppm <--- 8 pin dip <---- works in MMbasic DS3231 DEC 104 0x68 <------- +- 2 ppm <-Precision RTC 16 soic <-- works in MMBasic DS3231M DEC 208 0xD0 <------ +- 5 ppm <- Automotive precision RTC 8 soic(low cost) Note: The addressing range of the DS1307 and DS3231 is less than 127 and they all work perfect in MMBasic. |
||||
BobD Guru Joined: 07/12/2011 Location: AustraliaPosts: 935 |
Andy The data sheet may be in error. If you look at page 16 it writes that the address is 0xD0. On the same page in fig 8 it shows the address as 0x68. Fig 9 also shows the address as 0x68. Bob Are you considering using the DS3231M? If so, have you seen the Errata Sheet out on it? http://pdfserv.maxim-ic.com/en/errata/DS3231MA1.pdf Just noticed that 0x68 shifted 1 bit left is 0xD0. Methinks whoever wrote the sheet got his bits muddled. |
||||
DuinoMiteMegaAn Senior Member Joined: 17/11/2011 Location: AustraliaPosts: 231 |
Maxim_IC DS3231M 19-5312: Rev 3: 12/11 Document PDF <------<<<<< Page 16 Under i2C serial Port operation quote "The device slave address byte is D0h" <---- This is definately wrong. Page 16 Figure 8 is MSB 1101000x = 0x68 hex or 104 DEC Page 17 Figure 9 is MSB 1101000x = 0x68 hex or 104 DEC All three I2C devices should have the same device address which they do. The tech pub writer needs to review his work! Thanks BoB BTW ... I just tested this new SOIC8 DS3231M and so far it works fine. Now if some enterprising person would make a RTC module with this chip for the MaxiMite then there won't be any more large RTC errors due to temperature variations. I can't live with 2.628 minutes per year but not the 10-20 minutes on the DS1307. |
||||
CircuitGizmos Guru Joined: 08/09/2011 Location: United StatesPosts: 1425 |
Page 16 Under i2C serial Port operation quote "The device slave address byte is D0h" Page 16 Figure 8 is MSB 1101000x = 0x68 hex or 104 DEC Page 17 Figure 9 is MSB 1101000x = 0x68 hex or 104 DEC -------------- 0xD0 = 11010000 0x68 = 01101000 Just a shift. Of you do or don't count the r/w bit 0 as part of the address you will see how 0xD0 and 0x68 are related. Micromites and Maximites! - Beginning Maximite |
||||
DuinoMiteMegaAn Senior Member Joined: 17/11/2011 Location: AustraliaPosts: 231 |
CGMMStick1 + precision I2C rtc DS3231M = data logger |
||||
Print this page |