Timeline for Make LED blink using AVR assembly
Current License: CC BY-SA 3.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 17, 2016 at 18:19 | comment | added | James Waldby - jwpat7 |
Just to clarify what out PINB, r16 does, Atmel datasheets say "Writing a logic one to PINxn toggles the value of PORTxn, independent of the value of DDRxn."
|
|
Apr 16, 2016 at 8:03 | comment | added | Edgar Bonet | @JosueEspinosa: The Uno is clocked at F_CPU = 16 MHz. The timer ticks at F_T0 = F_CPU/1024. It overflows with a frequency F_TOV0 = F_T0/256. You want the toggling of the LED to happen at 1 Hz ≈ F_TOV0/61. | |
Apr 15, 2016 at 22:26 | comment | added | Josue Espinosa |
Would you mind detailing a little bit more on why you use the value 61 exactly?
|
|
Apr 15, 2016 at 21:55 | comment | added | Josue Espinosa |
Thank you. I am new to assembly and the low-level mindset and this was very informative and helpful. The reason I didn't use more self-documenting instructions (like dec ) is because I'm limited to an instruction subset as a challenge for an assignment.
|
|
Apr 15, 2016 at 21:54 | vote | accept | Josue Espinosa | ||
Apr 15, 2016 at 15:14 | history | answered | Edgar Bonet | CC BY-SA 3.0 |