This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

I2C codes not working on ds89c450

HI,

My I2C codes for RTC ds1307 are working fine on Philips' 89c61x2 but when I'm trying to use those codes with ds89c450 I'm not able to read or write anything in the RTC. Please help...

Parents
  • i checked the waveform and i found out that the start was not proper, so i changed the code and now my RTC is working but i'm getting corrupted data. The seconds are coming like this.

    i initialized the sec to 00h

    00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 01 01 01 01 06 06 06 06 06 07 07 07 07 07 06 06 06 06 06 07 07 07 07 07 00 00 00 00 01 01 01 01 01 18 18 18 18 18 19 19 19 19 19 18 18 18 18 19 19 19 19 19 1E 1E 1E 1E 1E 1F 1F 1F 1F 1F 1E 1E 1E 1E 1E 1F 1F 1F 1F 18 18 18 18 18 19 19 19 19 19 00 00 00 00 00 01 01 01 01

    the problem is in the 1st and 5th bit.

    could you tell me what i can do about it?

Reply
  • i checked the waveform and i found out that the start was not proper, so i changed the code and now my RTC is working but i'm getting corrupted data. The seconds are coming like this.

    i initialized the sec to 00h

    00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 01 01 01 01 06 06 06 06 06 07 07 07 07 07 06 06 06 06 06 07 07 07 07 07 00 00 00 00 01 01 01 01 01 18 18 18 18 18 19 19 19 19 19 18 18 18 18 19 19 19 19 19 1E 1E 1E 1E 1E 1F 1F 1F 1F 1F 1E 1E 1E 1E 1E 1F 1F 1F 1F 18 18 18 18 18 19 19 19 19 19 00 00 00 00 00 01 01 01 01

    the problem is in the 1st and 5th bit.

    could you tell me what i can do about it?

Children