14.7.4 INTEGRATED MICROCONTROLLER ADCs
Denso QR Bar Code Recognizer In None
Using Barcode Control SDK for Software Control to generate, create, read, scan barcode image in Software applications.
QR Generator In None
Using Barcode encoder for Software Control to generate, create QR image in Software applications.
Many microcontrollers and single-board computers come equipped with one or more analogto-digital converters built in. This saves you the time, trouble, and expense of connecting a stand-alone ADC chip to your robot. You need not worry whether the ADC chip provides data in serial or parallel form since all the data manipulation is done internally. Along with this, you are usually given the option of either using the voltage applied to the microcontroller as the high voltage range or the ADC or an external voltage (generally less than Vdd) from your circuit, giving you the capability of measuring different voltage ranges accurately. You just tell the system to fetch an analog input, and it responds when the conversion is complete.
QR Reader In None
Using Barcode reader for Software Control to read, scan read, scan image in Software applications.
Printing QR-Code In Visual C#.NET
Using Barcode encoder for VS .NET Control to generate, create Denso QR Bar Code image in .NET applications.
14.7.5 SAMPLE CIRCUITS
QR Printer In .NET Framework
Using Barcode generation for ASP.NET Control to generate, create QR-Code image in ASP.NET applications.
QR Code ISO/IEC18004 Printer In .NET
Using Barcode creator for .NET Control to generate, create QR Code 2d barcode image in .NET framework applications.
Fig. 14-22 shows a basic circuit for using the ADC0809, which provides eight analog inputs and an eight-bit conversion resolution. The input you want to test is selected using a three-bit control sequence 000 for input 1, 001 for input 2, and so on. Note the 500 kHz time base, which can come from a ceramic resonator or other clock source or from a resistor/capacitor (RC) time constant. If you need precise analog-to-digital conversion, you should use a more accurate clock than an RC circuit.
Print QR In Visual Basic .NET
Using Barcode encoder for Visual Studio .NET Control to generate, create QR image in .NET applications.
Code 128 Code Set A Creation In None
Using Barcode maker for Software Control to generate, create Code 128 Code Set B image in Software applications.
14.8 DIGITAL-TO-ANALOG CONVERSION
Bar Code Creation In None
Using Barcode creation for Software Control to generate, create bar code image in Software applications.
Barcode Printer In None
Using Barcode drawer for Software Control to generate, create bar code image in Software applications.
+5V 11 9 12 22 Vcc OE +Rf Ale
EAN-13 Supplement 5 Generator In None
Using Barcode creation for Software Control to generate, create EAN 13 image in Software applications.
Creating GTIN - 128 In None
Using Barcode encoder for Software Control to generate, create GS1-128 image in Software applications.
7 6 5 4 Analog Inputs (8) 3 2 1 0
Generating Intelligent Mail In None
Using Barcode printer for Software Control to generate, create 4-State Customer Barcode image in Software applications.
Data Matrix ECC200 Scanner In Java
Using Barcode reader for Java Control to read, scan read, scan image in Java applications.
27 IN1 28 IN2 1 2 IN3 IN4
Code 128C Encoder In Java
Using Barcode drawer for Java Control to generate, create USS Code 128 image in Java applications.
Recognizing Barcode In Java
Using Barcode Control SDK for Eclipse BIRT Control to generate, create, read, scan barcode image in BIRT applications.
Q6 20 Q5 19 Q4 Q3 Q2 Q1 Q0 Eoc 18 8 15 14 17 7 LSB Digital Outputs
Draw Data Matrix ECC200 In None
Using Barcode maker for Online Control to generate, create DataMatrix image in Online applications.
Recognize ECC200 In Visual C#
Using Barcode reader for .NET framework Control to read, scan read, scan image in .NET applications.
3 IN5 4 IN6 5 IN7 25 A1 A2 A4 Sc Clk Gnd 13 -Ref 16
Bar Code Creator In Java
Using Barcode encoder for Java Control to generate, create bar code image in Java applications.
Bar Code Drawer In Java
Using Barcode generator for Android Control to generate, create barcode image in Android applications.
24 23 6 10
End of Conversion
Start Conversion 500kHz In
FIGURE 14-22 Basic hookup circuit for the ADC0809 analog-to-digital converter.
14.8 Digital-to-Analog Conversion
Digital-to-analog conversion (DAC) is the inverse of analog-to-digital conversion. With a DAC, a digital signal is converted to a varying analog voltage. DACs are common in some types of products, such as audio compact discs, where the digital signal impressed upon the disc is converted into a melody pleasing to the human ear. At least in the robotics world, however, DACs are not as commonly used as ADCs, and when they are, simpler approximation circuits are all that s usually necessary. A common technique is to use a capacitor and resistor to form a traditional RC time-constant circuit. A digital device sends periodic pulses through the RC circuit. The capacitor discharges at a more or less specified rate. The more pulses there are during a specific period of time, the higher the voltage that will get stored in the capacitor. The speed of DC motors is commonly set using a kind of digital-to-analog conversion. Rather than vary the voltage to a motor directly, the most common approach is to use pulse width modulation (PWM), in which a circuit applies a continuous train of pulses to the motor. The longer the pulses are on, the faster the motor will go. This works because motors tend to integrate out the pulses to an average voltage level; no separate digital-toanalog conversion is required. See 20 for additional information on PWM with DC motors. You can accomplish digital-to-analog conversion using integrated circuits specially designed for the task. The DAC08, for example, is an inexpensive eight-bit digital-to-analog converter IC that converts an eight-bit digital signal into an analog voltage.
14.9 Expanding Available I/O Lines
A bane of the microcontroller- and computer-controlled robot is the shortage of input/output pins. It always seems that your robot needs one more I/O pin than the computer or microcontroller has. As a result, you think you either need to drop a feature or two from the robot or else add a second computer or microcontroller. Fortunately, there are alternatives. Perhaps the easiest is to use a data demultiplexer, a handy device that allows you to turn a few I/O lines into many. Demultiplexers are available in a variety of types; a common component offers three input lines and eight output lines. You can individually activate any one of the eight output lines by applying a binary control signal on the three inputs. Table 14-1 shows which input control signals correspond to which selected outputs. The demultiplexer includes the venerable 74138 chip, which is designed to bring the selected line low, while all the others stay high. One caveat regarding demultiplexers: only one output can be active at any one time. As soon as you change the input control, the old selected output is deselected, and the new one is selected in its place. One way around this is to use an addressable latch such as the 74259; another way is to use a serial-to-parallel shift register, such as the 74595. The 74595 chip uses three inputs (and optionally a fourth, but for our purposes it can be ignored) and provides eight outputs. You set the outputs you want to activate by sending the 74595 an eight-bit serial word as shown in Table 14-2. Fig. 14-23 shows how to interface to the 74595. In operation, software on your robot s computer or microcontroller sends eight clock pulses to the clock line. At each clock pulse, the data line is sent one bit of the serial word you want to use. When all eight pulses have been received, the latch line is activated. The outputs of the 74595 remain active until you change them (or power to the chip is removed, of course).