Page 1 of 1

I2C Component Macro

Posted: Wed Jun 11, 2008 11:47 am
by Mark
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

Re: I2C Component Macro

Posted: Wed Jun 11, 2008 12:59 pm
by Benj
Hello Mark

There is a help file for the I2C component which should answer all your questions. Simply go into the component properties and click help or browse to the Flowcode V3 folder and open the I2C.hlp file.