Larger bit lengths are subdivided into groups of 4

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: r example, the 16-bit binary number 1101 0111 0011 1100 is coded as $D73C hexadecimal. 8-Bit Binary Counter A logical extension of the 4-bit binary counter is to higher data widths. Embedded controllers use an internal 8-bit data bus, and modern microprocessors use 16- or 32-bit data paths. The VI demonstrates visually the binary counting sequence as a byte on eight LED indicators or as an 8-bit timing diagram. Run this VI continuously to observe binary numbers from 0-255. The timing diagram clearly shows how each stage divides the previous output by 2. The output frequencies are f/2, f/4, f/8, f/16, f/32, f/64, f/128, and f/256 for the output stages Q0...Q7. Here, f is the clock frequency. Binary counters need to be reset (all bits 0) or set (all bits 1) for various operations. The truth table for the JK flip-flop shown above has direct inputs that provide this function. The clocked logic can occur whenever the reset and set inputs are pulled high. A 0 on either the Set or Clear input forces the output to a 1 or 0, respectively. These operations are exclusive, hence the (00) state is disallowed. The VI provides a clear function for the 8-bit binary counter. Load and run this VI continuously. By pressing the Reset button, the binary counter is cleared. This operation is useful in applications for odd length counters and in designing analog-to-digital converters. LabVIEW Challenge Design a two-digit binary counter, which counts from 00 to 99. Summary Binary counters are a fundamental component in digital electronic circuits. They are used in all forms of modulo-n counters, in the generation of harmonic clock subfrequencies, and in many higher order functions such as digital-to-analog and analog-to-digital devices. National Instruments Corporation 6-5 Fundamentals of Digital Electronics Lab 6 JK Master-Slave Flip-Flop Lab 6 Library VIs (Listed in the Order Presented) (Divide by 2 binary counter) (Divide by 4 binary counter) (Divide by 16 binary counter with logic traces) (Divide by 256 binary counter with logic traces) (8-bit binary counter with external reset button) (T flip-flop subVI used in above programs) Fundamentals of Digital Electronics 6-6 National Instruments Corporation Lab 7 Digital-to-Analog Converter The digital-to-analog converter, known as the D/A converter (read as D-to-A converter) or the DAC, is a major interface circuit that forms the bridge between the analog and digital worlds. DACs are the core of many circuits and instruments, including digital voltmeters, plotters, oscilloscope displays, and many computer-controlled devices. This chapter examines the digital-to-analog converter, several variations, and how it is used for waveform generation. What is a DAC? A DAC is an electronic component that converts digital logic levels into an analog voltage. The output of a DAC is just the sum of all the input bits weighted in a particular manner: DAC = w b i=0 i i where wi is a weighting factor, bi is the bit value (1 or 0), and i is the index of the bit number. In the case of a binary weighting scheme, wi = 2i, the complete expression for an 8-bit DAC is written as DAC = 128 b7 + 64 b6 + 32 b5 + 16 b4 + 8 b3 + 4 b2 + 2 b1+ 1 b0 National Instruments Corporation 7-1 Fundamentals of Digital Electronics Lab 7 Digital-to-Analog Converter Figure 7-1. LabVIEW Simulation of an 8-Bit DAC The above simulation, demonstrates the conversion process. On the front panel, eight Boolean switches set the input bits b0 through b7. Eight LED indicators display the binary value of the input byte when the simulation is run. The analog output is displayed as a numeric indicator. The diagram panel displays the LabVIEW algorithm shown below for the 8-bit converter. Figure 7-2. LabVIEW VI for 8-Bit The simulation uses two input multiply and add functions to generate the DAC sum. Note the Boolean-to-Real icon on the block diagram, which Fundamentals of Digital Electronics 7-2 National Instruments Corporation Lab 7 Digital-to-Analog Converter simulates in a very real way the bridging of the binary (Boolean levels) into the analog (numeric) value. Load and run to observe the relationship between the binary codes and their numeric equivalent. is also a subVI, so it can be used in other programs to convert any 8-bit digital signal into the decimal equivalent value. To see how a DAC might be used, consider the simulation of an 8-bit add instruction inside a microcomputer chip. ALU Simulator The arithmetic and logic unit (ALU) is responsible for all arithmetic and logic operations occurring inside the central processing unit (CPU) of a computer chip. Consider the add instruction ADD R1,R2 which adds the contents of Register 1 with the contents of Register 2 and stores the sum into an accumulator. Eight Boolean switches and displays simulate the 8-bit registers R1 and R2. Nine LED indicators show the value of the accumulator and any overflow in the carry bit. Three...
View Full Document

This note was uploaded on 12/01/2009 for the course S ss taught by Professor S during the Spring '09 term at Universidad Autonoma de Nuevo Leon - School of Business.

Ask a homework question - tutors are online