Page 1 of 1

PIC16F1936 I2C

Posted: Wed Sep 08, 2021 3:19 am
by allenkkwong
Hello, I have a project that uses PIC16F1936 I2C. Once I initialize the I2C module, the MCU is getting unstable and other pins will accidentally change states. Can you let me know what is the likely problems I have?

Re: PIC16F1936 I2C

Posted: Wed Sep 08, 2021 9:50 am
by allenkkwong
Hello, I changed to use software I2C and use Port A to drive the I2C bus. It works. Therefore, it seems that the macro that uses hardware I2C might have glitch.

Re: PIC16F1936 I2C

Posted: Wed Sep 08, 2021 10:14 am
by Benj
Hello,

That's odd I'm not aware of a problem with the hardware I2C on that device.

Are you able to post a simple project that demonstrates the issue and we will investigate it for you.

Re: PIC16F1936 I2C

Posted: Wed Sep 08, 2021 2:51 pm
by allenkkwong
Hi Benj,

Pls find the attached. I have simplified the FC by deleting the timer interrupt and some key scan.

Thanks!

Allen

Re: PIC16F1936 I2C

Posted: Wed Sep 15, 2021 3:31 pm
by allenkkwong
Hi Benj,

Any update?

Thanks

Re: PIC16F1936 I2C

Posted: Wed Sep 22, 2021 1:53 pm
by Benj
Hello,

If you disable the watchdog timer in the project options then does this allow the hardware I2C to work without issues, I'm wondering if it's somehow related to the watchdog timing out and resetting.

It might also be worth turning off the I2C Stop Delay property and see if this makes any difference.

Re: PIC16F1936 I2C

Posted: Fri Sep 24, 2021 12:41 pm
by allenkkwong
Hi Benj

The watchdog has been there and there is no problem. For some reason I need to use the I2C and the problem happen. I am quite sure that it is related to the I2C macro. Once I started the I2C marco, it is getting unstable and kind of weird behaviour of IOs.

Thanks