ATtiny Direct Interrupts Performance and Use for Switch Debouncing
This video uses an ATtiny 412 to show direct interrupts (not using Arduino attachInterrupt) and their performance. It also shows how to use the ATtiny Real Time Counter (RTC) Periodic Interrupt Timer (PIT) to generate a periodic direct interrupt and use it to implement a robust switch debouncing algorithm. Chapter 0:00 Introduction 0:32 Microcontroller timers 1:14 ATtiny RTC/PIT 1:42 Register example 2:09 System diagram 2:45 Breadboard 2:55 Software 7:03 PIT on scope 7:23 External IRQ on scope 8:40 Direct interrupt performance 10:11 Switch debouncing 11:28 Debounce in action 12:48 Dual pin interrupt performance 13:27 Summary Some diagrams are from the ATtiny datasheet. Links: Previous pin interrupts video: https://youtu.be/B8oWOgiHOlg megatinycore interrupts: https://github.com/SpenceKonde/megaTinyCore/blob/master/megaavr/extras/Ref_Interrupts.md Ganssle part 1: https://www.ganssle.com/debouncing.htm Ganssle part 2: https://www.ganssle.com/debouncing-pt2.htm github: https://github.com/grughuhler/attiny See attiny_debounce and attiny_pin_interript_direct directories. Also see my other videos on AtTiny, including this one on getting started: https://youtu.be/lYAg8OusiIU
Download
0 formatsNo download links available.