Slow I2C Component Macro [Solved]

Any bugs you encounter with Flowcode should be discussed here.
Post Reply
Sasi
Posts: 134
http://meble-kuchenne.info.pl
Joined: Wed Dec 02, 2020 12:11 pm
Has thanked: 43 times
Been thanked: 15 times

Flowcode v10 Slow I2C Component Macro [Solved]

Post by Sasi »

Hello,
I tested the I2C component with a PIC16F1779 MCU and a 47C04 type EERAM.
Writing and reading work correctly, and the operations complete in about 100 µs.
However, the Component Macro continues to run for another 10 ms after a write or read operation.
What do you think could be causing this?

Thank you in advance for your help.

Regards,
Sasi
PIC16F1779_I2C_TEST.fcfx
(12.8 KiB) Downloaded 11 times
I2C_Generic Read and Write.jpg
I2C_Generic Read and Write.jpg (45.5 KiB) Viewed 241 times
I2C_Generic Write zoomed.jpg
I2C_Generic Write zoomed.jpg (43.13 KiB) Viewed 241 times
Last edited by Sasi on Sat Oct 04, 2025 11:14 am, edited 1 time in total.

Sasi
Posts: 134
Joined: Wed Dec 02, 2020 12:11 pm
Has thanked: 43 times
Been thanked: 15 times

Re: Slow I2C Component Macro

Post by Sasi »

I realized that I had omitted the I2C component initialization command from the test project.
Presumably, without this, the other I2C operations should not function correctly.
I tried placing the I2C initialization block before the main loop, but it made no difference write and read operations still take approximately 10 ms to complete. :o

In the current project I'm working on, I2C transactions are required to be executed within interrupts triggered every 500 µs.
Currently, the program freezes while executing the first such macro.

mnfisher
Valued Contributor
Posts: 1684
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 145 times
Been thanked: 784 times

Re: Slow I2C Component Macro

Post by mnfisher »

In the i2c properties there is a 'stop delay' setting - check this is set to no.

Martin

Sasi
Posts: 134
Joined: Wed Dec 02, 2020 12:11 pm
Has thanked: 43 times
Been thanked: 15 times

Re: Slow I2C Component Macro

Post by Sasi »

Hi Martin,

Thank you very much for your help, it works perfectly after I turned off the Stop delay. :oops:

Regards,
Sasi

Post Reply