It's mostly a matter of differences in the naming of the paramaters.
MAX5477
Address - Command - Data
I2CWRITE
Control - Address - Value
The I2C Control, is what the MAX calls Address.
The I2C Address, is what the MAX calls Command.
What you are calling Control_NVreg, is what the MAX expects for the Command.
Here's what it should look like without changing the variable names.Also, your address indicates that the A0 pin on the MAX is tied HIGH, with A1 and A2 tied LOW.Code:I2CWRITE PortA.6, PortA.2, Address, Control_NVreg,[Value] %01010010 %00100001 %10000000




Bookmarks