sainsmart rtc interfacing
train nut
Posts: 70
in Propeller 1
I have a sainsmart rtc module connected to a propeller. I have 1k resistors between module and prop. The module has pullup resistors approximately 3.3k. I cannot get Key's demo program to connect to the module. The at rest voltage on the SDA and SCL pins of the module is 4.08v and the pins on the prop are reading 3.8v. Anybody have any suggestions.
Comments
I figure this is an I2C RTC? If so the 3.3k resistors will keep the Prop safe. Lose the 1k resistors.
The module shouldn't be actively driving the I2C lines so the only 5V the Prop sees is through the 3.3k resistors. These resistors will keep the current below 500uA limit on the Prop's I/O pins.
What !?!?!
Of course the RTC drives the SDA line. Otherwise how do you think the data is read out of the RTC???
I presume the RTC is being driven at 5V. The pullups are a bit low. 10K would be better. A series resistor (1K should be good) at least in the SDA line is going to help protect the prop. Alternately there is a circuit from NXP that connects 5V and 3V3 I2C lines.
The SDA line is open drain so the RTC or RAM will send data out on that line when commanded to do so by the Prop. The SCL is an input to the smartsain board that the Prop outputs when reading or writing data to the RTC or RAM chip.
The output voltage on SDA is determined by the input voltage to the smartsain board. What voltage are you inputting to the board?
Yes, of course you're right. I misspoke. I should have said the RTC doesn't drive the data line HIGH.
I still think the 1k resistors are a bad idea. When the Prop pulls the line low to send data, the RTC will only see a low level of 1.16V instead of 0V.
Won't the 1k resistor with the 3.3k resistor create a voltage divider on the RTC's input pin?
5V * 1k / (1k + 3.3k) = 1.16V
Isn't that the way it would work?
Thanks again
Ben