Hello to all!
Just a question.
There is a way to discard, i mean uninitializing, the macro component witout resetting the micro? Arduino atmega328p is my platform.
I need that the micro keeps running also if the I2C HT16K33 gets stuck in any event. Now, if just a cable pin gets interupted, the program hangs up and stops. There is a way to avoid this problem? I already tried with the generic I2C_cal module that can Uninitialize I2C bus but this way does not works.
Top
HT16K33 how to disable/release macro component
-
- Posts: 1
- http://meble-kuchenne.info.pl
- Joined: Sun Nov 12, 2023 9:29 pm
-
- Matrix Staff
- Posts: 1955
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 626 times
- Been thanked: 656 times
Re: HT16K33 how to disable/release macro component
Hello,
It sounds like I2C is clock stretching when the component becomes O/C , due to not seeing the pull-up resistors.
Rather that Micro being frozen, are you sure it's just not taking a long time to complete a loop?
You could try enabling weak pull-ups as well have having pull-up resistors
Or
You can use a decision branch. If variable e.g ComponentOK = 1 then run all the HT16K33 functions, so they will be on the true branch.
Use timer component to start time before one of the HT16K33 functions and stop the time after the same function.
If greater that say 5 seconds then ComponentOK to 0.
It sounds like I2C is clock stretching when the component becomes O/C , due to not seeing the pull-up resistors.
Rather that Micro being frozen, are you sure it's just not taking a long time to complete a loop?
You could try enabling weak pull-ups as well have having pull-up resistors
Or
You can use a decision branch. If variable e.g ComponentOK = 1 then run all the HT16K33 functions, so they will be on the true branch.
Use timer component to start time before one of the HT16K33 functions and stop the time after the same function.
If greater that say 5 seconds then ComponentOK to 0.
Martin