What is a register? - Answers A special memory location inside the microcontroller that allows us to
configure the hardware.
What does the Data Direction Register do? - Answers Configures port as an input or output
What is the Port Register used for? - Answers It is used to output values from the microcontroller
How does the Data Direction Register (DDR) influence the operation of the Port Register? - Answers
When the DDR is configured as an input, the Port Register controls the internal pull-up resistors.
What is the difference between the Port Register and the Pin Register? - Answers The Port Register is
used to output values while the Pin Register is used to read values.
What happens if you attempt to read an input from the wrong register? - Answers It depends, but
more than likely you will read the status of the pull-up resistors.
How do you configure a port to be an output? - Answers You write a 1 to the corresponding Data
Direction Register bit.
How do you configure a port to be an input? - Answers You write a 0 to the corresponding Data
Direction Register bit.
YAY onto Serial Transfer Details - Answers HIIIIIIII
Use the following equation to calculate the composite value (12-bit number) for UBRR given a BAUD
rate of 19200 and system clock of 6 MHz.
UBRR = (Fclk / (BAUD*16)) - 1 - Answers 19
Determine the actual BAUD rate that would be produced when using the proper rounded value for
UBR:
BAUD = Fclk / (16* (UBRR+1) - Answers 18750
Determine the BAUD rate error for this proposed system: - Answers -2.34%
Given a BAUD rate of 19200, how long is each bit? - Answers 52.08 microseconds
(1/19200)
How long does it take to send the entire serial character? - Answers 520.8 microseconds
(1 start bit + 8 bits + 1 stop bit = 10
10 * 52.08 microseconds = 520.8 microseconds)
Given a system clock of 6 MHz and a BAUD rate of 100, calculate the 12-bit UBRR value and then
separate it into the UBRRL and UBRRH (you should have 3 values here) - Answers 12-bit = 3749
UBRRH = 14 = 0x0E
UBRRL = 165 = 0xA5
Onto Analog to Digital Converters! - Answers Whoop Whoop!
Reference Equation for LM34 Temperature Sensor (it is given on the paper) - Answers 5v 1 Degree F
---- x -------------
255 10mV
(could be 1023)
For the rest of this one it will pretty much tell you where to plug the numbers into. - Answers
YIPPEEEEEEE
For sharp sensors, most of it is given to you, you just have to plug numbers to get the slope and use
point-slope form. - Answers slope = y2-y1/x2-x1
How accurate/what is the resolution of the measurement? (equation) - Answers Absolute value of
the slope!
So, if I had a slope of -0.392, the accuracy would be 0.392 per ACD count
Timers! - Answers Speed, I am speed. 1 winner. 42 losers. I eat losers for breakfast.
What are the solution steps to measure a positive pulse with a timer? (8 steps) - Answers 1. Make
sure the signal is low
2. Wait for the signal to go high
3. Clear the counter value
, 4. Start counting
5. Wait for the signal to go low
6. Wait for the signal to go high
7. Stop counting
8. Read number of ticks
If the 16MHz base clock value was divided by 8 while making the measurement, how much time is
represented by each timer tick? - Answers Prescaler 8
---------- = ----------- = 2MHz
base clock 16000000
1
---------- = 0.5 microseconds
2MHz
Assume that the pulse on the right was received from the sensor. If the length of the pulse was
measured to be 10,000 ticks with a clock source of clk/8, how long in microseconds is the pulse? -
Answers 10000 x 0.5 microseconds = 5000 microseconds or 5ms
Given your answer to the previous question, how far away in cm is the object from the sensor? -
Answers 86.2 cm
Time in microseconds
Distance (cm) = ---------------
58
How far away in inches is the object from the sensor? - Answers 33.8 inches
Time in microseconds
Distance (cm) = ---------------
148
What is the maximum distance that can be measured using Timer 1 with this sensor when the clock
source is set to CLK/8? - Answers 565 cm
65535 x 0.5 = 32767.5
32767.5/58 = 565cm
How does that number change if you used CLK/1024? - Answers 72,314 cm
CLK/1024 >>>> Tick = 64 microseconds
65535 x 64 = 4194240 microseconds
4194240 microseconds/58 = 72,314 cm
BINARY YAYYYYY - Answers
100011101010101010101010110000110011010000101010101010000001111110010010001010010
110100110010010101010000101001010101010000101010111001001010000010101101010101001
01010010010101010100101010
decode that 😝😝
The binary number system is based on how many digits? - Answers 2
What is a bit in a binary system? - Answers A single digit in a binary value
How would you say the number 1101 in binary? - Answers One, one, zero, one
What is the base of this number 101 (subscript 10 idk how to subscript) and how do you know? -
Answers It is a decimal number (based 10) because the subscript is 10 indicating the base.
Convert the following binary numbers into their decimal equivalents: - Answers 😶😶
001110 - Answers 14
011101 - Answers 29
101011 - Answers 43
111001 - Answers 57
101111 - Answers 47
101100011101 - Answers 2845
Convert the following decimal numbers to their binary equivalent: - Answers 🎂🎂
68 - Answers 1000100
102 - Answers 1100110
147 - Answers 10010011
252 - Answers 11111100