lec 4 Flashcards
what are the 2 types of interrupts you can use with a microcontroller
hardware and software interrupts
how can you have a greater control when coding program
using both hardware and software interrupts can simply coding
can parameters pass ISR when its called
No parameters can be passed
what is ISR
Interrupt Service Routine
where are the external inputs on arduino and on what pins
INT0 and INT1, on pins 2 and 3
what function is required for the use of INT0 and INT1 and for what external inputs
attachInterrupt() function
pin 2 and 3
what can ISR do
ISR can access global variables, however the variables need to be declared
as volatile if the ISR is required to change their values
what 2 functions cant be used for ISR
Both delay() and millis() cannot be used in the ISR
what 4 condition can happen when interrupt is triggered
LOW
CHANGE
RISING
FALLING
what does timer interrupts allow you to do
execute tasks at very
precisely controlled timing intervals, regardless of the progress of code
why is it very hard to accurately control timed events in void loop()
some commands have a longer execution time than others
how to solve long execution commands on void loop()
Using a timer interrupt solves this problem
how many timers does Arduino has
3 inbuilt timers