PIC16F1936 I2C
Moderator: Benj
-
- Posts: 20
- Joined: Mon Apr 24, 2017 3:26 am
- Has thanked: 1 time
- Been thanked: 3 times
- Contact:
PIC16F1936 I2C
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?
-
- Posts: 20
- Joined: Mon Apr 24, 2017 3:26 am
- Has thanked: 1 time
- Been thanked: 3 times
- Contact:
Re: PIC16F1936 I2C
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.
- 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: PIC16F1936 I2C
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.
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.
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
-
- Posts: 20
- Joined: Mon Apr 24, 2017 3:26 am
- Has thanked: 1 time
- Been thanked: 3 times
- Contact:
Re: PIC16F1936 I2C
Hi Benj,
Pls find the attached. I have simplified the FC by deleting the timer interrupt and some key scan.
Thanks!
Allen
Pls find the attached. I have simplified the FC by deleting the timer interrupt and some key scan.
Thanks!
Allen
- Attachments
-
- test.fcfx
- (31.56 KiB) Downloaded 99 times
-
- Posts: 20
- Joined: Mon Apr 24, 2017 3:26 am
- Has thanked: 1 time
- Been thanked: 3 times
- Contact:
- 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: PIC16F1936 I2C
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.
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.
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
-
- Posts: 20
- Joined: Mon Apr 24, 2017 3:26 am
- Has thanked: 1 time
- Been thanked: 3 times
- Contact:
Re: PIC16F1936 I2C
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
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