I'm trying to use the uChip MCP4561 EEPOT. I can read from it just fine, I just can't do a write using I2CWRITE, and Microchip tells me that the device must have a NACK at the end of each data transfer in order to work properly.
For example:
If I want to WRITE two bytes tp address 0x5D, I use the code
I2CAddress = $5D
I2CWRITE SDA,SCL,I2CAddress, Command,[Byte1,Byte2]
PBP sends out the WRITE request to the Address and gives an ACK
It sends out the command and gives an ACK
It sends byte 1 and gives an ACK
It sends byte 2 and gives an ACK <- should give NACK here, since this is the last byte of the transfer.
The MCP4561 holds the data bus low (forever). Is this a fault in PBP or my logic? In any case, does anyone know what I should try next?
Bookmarks