Tom's Physics 123 Page


May 20, 2009

Review session, Tues., May 19, 2009, TCH
Solution to excerpt from May 08 exam. We went through the first of these test questions ('talk detector') at the reviewish classes held Tues., Wed. May 5, 6, 2009, TCH

May 2, 2009

Class 23: Bare uC Peripherals (Fri., May 1, 2009, PH)
Class 23: Bare uC Peripherals (Thurs., Apr 30, 2009, PH)

May 1, 2009

The Big Picture (suitable for framing) - Warning, kinda big file (7MB)

April 28, 2009

Final exam date and place: Thursday, May 21, 9:15 a.m., Jefferson 250. (Jefferson is the big old brick building where you took the midterm).
Class 22b: projects, standalone micro, serial protocols (Tues., Wed., Apr 28, 29, TCH)
Lab 22b: micro 6: standalone microcontroller
Lab 23 update: micro 7: update re project ideas

April 27, 2009

Class 22: Microcontrollers 5: moving pointers, ADC/DAC interface (Thu., Fri., Apr 23,24, TCH)
Note on Verilog
Template files for two verilog problems:
Two-bit counter:
two_bit_simplest_ctr_ise.zip Full project file (.ISE), for simplest 2-bit counter; zipped. You can unzip this and then open the .ise file as a part of HW D2.
2-bit simplest counter source file (two_bit_simplest_ctr.v) If you prefer to put together the pieces of your project, then open a new project and use "add source" to add this design file and the testbench file ("..._tb.v"), just below.
2-bit simplest counter testbench file (two_bit_simplest_ctr_tb.v)
2-bit up/down counter testbenchfile (two_bit_up_dn_ctr_tb.v) This is a testbench for the up/down counter that we'd like you to write. Include it in your up/down project. The filename remains as in the original file--two_bit_simplest_ctr.v. Don't change that filename, as you modify the counter file so as to make it count up/down.

Bus arbiter:
bus arbiter file (bus_arbiter.v)
bus arbiter testbench file (bus_arbiter_tb.v)

April 23, 2009

HWD4, due Tuesday, April 28, 2009

Lab 20: micro 3
Lab 21: micro 4
Lab 22a: micro 5: 'storage scope,' timers, SPI bus;

Lab 22 Program Sources

Here are some programs that one might want to run on the micro in standalone mode. Two--digipot and servo--call for input from keypad at external port 0. When you run these stand-alone, you will need to provide this byte of input in another way: you can connect the keypad to a free port (such as port 1); even easier, connect a pair of DIP switches to ground/float each of those 8 inputs.
The two pulse-measuring programs are written without reference to an external bus, so no rewriting is required (beyond swapping between two versions of a few lines of SHOWCAP code, in the second of these programs, the one that uses a timer).
SPI digital potentiometer program (SPI_digipot_int_504.a51)
First timer program: TMR800.A51
Servo motor control program (servopulse_1204.a51).
Pulse-measuring program (decimal output, 16-bit output: hi to P0, lo to P2) (pulse_measure_decimal_16bit_standalone.a51).
Pulse-measuring program (decimal output) (pulse_measure_decimal_standalone_505.a51).
Pulse-measuring program (hex/binary output) (pulse_measure_capture_standalone_509.a51).
LCD display code (8-bit interface) .
LCD display hardware (8-bit interface) .
Keypad encoder program (4X4 keypad) .
keypad hardware .

C files to try

These are very simple C programs, equivalent to some of the labs' assembly-language programs. They may help to introduce you to some of the 8051 extensions to the language; there's nothing clever, here.
delay_bitflip_408.c Flips bit P1.0 at about 2 Hz. Useful to reassure yourself that a download to Flash ROM has worked.
keypad_to_disp_408.c Exact equivalent to an early Lab 19 program.
keysum.c Another lab 19 program: adds keypad value to running sum.
int_separate_intsetup.c Increments display on each INT0* interrupt (a lab 20 program equivalent).
adc_dac_int_408.c Reads sample from ADC to DAC on each interrupt (a lab 21 program equivalent).
bit_test_c_dec07.c A simple bit-test loop, equivalent to a lab 20 program.
tblcopy_804.c Copies a small table.
tblcopy_reverse_406.c Copies a small table, in reverse order (this is hard work in assembly, and dead easy in C!)

Lab mu6/23: Project Update (supplement to Manual's Lab 23)

April 22, 2009

Class 21: Microcontrollers 4: Status Flags; Interrupts (Wed., Apr 22, PH)
Class 21: Microcontrollers 4: Status Flags; Interrupts (Tues., Apr 21, PH)


April 20, 2009

Class u3/20 notes (updated version of Manual's class 20) Pp. 6-8 treat masking--and, in particular, how to clear the top 4 bits of a byte, a process involved in testing for key values in HWD3's last question ("A or B...").

April 18, 2009

do_ab_button_mt_409.a51: template file for HWD3 doA, doB external-bus version This template takes care of clearing flags-- a task that is best done with masking. This masking seemed a bit too fussy to impose on you in one of your early programming tasks.

April 17, 2009

Class 20: Microcontrollers 3: Stack, Subr, Bit ops (Fri., Apr. 17, TCH)
Class 20: Microcontrollers 3: Stack, Subr, Bit ops (Thurs., Apr 16, PH)
Class 19: Microcontrollers 2: Assembly Language - Keypad & Display (Wed., Apr 15, PH)


April 14, 2009

HWD3, due Tuesday, April 21, 2009
Class Micro 2 daily notes, Tues., Apr. 14, TCH
REACT_MT.abl: template file for HWD2 ABEL exercise

April 12, 2009

Note on bit operations for 8051
Note on addressing modes for 8051
Class Micro 1 notes (updated version of Manual's class 18)
Class Micro 2 notes (updated version of Manual's class 19)

April 10, 2009

Class 18: Microcontrollers 1: Enter the uC! (Fri., Apr 10, PH)
Class 18: Microcontrollers 1: Enter the uC! (Thurs., Apr 9, PH)

Corrected page 2 of solu to HW D1

Lab mu1/18: processor
Lab mu2/19: I/O


8051 References

8051Instruction Set Reference (Phillips) (this is xeroxed "Reference B")
8051 tutorial,from Web (this is xeroxed "Reference A")

Dallas data sheet for DS89C420/30 processor
Dallas high speed microcontroller User's Guide
Index to selected topics in Dallas User's guide

Raison 8051 assembler and simulator

Here is the excellent free program (free for code size under4K) that I use to assemble and simulate code. kit51_747_.exe: zipped Raisonance assembler, compiler & simulator. (18.5M, expands to 50M) (37 Meg, zipped)
And here--long before you'll need it--is a file of vector names--an".INC" file that zealots will want to include in the INC directory oftheir Raisonance/Ride installation! (I realize I may be speaking to no one atall.) Here it is: a table of symbolic names for the80C320's vector addresses (for use with a program that relies oninterrupts). These vector addresses are the same for the DS89C420 and DS89C430, incidentally.

Link to RIDE documentation: detailed user's guide


I expect this is much more than you want; but here it is, anyway, for thezealot who wants the full story about the Raisonance assembler, compiler &simulator.
Part I
Part II

It's a zipped file (about 37M),and includes instructions.
When we ask you to do some coding, Ride will help a lot, though it is notessential (you can use the programmer's reference, in the posted set ofsources, to see the instruction set. You may not need even that: some preferjust steal code from the lab programs!). The file: ShortNote on how to use the RIDE Assembler & Simulator
Sampleprograms (some of those used in the micro labs)

April 8, 2009

HWD2, due Tuesday, April 14, 2009

Class 17: Digital 5: Analog-digital, PLL (Wed., Apr. 8, TCH)

Class 17: Digital 5: Analog-digital, PLL (Tues., Apr. 7, TCH)
Class D5 analog-digital notes (updated version of Manual's class 17)
Note on sampling


April 5, 2009

Class 16: Digital 4: Review, Memory (Fri., Apr. 3, TCH)
Class 16: Digital 4: Review, Memory (Thurs., Apr 2, PH)

Class 15: Digital 3: Review, Counters, and HDL intro (Tues., Mar. 31, TCH)

Lab D5/17, analog-digital interfacing
Note on flip-flop applications May help with the 'reaction timer' question of HW D1.


April 1, 2009

Class 15: Digital 3: Review, Counters, and HDL intro (Wed., Apr 1, PH)

HWD1, due WEDNESDAY, April 8, 2009
glue_mt.abl ABEL template file: you are to insert equations into this file. .
Note on address decoding Just a couple of pages; may help with the 'write protect' question of HW D1.

Two Logic Compilers

ABEL and Verilog download, free from a PLD manufacturer, Xilinx. The download is very large (probably you'll need > 100Megs--and the largest version offered is 1.7Gig!). You'll find the program here: Xilinx ABEL download (restricted to Xilinx parts); Click on ISE WebPACK, register, and download. (You do not need the ModelSim simulator.)

Note on using ABEL with Xilinx download
Note on Xilinx ISE, more generally: Verilog and ABEL ABEL discussion begins only on p. 9; some overlap with the note just above.

Lab D4, memory


Mar. 20, 2009

Class 14: Digital 2: Review and Flip-flops (Thurs., Mar 19, PH)


Mar. 19, 2009

Class 14: Digital 2: Review and Flip-flops (Thurs., Mar 19, PH)


Mar. 18, 2009

Class 13: Digital 1: gates (Wed., Mar 18, TCH) This is much fuller than Tuesday's set of notes; Tuesday people may feel shortchanged--and may want to look at these notes.
Class 13: Digital 1: gates (Tues., Mar 17, TCH)

Lab D1, Gates
Lab D2, Flip-flops


Mar. 11, 2009

Class 12: FET switches (Wed., Mar 11, PH)


Mar. 10, 2009

Class 12: FET switches (Tues., Mar 10,TCH)


Mar. 6, 2009

Class 11: Voltage Regulators (Fri., Mar 6, PH)


Mar. 5, 2009

Class 11: Voltage Regulators (Thurs., Mar 5, PH)

Class 11a: PID motor loop (Tues.,Wed., Mar. 3, 4 2009, TCH)

Lab 11b, FET switches


Mar. 3, 2009

HW 5 (due TUESDAY., Mar. 10, 2009)

Lab 11a, Voltage Regulators
PID notes


Feb. 28, 2009

Lab 11, Op Amps 5: PID motor control loop
Class 9/10b: Op-Amps IV - nasty positive feedback (Fri., Feb 27, TCH)
Class op amps 3 notes: nice positive feedback (updated version of Manual's class 10)


Feb. 26, 2009

Class 9/10b: Op-Amps IV - nasty nasty positive feedback (Thurs., Feb 26, PH)

Lab 9/10b, Op Amps 4: nasty positive feeedback


Feb. 25, 2009

Class 8/10a: Op-Amps III - nice positive feedback (Wed., Feb 25, PH)

Feb. 24, 2009

Class 8/10a: Op-Amps III, nice positive feedback (Tues., Feb. 24, TCH)

HW 4 (due TUESDAY., Mar. 3, 2009)


Feb. 20, 2009

Class 7/9: Op-Amps II (Fri., Feb. 20, TCH)
Class 7/9: Op-Amps II (Thurs., Feb 19, PH)


Feb. 18, 2009

Corrected HW 3 (due TUESDAY., Feb. 24, 2009) Duplicate 'bad circuit' page replaced (2/23/09). This is due TUESDAY rather than Monday, because I was late getting it posted. We'll work our way back to Monday due dates, next week. The appendix of partial data sheets included in the paper version does NOT appear in the posted version.

Lab 7/9, Op Amps 2
Lab 8/10, Positive feedback I (benign)

Class 6/8: Op-Amps I (Wed., Feb 18, PH)
Class 6: op amps I (Tues., Feb. 17, TCH)


Feb. 14, 2009

Class 5: transistors II (Fri., Feb. 13, TCH)
Class 5: transistors II (Thurs., Feb 12, PH)


Feb. 11, 2009

Class 4: transistors I (Wed., Feb 11, PH)
Class 4: transistors I (Tues., Feb 10, TCH)

Lab 5: Transistors II
Lab 6/8: Op Amps I


Feb. 2, 2009

HW 2 (due TUESDAY., Feb. 17, 2009) FIXED 2/17/09.
Extra note: why LC's ringing dies away
Transistor summary
Class 3: Inductors, Diodes (Fri., Feb 06; TCH)

Class 3: Inductors, Diodes (Thurs, Feb 05; PH)


Feb. 03, 2009

Class 2: RC Circuits (Tues., Feb. 03; TCH)
Note on reading capacitors
C notes: toward intuition about RC circuits
Class 2 notes (updated version of Manual's class 2)

JFeb. 2, 2009

HW 1 (due Mon., Feb. 9, 2009)
Lab 3: Diode Circuits
Lab 4: Transistors I (bipolar)


January 30, 2009

Class 1: DC Circuits (Fri., Jan 30; TCH)

Class 1: DC Circuits (Thurs, Jan 29; PH)


January 28, 2009

Classlist and sections (Rev 1) If you can't come on the listed day, tell Tom (hayes@physics), and come when you can.


January 27, 2009

Course Information
Course Schedule
1st-day Signup Form
Lab 1: DC Circuits
Lab 2: RC Circuits


Link to Text problem solutions, and old exams (some with solutions)


Click here to hop to old Finals, and Text-problem solutions


Files are in Acrobat (PDF) Format, Download Acrobat Reader

Most recent entries at top of page