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?
PIC16F18875 and I2C Slave
Moderator: Benj
- 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
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
The software I2C should be usable.
Similar to this issue:
http://www.flowcode.co.uk/mmforums/viewt ... 51&p=82005
Re: PIC16F18875 and I2C Slave
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?
I take it that i cannot then use hardware interrupt for I2C to flag incoming traffic?
- 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
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.
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.
Re: PIC16F18875 and I2C Slave
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.
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.
- 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
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.
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.
- 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
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel