Author Topic: i2c questions / debug  (Read 394 times)

0 Members and 1 Guest are viewing this topic.

Offline WawavounTopic starter

  • Regular Contributor
  • *
  • Posts: 81
  • Country: fr
  • Someday I'll get you, Red Baron !
i2c questions / debug
« on: February 23, 2024, 08:49:46 pm »
Hello All,

I try to talk i2c to a DS3231 module.

First I try to read the temperature. I do that with a 6809 proc and a 6522 via on B port bit 0 and 1.

The DS3231 reply with a great constancy $FF for temperature MSB and LSB.

The recording of the i2c session is here.



The point looking strange is that the DS3231 reply NACK to device selection, to data write instruction and to address to read... Reading the datasheet this should be a ACK.

Can somebody point to me what is wrong in the transmission ???

Thanks and regards.
Philippe

 

Offline Peabody

  • Super Contributor
  • ***
  • Posts: 2007
  • Country: us
Re: i2c questions / debug
« Reply #1 on: February 23, 2024, 09:57:40 pm »
An ACK is bringing the data line low for one clock cycle.  A NAK is simply not doing anything.  So perhaps the DS3231 is not able to bring the data line low under any circumstance.   That would also account for the temp register being all FFs.  You might check your wiring.

Edit:  Perhaps the DS3231 isn't even powered up.  What different results do you get from your test code if the DS3231 is not connected at all?
« Last Edit: February 23, 2024, 10:04:27 pm by Peabody »
 

Offline WawavounTopic starter

  • Regular Contributor
  • *
  • Posts: 81
  • Country: fr
  • Someday I'll get you, Red Baron !
Re: i2c questions / debug
« Reply #2 on: February 24, 2024, 08:41:53 am »
You are right.
Without DS3231 module signals are the same...

I have to think ! ::) :-//
 

Online pcprogrammer

  • Super Contributor
  • ***
  • Posts: 3710
  • Country: nl
Re: i2c questions / debug
« Reply #3 on: February 24, 2024, 09:07:13 am »
I noticed that you made a double post on this subject. Please do not do that.


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf