3 ms·
That's only because the diagram is completely wrong and your code is wrong accordingly, because it implements the incorrect diagram. Usually a wait state has a
by imtringued 2y ago
That's only because the diagram is completely wrong and your code is wrong accordingly, because it implements the incorrect diagram.
Usually a wait state has a self referential transition. You don't perform the wait once, you keep waiting until the condition for transitioning to the fill state is true.
The next problem is that you are doing polling. If you were to implement this on a microcontroller then your code cannot be called from an interrupt and let the microcontroller go to sleep to conserve power.