I2C Component Macro
Posted: Wed Jun 11, 2008 11:47 am
I2C Component Macro
First a good to have component and the useful sample program works well in hardware, storing and recieveing 'Hi'.
Adapating the code for my own use could you explain :
What the pupose of the RetVal field in the Transmit Byte Macro is?
What the Purpose of the Last Byte Field is in the Recieve Byte Macro is?
What values can it take, just 0 and 1?
What is the consequence of the last read not using a 1?
The above may help answer my question but I have rejigged the example and find that the code (in hardware) hangs on the data send routine on an intermittent basis. On the exact same hardware the test code works fine. Any reasons why a transmit may hang? (there is nothing else going on in the code, eg interrupts etc).
Thanks
First a good to have component and the useful sample program works well in hardware, storing and recieveing 'Hi'.
Adapating the code for my own use could you explain :
What the pupose of the RetVal field in the Transmit Byte Macro is?
What the Purpose of the Last Byte Field is in the Recieve Byte Macro is?
What values can it take, just 0 and 1?
What is the consequence of the last read not using a 1?
The above may help answer my question but I have rejigged the example and find that the code (in hardware) hangs on the data send routine on an intermittent basis. On the exact same hardware the test code works fine. Any reasons why a transmit may hang? (there is nothing else going on in the code, eg interrupts etc).
Thanks