Problem with the I2C component in PIC32MX370F512H MCU
Moderator: Benj
-
- Posts: 170
- Joined: Fri Jul 15, 2016 9:51 pm
- Has thanked: 69 times
- Been thanked: 61 times
- Contact:
Problem with the I2C component in PIC32MX370F512H MCU
Hi,
I would like to ask help because the I2C Master component not working with PIC32MX370F512H chip if I use the hardware channel setup.
Nothing happen on the I2C signal ports.
The software channel is working. ( I note the SCL signal 522 kHz instead of 400 kHz in this case. )
I tried the "I2C Master" and "cal I2C" components. The two components behave the same.
I use the UART component too in this project and it is working correctly.
Best Regards,
Lagoda
I would like to ask help because the I2C Master component not working with PIC32MX370F512H chip if I use the hardware channel setup.
Nothing happen on the I2C signal ports.
The software channel is working. ( I note the SCL signal 522 kHz instead of 400 kHz in this case. )
I tried the "I2C Master" and "cal I2C" components. The two components behave the same.
I use the UART component too in this project and it is working correctly.
Best Regards,
Lagoda
-
- Posts: 170
- Joined: Fri Jul 15, 2016 9:51 pm
- Has thanked: 69 times
- Been thanked: 61 times
- Contact:
Re: Problem with the I2C component in PIC32MX370F512H MCU
Hello Ben,
Thanks for the reply.
I may have misrepresented the problem.
The I2C internal peripheral does not work in the MCU.
But I tried what you suggested.
The situation has not improved.
Would you check again?
Lagoda
Thanks for the reply.
I may have misrepresented the problem.
The I2C internal peripheral does not work in the MCU.
But I tried what you suggested.
The situation has not improved.
Would you check again?
Lagoda
-
- Posts: 170
- Joined: Fri Jul 15, 2016 9:51 pm
- Has thanked: 69 times
- Been thanked: 61 times
- Contact:
Re: Problem with the I2C component in PIC32MX370F512H MCU
Addition to the previous ones:
I also tested the I2C Master component with a PIC18F67K40 MCU, in this case only the software channel works too.
I also tested the I2C Master component with a PIC24FJ1024GB610 MCU. In this case, the code cannot be compiled if you want to use hardware channel 3. Channels 1 and 2 works, but the clock speed is approximately 47kHz when SCL = 100kHz is set. Approximately 125kHz for SCL = 400kHz, 333kHz for SCL = 1MHz.
I also tested the I2C Master component with a PIC18F67K40 MCU, in this case only the software channel works too.
I also tested the I2C Master component with a PIC24FJ1024GB610 MCU. In this case, the code cannot be compiled if you want to use hardware channel 3. Channels 1 and 2 works, but the clock speed is approximately 47kHz when SCL = 100kHz is set. Approximately 125kHz for SCL = 400kHz, 333kHz for SCL = 1MHz.
- 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: Problem with the I2C component in PIC32MX370F512H MCU
Sorry reply was for a different topic
Thanks I'll have a look into the problem for you.
Thanks I'll have a look into the problem 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: 170
- Joined: Fri Jul 15, 2016 9:51 pm
- Has thanked: 69 times
- Been thanked: 61 times
- Contact:
Re: Problem with the I2C component in PIC32MX370F512H MCU
Hello Ben,
That would be very good!
The most important thing for me would be to be able to use the I2C peripherals of the PIC32MX370 MCU.
I noticed that channel 2 is not initialized by the component macro.
Something happens to channel 1 during initialization, but it can only send START. (I tested it with the "Cal I2C" component macro.) I'll watch it again tomorrow (Thursday) morning, but channel 2 is certainly wrong.
Best Regards,
Lagoda
That would be very good!
The most important thing for me would be to be able to use the I2C peripherals of the PIC32MX370 MCU.
I noticed that channel 2 is not initialized by the component macro.
Something happens to channel 1 during initialization, but it can only send START. (I tested it with the "Cal I2C" component macro.) I'll watch it again tomorrow (Thursday) morning, but channel 2 is certainly wrong.
Best Regards,
Lagoda
- 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: Problem with the I2C component in PIC32MX370F512H MCU
Hello,
Sorry for the delay. I think I've spotted the problem, at least with channel 2 not being initialised and while I'm fixing that I'll see if I can find anything that is causing the problems for channel 1.
Sorry for the delay. I think I've spotted the problem, at least with channel 2 not being initialised and while I'm fixing that I'll see if I can find anything that is causing the problems for channel 1.
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
- 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: Problem with the I2C component in PIC32MX370F512H MCU
Hello,
I've now pushed an update to the update system.
Hopefully it improves things for you with the I2C hardware channels but let me know how you get on.
I've now pushed an update to the update system.
Hopefully it improves things for you with the I2C hardware channels but let me know how you get on.
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: 170
- Joined: Fri Jul 15, 2016 9:51 pm
- Has thanked: 69 times
- Been thanked: 61 times
- Contact:
Re: Problem with the I2C component in PIC32MX370F512H MCU
Hello Ben!
Thank you very much for your help.
Both channels seem to work. I tested it with the "Cal I2C" component macro.
Master and Servant are talking to each other. I only checked with an oscilloscope.
The SCL frequency is 370 kHz. Can you set it to 400 kHz?
Best Regards,
Lagoda
Thank you very much for your help.
Both channels seem to work. I tested it with the "Cal I2C" component macro.
Master and Servant are talking to each other. I only checked with an oscilloscope.
The SCL frequency is 370 kHz. Can you set it to 400 kHz?
Best Regards,
Lagoda
- 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: Problem with the I2C component in PIC32MX370F512H MCU
Hello,
Excellent that's great progress. I've now pushed another change to hopefully better work out the baud rate.
Let me know how you get on.
Excellent that's great progress. I've now pushed another change to hopefully better work out the baud rate.
Let me know how you get on.
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: 170
- Joined: Fri Jul 15, 2016 9:51 pm
- Has thanked: 69 times
- Been thanked: 61 times
- Contact:
Re: Problem with the I2C component in PIC32MX370F512H MCU
Hello,
Sorry I made a mistake, the SCL now 370 kHz.
The previous SCL setting was good.
Sorry, once again.
Please reset the previous baud rate.
Thanks,
Lagoda
Sorry I made a mistake, the SCL now 370 kHz.
The previous SCL setting was good.
Sorry, once again.
Please reset the previous baud rate.
Thanks,
Lagoda
- 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: Problem with the I2C component in PIC32MX370F512H MCU
Hi Lagoda,
No problem I've rolled it back for you. Thanks for letting me know.
No problem I've rolled it back for you. Thanks for letting me know.
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