Sujet : Re: Arduino + MCP9600 + thermocouple help needed
De : muratlanne (at) *nospam* gmail.com (Jim Wilkins)
Groupes : rec.crafts.metalworkingDate : 19. Mar 2024, 01:47:02
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <utanb3$f5i9$1@dont-email.me>
References : 1 2
User-Agent : Microsoft Windows Live Mail 16.4.3505.912
"Jim Wilkins" wrote in message
news:utai8d$e7ee$1@dont-email.me...Each I2C string begins with the address of the target, which you have to
know to communicate with it.
----------------------------
Here's what it looks like:
https://learn.sparkfun.com/tutorials/i2c/allIf the sender doesn't see the receiver pull down the ACK bit after the address you'll get the Not Found error.
"Once the first 8 bits of the frame are sent, the receiving device is given control over SDA. If the receiving device does not pull the SDA line low before the 9th clock pulse, it can be inferred that the receiving device either did not receive the data or did not know how to parse the message. [wrong address?] In that case, the exchange halts, and it's up to the controller of the system to decide how to proceed."
https://ww1.microchip.com/downloads/en/DeviceDoc/MCP960X-Data-Sheet-20005426.pdfSee figure 6.4 for the voltage-dependent address coding scheme. VDD is +, VSS is ground.
Also the address codes and lengths have to match. It's apparently 8 bits for the MCP9600, with the least significant bit ignored.
In the sparkfun schematic the funny looking things in brown are MOSFETs, electrically controlled on/off switches. A voltage on the unconnected (insulated) vertical bar enables current flow between the blocks, in this case shorting the signal line to ground while the resistor limits the current to a milliAmp. The diode is an unavoidable part of the structure.
Understanding data sheets was a large part of my job. Some of it was confirming that the device really did what the sheet said it would.