Open vargham opened 6 years ago
Is it working with the changes you made?
Everything is fine, except the clock.
I’m wondering if the data and clock lines of ds1302 have external pull-up resistors on them? I recall some issue where we had to play with the pin mode registers to get pull-up (if so might check data sheet on this. )
RTC data IO has 7k6 pull-up.
Changed DS1302's CE to open-drain output
//M1 M0
// 0 0 Bidirectional
// 0 1 Push-Pull
// 1 0 Input
// 1 1 Open-drain
// IO CE CK
P1M1 = 0b00000010;
P1M0 = 0b00000010;
Constant 1F 7F has been changed to constant 00 00, but still could not set time.
I checked. CE and CLK is always low. Only IO is changing.
OK, I fixed.
Curious if you had to explicitly set P1M0 and P1M1 registers to 0. I understand from datasheet that this should be the default, and I don't recall where we were setting these otherwise.
Here is a link to the STC15F204EA new firmware for Madhava-04 to try on your new model. the only difference is your light sensor is on P1.3 but my ZM-907AA is on P1.5. If your test is ok, I can recompiled the firmware for P1.3 https://github.com/pctong/STC15F204EA-clock
Temperature and ligth measurement are working. Display is OK. Button 1 and 2 are working.
Time setting and display is not working. There is a 1F 7F constant display instead of time.