PIC16F18875 and I2C Slave

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 7.

Moderator: Benj

Post Reply
Synergy6
Posts: 28
Joined: Wed Jan 18, 2017 3:38 pm
Been thanked: 4 times

PIC16F18875 and I2C Slave

Post by Synergy6 »

Hi.
I am attempting to use the I2C slave on PIC16F18875.
In the properties i seem to be unable to select a channel. I only have option for "software" I would have preffered to use the hardware channel on PORTC.4 and PORTC.3 which appear to be remappable pins.

Is it possible to do this?

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times

Re: PIC16F18875 and I2C Slave

Post by LeighM »

I think this is because we do not yet support hardware I2C on this family of devices, but will be working on it soon.
The software I2C should be usable.

Similar to this issue:
http://www.flowcode.co.uk/mmforums/viewt ... 51&p=82005

Synergy6
Posts: 28
Joined: Wed Jan 18, 2017 3:38 pm
Been thanked: 4 times

Re: PIC16F18875 and I2C Slave

Post by Synergy6 »

So to clarify, the I2C slave will be usable even in software mode??
I take it that i cannot then use hardware interrupt for I2C to flag incoming traffic?

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times

Re: PIC16F18875 and I2C Slave

Post by LeighM »

Hi,
If you are creating a Slave device then no, sorry, it will not work in software mode (looks like we need to remove that option then)
The I2C Slave only works in hardware mode and only on certain supported devices.
So once the I2C Master hardware pin selection is fixed, we will also need to check or develop the Slave functionality.

Synergy6
Posts: 28
Joined: Wed Jan 18, 2017 3:38 pm
Been thanked: 4 times

Re: PIC16F18875 and I2C Slave

Post by Synergy6 »

Oh, thats a shame.
It was one of the main reasons we decided to trial FC7.

A little disappointing that after 7 versions of flowcode slave devices still arent there.

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times

Re: PIC16F18875 and I2C Slave

Post by LeighM »

It's not an easy peripheral to do in a generic way.
We do support it on some PIC devices.
The moving goalposts with new devices mean we have to prioritise.
Thanks for the feedback though, it helps us to know what features are in demand so that we can develop those.

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: PIC16F18875 and I2C Slave

Post by Benj »

Hello,

The remap feature for the I2C is what is causing me problems implementing hardware I2C on these devices.

Usually PIC devices with remap functionality don't cover the I2C as the data pin is essentially bi-directional which doesn't fit with the way the remap works with fixed Input and Output peripheral modes.

This device does have the I2C remap so it looks like Microchip have figured out a way of allowing bi-directional to work that I now need to get my head around.

For now there should be plenty of other PIC16F devices you can use which don't have this new fangled bi-directional re-mapping I2C weirdness associated, especially as you want C3 and C4 which are the usual I2C pins for a 40/28 pin device.

Post Reply