Maybe bug in AVR USI (Attiny85)
Quote from Coethium on August 25, 2024, 10:04 pmHi again 😉
Just a little new modification in avrusi.cpp :
void AvrUsi::callBack() // Called at Timer0 Compare Match { shiftData(); stepCounter(); setOutput(); }
shitfData() must be called before stepCounter() call.
When sending data, that's not important, but when receiving data the buffer (USIBR) has to be updated after reading Pin data.
Hi again 😉
Just a little new modification in avrusi.cpp :
void AvrUsi::callBack() // Called at Timer0 Compare Match
{
shiftData();
stepCounter();
setOutput();
}
shitfData() must be called before stepCounter() call.
When sending data, that's not important, but when receiving data the buffer (USIBR) has to be updated after reading Pin data.
Quote from arcachofo on August 26, 2024, 9:57 amThank you.
I will have a look, there are other places where shiftData() and stepCounter() are called.
Not sure why it is in this order, but I kind of remember that it was a reason, at least for some cases.
Thank you.
I will have a look, there are other places where shiftData() and stepCounter() are called.
Not sure why it is in this order, but I kind of remember that it was a reason, at least for some cases.
Quote from Coethium on August 26, 2024, 10:33 amI guess this is specific to the Timer Compare Match, because all actions are taken (sequentially) at the same time. Others modes of operations separate stepCounter() and I/O on different edges of the clock.
I guess this is specific to the Timer Compare Match, because all actions are taken (sequentially) at the same time. Others modes of operations separate stepCounter() and I/O on different edges of the clock.