Академический Документы
Профессиональный Документы
Культура Документы
2010
Chapter 2
2010, CE Department
dce
2010
Outline
Decoder Encoder Multiplexer Demultiplexer Magnitude Comparator Code Converters Tristate Register Data Bus Operation
2010, CE Department
dce
2010
Decoder
Accept a set of inputs that represents a binary number and activate only the output that corresponds to that input number May not utilize all of 2N possible input codes
2010, CE Department
dce
2010
Decoder Example
3-line-to-8-line decoder
binary-to-octal decoder 1-of-8 decoder
2010, CE Department
dce
2010
2010, CE Department
dce
2010
Decoder - Combination
Four 74ALS138s and an INVERTER can be arranged to function as a 1-of-32 decoder
2010, CE Department
dce
2010
2010, CE Department
dce
2010
BCD-to-Decimal Decoder/Driver
Open-collector outputs can operate at higher current and voltage limits than a normal TTL outputs Directly driving loads: LEDs, lamps, relays, dc motors, ... Example: 7445 outputs can sink up to 80mA in LOW state
2010, CE Department
dce
2010
Decoder Applications
Counter/Decoder combination used to provide timing and sequencing operations
2010, CE Department
dce
2010
7-Segment LED
Form the decimal characters 0 9, sometimes the hex characters A F Use light-emitting diodes (LEDs) for each segment Normal brightness: 10mA, 2.7V
2010, CE Department
10
dce
2010
BCD-to-7-segment Decoder/Driver
4-bit BCD input, each output is activated more than one combination of inputs Common-Anode, Common-Cathode LEDs
2010, CE Department
11
dce
2010
Liquid-Crystal Displays
Control the reflection of available light
Reflective LCD Backlit LCD
Very low power consumption, low-voltage (3 15 V rms), low frequency (25 to 60Hz) ac signal, very little current Backplane is common to all segments Ac voltage is applied between the segment and the backplane to turn on this segment
Not reflect the incident light, they appear dark against their background
2010, CE Department 12
dce
2010
2010, CE Department
13
dce
2010
dce
2010
Encoder
The opposite of decoding process Encoder has a number of input lines, only one of which is activated at a given time, and produces a N-bit output code
2010, CE Department
15
dce
2010
Encoder - Example
Octal-to-binary encoder (8-line-to-3-line encoder)
Accept 8 inputs lines and produce a 3-bit output code
2010, CE Department
16
dce
2010
Priority Encoder
When more than one input is activated at one time, the output code will respond to the highestnumbered input (74148)
Example: A6, A2, A0 are activated output code is 110 (6)
2010, CE Department
17
dce
2010
Switch Encoder
Data input must be manually entered into a digital system
12 D-FF: three 4-bit FF registers JK-FF: control the transfer of data to the appropriate register T-FF: One-shot
2010, CE Department
18
dce
2010
2010, CE Department
19
dce
2010
2010, CE Department
20
dce
2010
2010, CE Department
21
dce
2010
2010, CE Department
22
dce
2010
2010, CE Department
23
dce
2010
Purpose: time-share the decoder/drivers and display circuits between several counters
2010, CE Department
24
dce
2010
X7X6X5X4X3X2X1X0 = 10110101
2010, CE Department
25
dce
2010
2010, CE Department
26
dce
2010
2010, CE Department
27
dce
2010
2010, CE Department
28
dce
2010
1-Line-to-8-Line Demultiplexer
I: Data input
2010, CE Department
29
dce
2010
1-Line-to-8-Line Demultiplexer
Compare to decoder
Decoder that have an ENABLE input can be used as a demultiplexer decoder/demultiplexer
Binary code inputs serving as the SELECT inputs ENABLE input serving as the data input I
2010, CE Department
30
dce
2010
2010, CE Department
31
dce
2010
2010, CE Department
32
dce
2010
dce
2010
2010, CE Department
34
dce
2010
dce
2010
dce
2010
Magnitude Comparator
Compare two input binary quantities and generate outputs to indicate which one has the greater magnitude 74HC85
Data inputs: two unsigned 4-bit binary numbers Outputs: 3 active-HIGH outputs (OA>B, OA<B, OA=B)
2010, CE Department
37
dce
2010
Magnitude Comparator
2010, CE Department
38
dce
2010
Magnitude Comparator
Cascading Inputs
Provide a means for expanding the comparison operation to more than 4 bits by cascading 2 or more 4-bit comparators
2010, CE Department
39
dce
2010
dce
2010
Code Converters
Change data presented in one type of binary code to another type of binary code
BCD-to-7-segment decoder/driver is a code converter Some of the more common code conversion
BCD to 7-segment BCD to binary Binary to BCD Binary to Gray code Gray code to binary ASCII to EBCDIC EBCDIC to ASCII (EBCDIC is an alphanumeric code developed by IBM similar to ASCII)
2010, CE Department 41
dce
2010
BCD-to-Binary Converter
Basic idea
Inputs to the converter are the two 4-bit code groups of the decimal value
D0C0B0A0: represent the 100 or units digit D1C1B1A1: represent the 101 or tens digit
Outputs: b6b5b4b3b2b1b0 7 bits of the binary equivalent of the same decimal value
2010, CE Department
42
dce
2010
BCD-to-Binary Converter
BCD-to-binary converter can be accomplished with either hardware of software
Hardware method: generally faster but require extra circuit Software method: no extra circuit but take more time (step by step) The method chosen in a particular application depends on whether or not conversion time is an important consideration
2010, CE Department
43
dce
2010
BCD-to-Binary Converter
Conversion Process
The bits have decimal weights which are 8, 4, 2, 1 but differ by a factor of 10 from one code group to the next Decimal weight of each bit can be converted to its binary equivalent Compute the binary sum of the binary equivalents of all bits in the BCD representation that are 1s
2010, CE Department
44
dce
2010
BCD-to-Binary Converter
Example: Covert 01010010 (52BCD) to binary
2010, CE Department
45
dce
2010
BCD-to-Binary Converter
Circuit Implementation: use binary adder circuits
A0: directly to b0 B0, A1 contribute to b1, ...
2010, CE Department
46
dce
2010
Data Busing
Data bus: a common set of connecting lines for the transfer of data Many different devices can have their outputs and inputs tied to the common data bus lines Devices tied to the data bus will often have tristate outputs or tied to the data bus through tristate buffers Some of the devices that are commonly connected to a data bus:
Microprocessor, semiconductor memory chips, Digitalto-analog/Analog-to-digital converters (DACs/ADCs)
2010, CE Department 47
dce
2010
2010, CE Department
48
dce
2010
2010, CE Department
49
dce
2010
dce
2010
dce
2010
2010, CE Department
52
dce
2010
Bus Signals
t1: Register A outputs are enabled. Its data are placed on bus t2: PGT of clock transfers valid data from data bus into register C t3: Register A outputs are disabled and data bus lines return to Hi-Z state
2010, CE Department
53
dce
2010
2010, CE Department
54
dce
2010
Some devices will need to be connected to the bus through a bus driver Bus driver
Tristate outputs with a very low output impedance rapidly charge and discharge the bus capacitance Reduce transition time of signal
2010, CE Department
55
dce
2010
dce
2010
dce
2010
2010, CE Department
58
dce
2010
Bidirectional Busing
Some devices have both inputs and outputs connected to the data bus
Inputs and outputs are connected together internal to the chip
Reduce the number of IC pins Reduce number of connections to the bus
Input lines (I0/D0 to I3/D3) and output lines (O0 to O3) have been replaced by input/output lines (I/O0 to I/O3) I/O line will function as either an input or an output depending on the state of the enable inputs Bidirectional data lines
2010, CE Department 59
dce
2010
Bidirectional Busing
dce
2010
Reference
Chapter 9, Digital System Principles and Applications, Ronald J.Tocci, Neal S. Widmer
61