DOC PREVIEW
SJSU ME 106 - Digital Signal Input and Output

This preview shows page 1-2 out of 7 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Digital I/O Laboratory DIO-1 Digital Signal Input and Output Purpose • To introduce the digital input and output functions of the OOPic microcontroller • To practice reading logic level signals from an input port • To practice sending logic level signals to an output port Components Qty. Item1 OOBOT 40-II microcontroller and serial port cable 1 470 Ω DIP resistor pack 1 7-segment LED (common anode (CA)) 1 7447 BCD to 7-segment LED decoder IC 2 tact switches 2 10 k resistors Introduction In this lab you will explore the input/output capability of the OOPic microcontroller. Microcontrollers are inherently digital devices, which means they operate with discrete values, usually the binary values 0 and 1. The voltages 0 V and 5 V respectively usually represent these discrete values. The OOBOT 40-II microcontroller can service up to 29 digital inputs or outputs. A digital output means that a program running on the OOPic can change the pin voltage to be either at common potential (0) or at 5 V by writing a 0 or 1 to that pin. A digital input means that the world outside the microcontroller can change the voltage on the pin to either 0 V or 5 V, and the microcontroller can record the value as a 0 or 1 respectively. 7-segment LED display You will use a 7-segment light emitting diode (LED) display as a digital output device and push-button switches as digital input devices. A 7-segment LED is nothing more than 7 LED’s arranged in a pattern that can form a character when the appropriate segments are lit. These displays come in two basic types: common anode (CA) and common cathode (CC). CA types have all of the anodes of the 7 LED’s connected together, and each of the 7 cathodes independent. Power is applied to the common anode, and a segment will be lit when its cathode is grounded. (Don’t forget to use a current limiting resistor between the cathode and ground!) The reverse is true for the CC types. Figure 1 below shows a schematic diagram of a CA 7-segment LED. The letters as shown denote the particular segment. Two of the physical pins on the display are tied together (made ‘common’). For the CA-type of display, the two pins connect to the common anode. For the CC-type of display, the two pins connect to the common cathode. The easiest way to figure out which pins correspond to which connections is to look at the data sheet for the device. Without a data sheet, you will need to “buzz” out the two common pins using the diode check function on a multimeter. ©San José State University Department of Mechanical and Aerospace Engineering Fall 2003 23SEP03Digital I/O Laboratory DIO-2 7 8 10 13 1 143 b c d e f ga dpdecimal pointb c d efg 8 7 a 1 14 2 11 9Face View Internal connection for Common Anode (CA) displayFigure 1 7-segment LED Display (Common Anode (CA) type. Two of the physical pins are tied together at the common anode of the display segments. The last LED is for the decimal point. Power is applied to the either of the common anode pins. A segment is lit when its cathode is then grounded through a current limiting resistor. Pin positions are numbered from 1 to 14, however some pins are not physically present on the actual device. See the data sheet for the particular device to find out which pin corresponds with which segment. 7447 BCD-to-7-segment (CA) display driver The most common way 7-segment displays are implemented is with a BCD-to-7-segment decoder/driver chip. This chip takes a 4-bit binary number (like 0101, which corresponds to decimal 5) as an input, and when connected to a 7-segment display, it causes the proper LED segments to turn on and display the corresponding decimal number. The chip used with CA displays is the 7447. For CC displays it is the 7448. Figure 2 shows the pinout diagram for the 7447 and describes its operation. (The actual lettering on the chip may include other letters and numbers like, SN74LS47). By standard convention, pin 1 on any IC package is always the lower leftmost pin when the IC is oriented as shown with the U-shaped notch, or dot toward the left. Pin numbers procede to the right and loop around the right end of the chip as shown. Some IC’s will only have the notch or dot; some have both b c d eg af 7447 BI/RBORBI 9 16 13 15 +5 V 14 12 10 11 8 1 4 2 3 B C LT 5 7 A6 DFigure 2 7447 BCD-to-7-segment decoder driver chip. This chip takes a 4-bit binary number applied to DCBA, where A is the least significant bit (LSB), and grounds the appropriate pin 9-15, so that when these pins are connected to a 7-segment LED display through current limiting resistor, the corresponding decimal number will appear on the display. The 7447 is used to drive common anode (CA) displays. Switch input You will use some switches to provide digital inputs. A switch is either on or off, hence it makes for a very simple digital sensor. You will use two momentary, normally open (NO) single pole, single throw pushbutton switches called ‘tact’ switches. These are intended for ©San José State University Department of Mechanical and Aerospace Engineering Fall 2003 23SEP03Digital I/O Laboratory DIO-3 soldering to PC boards, but by bending the leads properly, they can be inserted into a solderless breadboard. Looking on the underside of the switch, you can see a small dot molded into the plastic body. The two leads on the same side as the dot are tied together internally, and the two leads on the opposite side are tied together internally. When the button is pressed, electrical connection is made between the two sides. BE CAREFUL inserting the switch into the holes in the solderless breadboard. Make sure that each pair of legs that are tied together internally plug into the same row of 5 holes on the breadboard. The legs have already been twisted for you to make correct insertion into the breadboard easy. If you try to insert the switch rotated by 90°, you may damage the breadboard, so pay attention. Procedure Switch-Controlled Display Circuit Figure 3 shows the circuit you will use in this lab. 1. Build the section of the circuit shown in the dashed rectangle A first. Do not connect the 7447 to the OOPic yet! (As we have emphasized in previous labs, you will save yourself lots of time, effort, and frustration by building and testing pieces of a complicated circuit rather than trying to wire up everything in one shot. So don’t rush. Build and test in small modules.) Also, liberties have been taken with the


View Full Document

SJSU ME 106 - Digital Signal Input and Output

Download Digital Signal Input and Output
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Digital Signal Input and Output and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Digital Signal Input and Output 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?