Final Flashcards Preview

OP Systems > Final > Flashcards

Flashcards in Final Deck (33):
1

What is a port?

A defined physical address that is physically wired to a dedicated pins

2

Are ports bidirectional and what does that mean?

Yes they are because a direction bit associated with a port can determine whether it is an input or output

3

If the direction bit is HIGH on the HC12 what is the direction of the port?

output

4

What is the drawback of using delay loops as a event timing mechanism to solve switch bounce?

the cpu can't do anything else while this delay is executing

5

what problems must be solved with the "delayed read" approach to debouncing?

what does "going away" mean?
how long should I wait?

6

what problems must be solved with the digital filter method of deboucing

how do I "check" at regular intervals?
how many intervals do I need?
what is my threshold for saying "yea this was probably the state"?

7

how can debouncing be solved with hardware?

pass the signal through a low pass filter ( RC circuit) which reject most of the debouncing - you want to turn the shitty RC output into a crisp signal using a schmidt trigger buffer

8

PUCR bit 0 is only set in which mode?

input mode

9

PUCR bit 1 is only set in which mode?

output mode

10

what is the point of pull up resistors?

solves the "floating" issue, where the state of a pin that is not connected to anything cannot be read as high or low

11

what do you do if it is not possible to drive a physical pin high (open collector / open drain pins)?`

externally pull it up and write 0 for high input and 1 for low input
write 0 to output port if you want the pin to be an input (floats the pin)

12

what is the best way to determine wait time?

trial and error baby

13

what is the point of A to D conversion?

computer systems deal with digital quantities (binary bit patterns) but most physical devices are fundamentally analog

14

what is "resolution" really?

the smallest value that can be represented by one bit

15

what are the flaws of single slop a/d conversion

- conversion time depends on magnitude of input voltage
- if RC/T is not an exact power of 2 (almost always) errors can come creepin

16

how long does an event driven program run

forever

17

computes changing outputs by ?`

monitoring changing inputs

18

in event driven programming what 3 jobs do we have for every task?

start the task, wait for task to complete, process result of task

19

what is the process of repeatedly checking results?

polling

20

what limits the effectiveness of polling?

the amount of peripherals that are added - imaging checking a million inputs every micro second fUKCKKK that

21

what are some causes of interrupts?

wait time expiration, hardware task completion, alarm condition detection, user interaction

22

what software routine processes interrupts?

interrupt service routine (ISR)

23

what calls ISR's and where must they be stored?

they are called by hardware and must be stored in the vector

24

what are interrupt vectors?

addresses of ISR's

25

how many bytes on the stack does each interrupt require?

9 bytes

26

what is special about the NMI interrupt and what is it used for?

it cannot be disabled and it is for emergency events

27

what is the purpose of serial communication

to provide data to host computerss

28

what simple concept characterizes all serial communication?

data is transmitted ONE BIT AT A TIME HOLY TITTIESSS

29

What needs to be specified for RS-232?

baud rate (bit rate), data size, parity, how many stop bits

30

what does I2C use?

a two-wire protocol with an explicit clock line

31

what indicates start in 12C

a falling edge on SDA and SCLK high

32

what indicates stop in 12C

a rising edge on SDA and SCLK high

33

what is uniform process for complex serial communication?

1. initialize and configure
2. wait for transmit ready status flag to transmit
3. wait or receive ready status flag to read new data to memory