Prof. Dr. Thorsten Jungmann (last updated 2026-11-02)
Relates to DET-05 Codes, code converters and standard components
Task
A clock in the binary-coded decimal (BCD) code shows the time with 20 light emitting diodes (LEDs) in six columns, for the tens and units of the hours, the minutes and the seconds. Each column shows one decimal digit in the BCD code, with the weights 8, 4, 2 and 1 from top to bottom:
The clock does not drive all 20 LEDs at once. An integrated circuit HEF4051 works as a demultiplexer, and its outputs to switch the six columns on one after another. Its three address inputs select the column: the address 000 selects the tens of the hours, the address 101 the units of the seconds. As long as its enable input is 0, it works; at , no column is on. For each column, the microcontroller applies the BCD code word of its digit.
a) What time does the clock in the first figure show?
b) Fill in the gaps for this time. The table shows what happens in each of the six time slots.
| Column that is on | Digit | Weight 8 | Weight 4 | Weight 2 | Weight 1 | |||
|---|---|---|---|---|---|---|---|---|
| 0 | 0 | 0 | tens of the hours | 1 | 0 | 0 | 0 | 1 |
| 0 | 0 | 1 | units of the hours | |||||
| 0 | 1 | 0 | tens of the minutes | |||||
| 0 | 1 | 1 | ||||||
| 1 | 0 | 0 | ||||||
| 1 | 0 | 1 |
c) Fill in the gaps in the truth table of the column selection, and give the logic expression of .
| 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 0 | ||||||
| 0 | 1 | 0 | 1 | ||||||
| 0 | 1 | 1 | 0 | ||||||
| 1 | 1 | 0 | 1 |
d) Which LEDs are lit during the time slot with the address 011? Why does the clock not use the addresses 110 and 111?
e) How many electric lines lead from the microcontroller to the demultiplexer and to the LEDs in this way, if stays at 0? How many would it need with one electric line for each LED?
f) Each column is on for one of six equal time slots. For which part of the time does an LED that belongs to a lit digit shine? Why do you still see all lit LEDs at once?
Solution
a) 19:47:35
b) from the address 000 to 101: 1 with 0001, 9 with 1001, 4 with 0100, 7 with 0111, 3 with 0011, 5 with 0101
c) for the address , only if ; the address 110 and give all zeros;
d) in the column of the units of the minutes, the LEDs with the weights 4, 2 and 1, the digit 7; the clock has only six columns, so the outputs 6 and 7 stay free
e) seven: four for the code word and three for the address; with one electric line for each LED, 20
f) for one sixth of the time; the columns change so fast that your eye cannot follow
