lec 4 Flashcards

1
Q

what are the 2 types of interrupts you can use with a microcontroller

A

hardware and software interrupts

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

how can you have a greater control when coding program

A

using both hardware and software interrupts can simply coding

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

can parameters pass ISR when its called

A

No parameters can be passed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

what is ISR

A

Interrupt Service Routine

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

where are the external inputs on arduino and on what pins

A

INT0 and INT1, on pins 2 and 3

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

what function is required for the use of INT0 and INT1 and for what external inputs

A

attachInterrupt() function

pin 2 and 3

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

what can ISR do

A

ISR can access global variables, however the variables need to be declared
as volatile if the ISR is required to change their values

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

what 2 functions cant be used for ISR

A

Both delay() and millis() cannot be used in the ISR

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

what 4 condition can happen when interrupt is triggered

A

LOW
CHANGE
RISING
FALLING

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

what does timer interrupts allow you to do

A

execute tasks at very

precisely controlled timing intervals, regardless of the progress of code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q
why is it very hard to accurately control timed events in 
void loop()
A

some commands have a longer execution time than others

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

how to solve long execution commands on void loop()

A

Using a timer interrupt solves this problem

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

how many timers does Arduino has

A

3 inbuilt timers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly