Flashcards in Final Deck (33):
What is a port?
A defined physical address that is physically wired to a dedicated pins
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
If the direction bit is HIGH on the HC12 what is the direction of the port?
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
what problems must be solved with the "delayed read" approach to debouncing?
what does "going away" mean?
how long should I wait?
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"?
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
PUCR bit 0 is only set in which mode?
PUCR bit 1 is only set in which mode?
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
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)
what is the best way to determine wait time?
trial and error baby
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
what is "resolution" really?
the smallest value that can be represented by one bit
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
how long does an event driven program run
computes changing outputs by ?`
monitoring changing inputs
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
what is the process of repeatedly checking results?
what limits the effectiveness of polling?
the amount of peripherals that are added - imaging checking a million inputs every micro second fUKCKKK that
what are some causes of interrupts?
wait time expiration, hardware task completion, alarm condition detection, user interaction
what software routine processes interrupts?
interrupt service routine (ISR)
what calls ISR's and where must they be stored?
they are called by hardware and must be stored in the vector
what are interrupt vectors?
addresses of ISR's
how many bytes on the stack does each interrupt require?
what is special about the NMI interrupt and what is it used for?
it cannot be disabled and it is for emergency events
what is the purpose of serial communication
to provide data to host computerss
what simple concept characterizes all serial communication?
data is transmitted ONE BIT AT A TIME HOLY TITTIESSS
What needs to be specified for RS-232?
baud rate (bit rate), data size, parity, how many stop bits
what does I2C use?
a two-wire protocol with an explicit clock line
what indicates start in 12C
a falling edge on SDA and SCLK high
what indicates stop in 12C
a rising edge on SDA and SCLK high