ATMega8 Flashcards
What is the function of the PORTX register?
It is the data register for the specific Port
What is the function of the DDRX Register
It will control the direction of each Pin on a register. Logic 1 on the pin means output and logic 0 means input.
What is the function of the PINX register?
It is the address for a specific pin on a register.
What is wrong with creating a time delay using a loop or a pre defined C function?
They are blocking, in a while loop nothing can happen until the loop finishes. Same with the pre defined terms.
What is Polling?
The CPU is constantly checking for input. Think of it like someone is constantly checking the door to see if someone is there.
What is good about Polling??
It is software driven so simple and fast to implement. The designer knows when the system will check which helps predictability.
What are the disadvantages of Polling??
The CPU is busy having to wait and check which can waste processor time.
If the Polling rate is not fast enough then the system could miss inputs.
Can only wait for a single event at a time.