Page 1 of 1

I2C Slave

Posted: Mon Nov 03, 2008 7:24 pm
by jeffg
Hello,

I am working on a project with 2 PICs (16f877a) with I2C communication between both of them but it seems that Flowcode has only a master i2C component.

Has someone find a good code C to insert in a flowcode project ? Or any other solution ?

Thanks for your help,

Jeff

Re: I2C Slave

Posted: Tue Nov 04, 2008 10:59 am
by Benj
Hello Jeff

Can you use RS232 instead? The I2C slave component for Flowcode is still a while off yet.

Re: I2C Slave

Posted: Thu Nov 13, 2008 6:38 am
by Mikat
Hello. I am too very interested that i2c slave mode,because i have already i2c omponent on my design,so it would be nice to have the pics communicate on same method...
Other thing is that i already have 2 custom component,so is it possible to modify the existing i2c component to work on slave mode,or use just
c code commands?

Mika

Re: I2C Slave

Posted: Wed Dec 31, 2008 10:18 am
by wim314
I am also interested for one of my projects in the I2C slave functionality. When will it be available in flowcode? thanks, wim

Re: I2C Slave

Posted: Fri Jun 05, 2009 1:46 pm
by georgesz113
Hello,

Is there any news on I2C Slave module? Could you put up a beta component for this or tell me how I could connect two PICs using the I2C ports?

Many thanks,
George

Re: I2C Slave

Posted: Fri Jun 05, 2009 3:16 pm
by Benj
Hello

Yes it would be possible to use the custom components to build your own slave I2C component.

Slave components are a little tricky as they have to be ready to react to incoming data which means careful planning of your program. This is why I prefare RS232 data as you can receive and respond to data pretty much whenever your ready as long as the baud rate is not too high. I2C or SPI slave devices are essentially dumb devices that can only ever sit on the bus and await instruction. Before you go down the path of making a I2C slave device you must be sure that this operation is what you are looking for.

Essentially all you need to do is to modify the I2C hardware commands so the peripheral is configured as a slave instead of a master. Alternativly you could create a bit banged slave routine similar to the software I2C master routines available in the current I2C component.

You can find more help on editing the Flowcode custom components from here.
http://www.matrixmultimedia.com/Flowcode_Components.php