This shows you the differences between two versions of the page.
pm:lab:lab4-2021 [2021/04/05 11:37] jan.vaduva [4. Exercitii] |
pm:lab:lab4-2021 [2021/04/05 12:15] (current) alexandru.predescu [4. Exercitii] |
||
---|---|---|---|
Line 133: | Line 133: | ||
<hidden> | <hidden> | ||
**Soluția** se găsește pe [[https://www.tinkercad.com/things/b2Yra0sAu2J-brilliant-lappi-habbi/editel?sharecode=LfeWdU6ojyT1VzyOCdjwU3ieYR6u4bV2-lEko5iVrTc|Tinkercad Interrupt]] | **Soluția** se găsește pe [[https://www.tinkercad.com/things/b2Yra0sAu2J-brilliant-lappi-habbi/editel?sharecode=LfeWdU6ojyT1VzyOCdjwU3ieYR6u4bV2-lEko5iVrTc|Tinkercad Interrupt]] | ||
+ | |||
<code> | <code> | ||
void timer_setup(){ | void timer_setup(){ | ||
Line 205: | Line 206: | ||
// Even if this does nothing. It has to be here | // Even if this does nothing. It has to be here | ||
// Else the code just doesn't work. Still don't know why. | // Else the code just doesn't work. Still don't know why. | ||
+ | // [AP] Deoarece ai activat intreruperea de compare match: TIMSK0 |= (1 << OCIE0A); | ||
+ | // [AP] Astfel, daca nu e definit ISR-ul se va reseta uC | ||
} | } | ||
Line 274: | Line 277: | ||
// Even if this does nothing. It has to be here | // Even if this does nothing. It has to be here | ||
// Else the code just doesn't work. Still don't know why. | // Else the code just doesn't work. Still don't know why. | ||
+ | // [AP] Deoarece ai activat intreruperea de compare match: TIMSK0 |= (1 << OCIE0A); | ||
+ | // [AP] Astfel, daca nu e definit ISR-ul se va reseta uC | ||
} | } | ||