I2C Component Macro

Forum for problems or queries regarding Flowcode Comms Components. Eg LIN, I2C, SPI, RS232, CAN, IrDA etc

Moderators: Benj, Mods

Post Reply
Mark
Posts: 209
Joined: Thu Oct 19, 2006 11:46 am
Location: Bakewell, UK
Has thanked: 20 times
Been thanked: 16 times
Contact:

I2C Component Macro

Post 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
Go with the Flow.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: I2C Component Macro

Post 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.

Post Reply