22-Elec-A4 Digital Systems and Computers · December 2016
Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer)
Paper format. National Exams, December 2016 — 07-Elec-A4 Digital Systems & Computers. Three hours, closed book, one approved Casio or Sharp calculator. Six questions are printed and any five constitute a complete exam; every question is worth 12 points with the per-part breakdown printed on page 1. A flip-flop excitation table and a sheet of Boolean identities are attached as page 6. All six questions are solved below so the set works as a complete study resource.
Reference texts.
Question text not reproduced: the examination questions are © Engineers and Geoscientists BC. Open the official past paper (linked at the top of this page) to read the question, then follow the worked solution below.
Given. $V_{source}=5$ V, LED $V_F=2$ V, $V_{CE(sat)}=0.3$ V for every saturated transistor, target $I_{LED}=10$ mA. Read off the page-5 figure: $PB_6,PB_5,\ldots,PB_0$ run through open-collector inverters and $R_2$ to segment cathodes $g,f,\ldots,a$ of both digits (so $PB_6\!=\!g,\ PB_5\!=\!f,\ PB_4\!=\!e,\ PB_3\!=\!d,\ PB_2\!=\!c,\ PB_1\!=\!b,\ PB_0\!=\!a$); each common anode is fed from the 5 V rail by a PNP transistor, $T_1$ (10's digit) with its base driven from $PB_7$ through 5.1 kΩ, and $T_0$ (1's digit) with its base driven from an inverter on $PB_7$. Find. the two Port B codes, the multiplexing routine, and $R_2$.
Part (i) — segment codes. Digit ‘3’ lights $a,b,c,d,g$ (not $e,f$); digit ‘6’ lights $a,c,d,e,f,g$ (not $b$). Digit select: $T_1$ and $T_0$ are PNP (emitter arrow pointing in, emitter on the 5 V rail, 10 kΩ base pull-up), so each saturates when its base is pulled LOW. $PB_7=0$ turns on $T_1$ and lights the 10's digit; $PB_7=1$ drives the inverter output low, turns on $T_0$ and lights the 1's digit. Segments: a 1 on $PB_n$ drives the open-collector inverter output LOW, sinking current through $R_2$ and that segment's LED, so a logic 1 lights the segment. Writing the byte as $PB_7PB_6\ldots PB_0=(\text{select})\,g\,f\,e\,d\,c\,b\,a$:
| Digit | $PB_7$ | $PB_6$ ($g$) | $PB_5$ ($f$) | $PB_4$ ($e$) | $PB_3$ ($d$) | $PB_2$ ($c$) | $PB_1$ ($b$) | $PB_0$ ($a$) | Binary | Hex |
|---|---|---|---|---|---|---|---|---|---|---|
| ‘3’ (10's) | 0 | 1 | 0 | 0 | 1 | 1 | 1 | 1 | 0100 1111 | 0x4F |
| ‘6’ (1's) | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 1 | 1111 1101 | 0xFD |
Part (ii) — time-multiplexing routine. Only one digit's segments are wired at a time, so the two digits are shown in fast alternation and persistence of vision fuses them into ‘36’:
Because the digit-select line steers which display's common anode is active, the two digits never light simultaneously; rapid scanning is what makes both appear steady.
Part (iii) — series resistor. Follow one lit segment: $V_{source}\to$ saturated PNP digit driver ($T_1$ or $T_0$) $\to$ common anode $\to$ LED $\to R_2\to$ saturated open-collector inverter output $\to$ ground. Two transistors are in saturation on this path, each dropping $V_{CE(sat)}\approx0.3$ V, so:
| Item | Result |
|---|---|
| (i) ‘3’ code | 0100 1111 = 0x4F ($PB_7=0$) |
| (i) ‘6’ code | 1111 1101 = 0xFD ($PB_7=1$) |
| (ii) Method | time-multiplex the two digits, ~50-100 Hz |
| (iii) $R_2$ | $240\ \Omega$ |