In the following table book 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 last 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

Book Problems

Non-book Problems

1

1/26

2#1,2,3,4,7,8
3#2,3,4
4#3,5
5#1

2

2/2

2#5,6
4#1,2
5#3,4
6#1,3
7#1,2
Computer Chap 1#2,3

3

2/9

4#4,6,7
5#2,5
6#7,8,9
7#5,6,7

H3 Prob 12 below.

4

2/16

5#6
8#1,2
9#3,5, 6
10#1,2,3,4

H4 Prob 11 below
H4 Prob 12 below

5

2/23

7 #9
8 #3
10 #5
11#1,2
11 #3
12 #2
13 #2, 8
Comp 1#4, 5

H5 Prob 12 below.

6

3/2

5#7,8
7#8
12#3
13#7, 9, 10, 11
14#1, 2, 3
15#1

7

3/9

5#9, 10
16#2, 3
17#1, 2, 3, 4

H7 Prob 11 below.
H7 Prob 12 below.

Spring Break

 

H#

Due

Problems Assigned

Extra

8

4/6

5#11, 12
6#4, 5
20#1, 2, 3, 4
21#1, 2

H8 Prob 11 below.
H8 Prob 12 below.

9

4/13

5#13,14
6#6
10#6
20#5,6
21#3,4

H9 Prob 9 below.
H9 Prob 10 below.
H9 Prob 11 below.

10

4/20

7#3, 4
9#2, 4
22#1,2,3
24#1,2

H10 Prob 10 below
The last homework!

H3 Prob. 12.

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().

H4 Prob. 11

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.

H4 Prob. 12.

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....

H5 Prob. 12

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.

H7 Prob. 11

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?

parity generator

 

H7 Prob. 12

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.

H8 Prob. 11

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.

H8 Prob. 12

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.

 

H9 Prob. 9

9) Plot the relationship between Vin and Vout for the following circuit and explain your reasoning.

reversed comparator

H9 Prob. 10

Modify the simple voltmeter program from section 11.1.1 to average 100 individual voltage samples and print the average voltage once per second.

H9 Prob. 11

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?

H10 Prob. 10

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.

Physics 245