LAB RULES

Please review the lab rules. Please clean up the lab when you leave. Some people leave used wire and insulation on the tables and floor. Some basic lab rules have been posted on the course web site, so please refer to them. Remember to close the lab door when you are the last person to leave the room and remember to turn off the soldering iron.

---------------------------------------------------------------------

DECOUPLING/POWER SUPPLY WIRES

Although we talk about the issue many times each semester, I still notice students either not using decoupling capacitors or placing them far away from their chips. Plan on using decoupling capacitors for most of your ICs. Also, consider using thicker wire for the primary power supply circuits on your board, namely the 2.1mm plug, the diode bridge, and the regulator. Using thicker wire in these areas reduces the impedance of the connection, thus reducing electrical noise and heat. You can either use the 22AWG solid core hookup wire in the lab, or double up the wire wrap wire for those connections. Some companies, such as JB Saunders, may also provide bus bars which you can use for distributing power to various points in your circuit. Bare 22AWG wire in a few key points around your circuit can make a convenient place to hook oscope probes, but be careful to arrange your circuitry so that things are not easily shorted.

---------------------------------------------------------------------

LAB ASSIGNMENT CLARIFICATIONS

Q) In reading the programming portion of Lab #2, I came up with a question: How literally do we need to interpret the assignment? Specifically, we need to make an LED blink once a second and increment a global variable, and toggle a second port pin every 5 interrupts. So can the LED be on for 1 second, then off for one second (or maybe 500ms each)? And can we clear the global variable every 5 interrupts, or does this variable need to continually increment and allow for rollover?

A) The intent was to have the LED lit once per second - the duty cycle is your choice. If it blinks once every two seconds, I'm not going to complain. The intent is to make sure everyone knows how to control timing and interrupts precisely. The global variable can be managed anyway you want, as long as the second port pin toggles every five interrupts. For most things, my philosophy is for you to learn the concept rather than be 100% accurate in small details; however, there are some things which you must implement exactly.

---------------------------------------------------------------------

8051 PIN ALLOCATION 

Q) Which pins of the Port 1 (or Port 3) won't be used for any external peripherals (so I can hook my status LED to one of those pins and not have to worry about changing the wiring later)?

A) Several pins have a defined pin use in this class and others are not defined and may be used as you wish as shown below:

---------------------------------------------------------------------

DEFINED PIN USE

P3.0 RxD for serial port (Lab #3)

P3.1 TxD for serial port (Lab #3)

P3.6 WR*

P3.7 RD*

NO DEFINED PIN USE

P1.0, P1.2, P1.3, P1.4, P1.5, P1.6, P1.7 are available for things like LEDs, interfacing to an LCD or keypad, I2C, etc.

P1.1, P3.2, P3.3, P3.5 are available unless you want to use a counter or external interrupt (see one of the optional parts of Lab #2)

---------------------------------------------------------------------

POWER CONSUMPTION

Some students have noticed their regulators getting hot. This is a function of how much current your circuit draws. For instance, the more LEDs and chips you have in your design, the more heat is dissipated by the regulator. If the heat is too great, you will have to consider adding a heat sink to the regulator, adding a second regulator, switching to a larger regulator package which can dissipate more heat, or modifying your design to use less current.

---------------------------------------------------------------------

VOLTAGE REGULATOR

A few students have had questions about the voltage from their voltage regulators. As you'll notice from the 7805 spec sheet, that regulator produces an output of 4.8V to 5.2V. If your regulator produces an output voltage outside that range, we may need to swap your regulator for a new one. Before swapping, check the voltage differential between the input and ground on the regulator. If that difference is less than 7.0V, the regulator is not being supplied with the correct voltage (remember the dropout voltage spec on the regulator).

---------------------------------------------------------------------

BOARD LAYOUT/ENCLOSURE

Some students have asked whether they should enclose their boards in some type of box, such as the one I showed in class. If you are new to system design, I would highly recommend just focusing on the electrical issues and don't focus so much on the mechanical issues - just leave your perf board at its original size and don't try making it smaller to fit in an enclosure. The mechanical design can take much more time than many students estimate. Students may want to transport their boards in some type of protective case. Tupperware storage containers and fishing tackle boxes have been used with success in the past.

---------------------------------------------------------------------

LED DRIVER CIRCUIT

Some students have experienced difficulties in getting their port pins to drive an LED by using an NPN transistor. Note that the port pins on the C501 can sink much more current than they can source, so you may want to use a PNP transistor to drive your LED. Also note that when the port pins are outputting a logic high, the output strength (source current) is much greater if the output voltage remains above 2.0V; if your external circuit pulls the port pin lower than 2.0V, one of the driver FETs inside the port pin circuitry shuts off and reduces the output current. If you use a PNP transistor to drive your LED and if you connect the emitter of the PNP directly to 5V, do not connect the base of the transistor directly to an output pin of the microprocessor or other chip without including a current limiting resistor.

---------------------------------------------------------------------

SWITCH DEBOUNCING

For more information about switch debouncing, you can refer to the Maxim 6816 switch debounce data sheet which is available on the course web site.

---------------------------------------------------------------------

LAB STOCK

In response to requests from students, we plan to put a couple of small parts cabinets in the lab so that students have 24-hour access to parts like resistors/capacitors/etc.

---------------------------------------------------------------------

LAB #3 AND MONITOR/DEBUGGER PROGRAMS

The faster you get SRAM and RS-232 working, the sooner you get to use a monitor/debugger program (e.g. PAULMON or MON51), thereby shortening your code development time.

---------------------------------------------------------------------

LAB 4

Lab #4 will be available on the course web site, along with guides for connecting your EEPROM and LCD. 5.1K resistors will be available in the lab for the SCL and SDA pull-ups. You can choose between two LCDs: a 16x1 LCD ($x.xx) and a 20x4 LCD ($y.yy). The smaller LCDs take up less space, but the larger LCDs have a connector which is easier to hook up to, so you'll need to make the decision as to which one you'd prefer. Both LCDs use the HD44780 LCD controller chip, so the electrical interface and firmware interface is identical for the two LCDs.

---------------------------------------------------------------------

MOTORS

Check out the Motor Information link I put on the course web site - there are many good links to information on motors, chips, and application notes.

---------------------------------------------------------------------

COURSE FCQs

Students fill out the course evaluations at the end of the semester, so please make every effort to be at that class. Your feedback is a critical component to the course and I will take your comments into consideration as I structure the course for future semesters. I will need one student who will volunteer to turn in the evaluations to the Dean's office after the evals have been completed by all the students present that evening.