0% found this document useful (0 votes)
7 views10 pages

BCD to Decimal Decoder Circuit Guide

Uploaded by

Conrad Cruz
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views10 pages

BCD to Decimal Decoder Circuit Guide

Uploaded by

Conrad Cruz
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Getting Started With SNAP Technology:

Wireless Embedded Lab Projects

Don Wilcher

1
Lab 3: Decoder Driver Circuit with 7 Segment LED Display
This circuit is based off the design created by Forrest Mims in his Digital
Logic Projects Workbook from the Radio Shack Electronics Learning Lab
kit. The functional and pedagogical concept behind the circuit is to illustrate
how a Binary Coded Decimal (BCD) number can be converted to its
equivalent Decimal value. A Binary Keypad is used to enter the binary data
and the SNAP RF Engine Module processes the data and re-directs the logic
level signals to the appropriate pins of the 4511 CMOS Decoder Driver IC.
The 4511 CMOS IC is responsible for decoding the 4Bit Binary Data and
driving the corresponding LED segments on the optoelectronic 14 pin
component. The unique difference between the original design and the RF
Engine based circuit is the latching outputs of the segments after release of
the Binary Logic Switches. The original circuit used momentary switches for
data entry, although toggle switches could have easily been substituted for
the momentary components. Figure 3-1 shows the Subcircuit Block
Diagram for the Decoder Driver Circuit with 7 Segment LED Display.

S1 GPIO8 a Common
GPIO9 A a
BCD S2 GPIO4 GPIO10 4511 b Cathode
B b
Keypad S3 Decoder c f g
GPIO6 GPIO11 C 7 Segment
d
S4 GPIO5 GPIO12 D Driver IC e c LED Display
e
RF d
f
Engine g

Figure 3-1. Subcircuit Block Diagram of the Decoder Driver with 7-


Segment LED Display

The Binary Data entered using the Logic Switches (S1- S4) will be
monitored by the Python script (SNAPpy) and displayed within the Event
Log.

2
Pedagogical Concept
The technique of converting BCD to Decimal is common practice in Digital
Design work. Binary Coded Decimal is a special version of the Binary
Numbering system whereby, the maximum number that is used within the
circuit’s sequential logic infrastructure is “9”. Numbers greater than “9” the
circuit will not provide, thereby restricting it from complex numbering scheme
patterns. As discussed in Project 1(2Bit Binary Keypad), the conversion is
binary to digital is to use a Binary Weighted Value System consisting of
numbers “8”, “4”, “2”, and “1”. The number conversion technique consists of
adding all of the binary “1’s” Weighted Values to obtain the equivalent
decimal value.

Example 1:
Convert 10012 to its Decimal Equivalent value.

Solution:

8 4 2 1 (Binary Weighted Values)


1 0 0 1

Add all of the Binary Weighted Values that have a 1 underneath them.

Therefore:

8+1=9

Example 2:
Convert 01112 to its Decimal Equivalent value

Solution:

8 4 2 1 (Binary Weighted Values)


0 1 1 1

Add all of the Binary Weighted Values that have a 1 underneath it.

Therefore:

4 + 2+ 1 = 7

3
The actual circuit, upon setting the binary switches, set to “1100” will Blank-
Out the 7 Segment LED Display. Therefore, numbers greater than 9 are
considered invalid input data for the circuit.

Using Discrete Logic ICs helps in reducing code size for the
target Wireless Embedded Intelligence Application.

Part Lists
(1)SN171 Proto Board
(1)SN163 Bridge Demonstration Board or
(1)SN132 SNAPstick USB Module
(4)SPST (Single Pole Single Throw) Momentary Pushbutton Switches
(4) 1KΩ resistor (Brown, Black, Red)
(1) CMOS 4511 Decoder Driver IC
(1) Common Cathode 7 Segment LED Display (NTE 3056 or equivalent)
(7) 330Ω resistors (Orange, Orange, Brown)
(3) 1.5V Batteries
Smart Logic Probe Kit
Solderless Breadboard
DMM (Digital Multimeter) (Optional)
22 AWG (American Wire Gauge) Solid Wire

Assembly and Test Procedure

1. Build the Decoder-Driver Circuit shown in Figure 3-2 on a solderless


breadboard.
2. Type the SNAPpy Script shown in Figure 3-3 using the Portal IDE
Text Editor.
3. Save the file as “BCD_Keypad.py”
4. Apply power to the Proto Board, and the Decoder- Driver Circuit.
5. Upload the script (the image) to the Proto Board.

4
BCD Keypad Decoder-Driver

Figure 3-2(a). Decoder-Driver Circuit with BCD Keypad

The BCD Keypad can be powered using Proto- Board’s


“Vcc” Voltage Supply via terminal strip attachment.

The original circuit designed by Forrest Mims can be found


on pgs 90-91 of the Digital Logic Projects Workbook from
the Electronics Learning Lab kit.

5
D C B A

Figure 3-2(b). The Author’s Prototype Circuit

6
Figure 3-3. Decoder-Driver Python Script (SNAPpy)

7
Decoder-Driver Python Script (SNAPpy) continued

8
6. Validate the Decoder-Driver circuit’s operation using the Test Data
shown in Figure 3-4.

Figure 3-4. Test Data Format with “Portal” Event Log Outcome

BCD is also known as the “8421” Code Format

9
The Decoder-Driver is a basic digital circuit used to manipulate the individual
LED segments of a 7 Segment Optoelectronic Display. By entering a 4Bit
binary code, the internal circuit of the MSI (Medium Scale Integration) IC is
capable of decoding/driving the LED segments to display the equivalent
Decimal number. This circuit also provides data storage with aid of the SNAP
RF Engine Module via the “isSet” instruction. The latching feature upon
press/release of the momentary switch is accomplished by the “isSet”
instruction. Although, the decoder-driver function can be accomplished using
the RF Engine Module, the code required for decoding the binary data and
routing it to the individual LED segments would be quite large in size.
Therefore, a little bit of “Glueware” helps aid in such Wireless Embedded
Intelligence applications by physically substituting the lines of scripting code
needed for the embedded task at hand.

Questions
1. Validate the Non-operational response of the BCD format by
entering the decimal value of 10. Record the output response
behavior of the circuit.
2. By removing the “isSet” instruction from one of the Binary Logic
Switches, what is the response of the circuit?
3. Find the equivalent TTL IC for implementing the 4511 CMOS
decoder-driver function. Obtain a data sheet for reference.
4. Re-draw the schematic circuit diagram shown in Figure 3-2 using
the TTL IC discovered in Question 3. Use the data sheet for
mapping the pin-out of the IC to the existing circuit.
5. Identify the diagnostic line of code in Figure 3-3.
6. What’s the advantage of using a CMOS Decoder-Driver IC over its
equivalent TTL part?

For Further Investigation


Replace the BCD Keypad with a Thumbwheel Switch. Re-draw the circuit
showing the new User Interface Device (UID) and validate its input data
feature with an actual prototype build on a solderless breadboard.

10

You might also like