First thoughts... Get rid of the fat...
Break it down...Make it as simple as possible.
Read and write a single value to a single location, then build your way up to the final result.
Then try this:
Notice anything different?Code:eepromaddress var word eepromdata var byte i2cd var portc.0 i2cc var portc.1 eepromctrl var byte eepromctrl = $a0 i2cread i2cd , i2cc , eepromctrl , eepromaddress , [ eepromdata ] i2cwrite i2cd , i2cc , $a0 , eepromaddress , [ eepromdata ]
(besides the fact that there isn't a single colon up there)
(I could've done this
Code:a var word:d var byte:c var portc.0:k var portc.1:n var byte:n=160:i2cread c,k,n,a,[d]:i2cwrite c,k,n,a,[d]


)


Bookmarks