In the following table problems are numbered Chapter#Problem so that 3#15 would be problem 15 in chapter 3. Multiple problems in one chaper will be separated by commas thus 2#2,3,4,6 refers to four problems in chapter 2.
Some assignments have extra problems or extra information
for some of the book problems. you can find these extras by
following the links in the Extra column.
NOTE these are intrinsic parts of the
homework and are NOT optional.
I shade in blue the assignments that have been completed.
H# |
Due |
Problems Assigned |
Extra |
1 |
1/25 |
2#1,2,3,4,7,8 |
|
2 |
2/1 |
2#5,6 |
|
3 |
2/8 |
4#4,6,7 |
|
4 |
2/15 |
5#6 |
|
5 |
2/22 |
7 #9 8 #3 10 #5 11#1,2 11 #3 12 #2 13 #2, 8 Comp 1#4, 5 |
|
6 |
3/1 |
5#7,8 |
|
Spring Break |
|
||
H# |
Due |
Problems Assigned |
Extra |
7 |
4/5 |
5#9, 10 |
|
8 |
4/12 |
5#11, 12 |
H8 Prob 9 below. H8 Prob 10 below. H8 Prob 11 below. H8 Prob 12 below. |
9 |
4/19 |
5#13,14 |
H9 Prob 9 below. |
10 |
4/28 |
7#3, 4 |
H10 Prob 10 below The last homework! |
Write a computer program that sits reading characters from the serial port and echoing them back in the opposite case. That is, if the user types 'a' then the program should send back 'A', if the user types 'Q', the program should send back 'q', etc.
Hint: look at the ASCII table in computer chapter 1. Also, remember that Serial.write(<val>) is the exact opposite of Serial.read().
Write a program using the Serial routines to read two 16-bit numbers from the user and print their product, quotient, and remainder. Some credit will given for making the program user friendly with suitable prompts and output formatting.
Write a program that sits reading +ve integers from the serial port. It should stop when a negative number is entered and then it should print the largest and smallest values that were entered. Obviously, it will then go back and ask for more input numbers and start over again.
Thus the interaction should look something like this
Enter numbers (-ve to end) 23 46 103 27 5 -1 The largest value was 103 and the smallest was 5. Enter numbers....
Write a program that sits reading single characters from the serial port. It should normally do nothing but any time the user enters the characters 'a', 's', and 'k' in that order, with no intervening characters, the program should print "Shan't!".
HINT: There is an article on the web site (NOT Blackboard) about programming a CodeLock like the one on the lab door. It shows how to recognize a sequence with a state machine like the one that we used for traffic lights.Construct a truth table to demonstrate that the following circuit is a parity generator. That is, a circuit whose output tells us whether the number of inputs that are true is odd or even. Is the output true for even parity or odd parity?
Write a pulse width modulation helper subroutine. It should have the declaration
void Pulse(pin, period, onTime);
and should make the appropriate go HIGH for onTime mS and then off for period-onTime mS. pin can be an int and you will need to think what would be sensisble types for period and onTime.
Modify the simple voltmeter program from section 11.1.1 to average 100 individual voltage samples and print the average voltage once per second.
In Chapter 20 we believed in the first Golden Rule, that the inputs draw no
current. Now we are wiser we know that they actually draw a small Bias current.
Consider an inverting amplifier with input resistor 10k and feedback resistor 100k and
non-inverting input connected directly to ground. If we put a voltage of 0.10V on the
input what will be the output voltage
a) if we use an ideal op-amp,
b) if we use an op-amp with an input bias current of 1μA?
Write a program that allows the user to control the brightness of all 3 colors of the onboard LED (red on PF1, green on PF3, and blue on PF2) using single letter commands on the serial input.
Read section 20.7.3 in the electronics book and briefly describe the workings and possible uses of the integrator. Discuss the effect of adding a large value resistor in parallel with the capacitor that connects the output to the inverting input.
9) Plot the relationship between Vin and Vout for the following circuit and explain your reasoning.
10) Write a program that uses 7 LEDs connected to port B bits 0-6 to count through the numbers 1-6 displaying the numbers as they would appear on a die. You need to specify how to arrange the LEDs and should count at about 3 counts per second.