Page 1 of 1

IIC and SSPCON2

Posted: Sun Jul 16, 2017 11:52 am
by allenkkwong
Hi Benj,

I am using the PIC16F723 in a project. I use the hardware IIC. When I compiled the FC, it generates a lot of SSPCON2 error. I searched the forum and found that it happens in FC V5. I am currently using FC V6. I have attached the error message in this post. I changed to use software IIC and it seems fine.

Can you tell me if there is anyway to fix this?

Thanks
Allen

Re: IIC and SSPCON2

Posted: Mon Jul 17, 2017 12:43 pm
by Benj
Hello Allen,

Aha the problem is also in v7 and I think I have found the cause.

This is taken from the datasheet.
The SSP module, in I2C mode, implements all slave functions, except general call support.
So the chip can only support hardware I2C Slave functionality. For Master functionality you will need to use the software channel. I've added a warning to the I2C code in v7 that says in this case that the master mode may not be available on the device.

Re: IIC and SSPCON2

Posted: Tue Jul 18, 2017 1:40 am
by allenkkwong
Hi Benj,

Will there be a fix? I am using v6 and will you have update on v6?

Rgds

Re: IIC and SSPCON2

Posted: Tue Jul 18, 2017 1:46 am
by allenkkwong
Hi Benj,

Oh... I got it. Pls ignore my last reply. Thanks

Rgds
Allen