22-Elec-A4 Digital Systems and Computers · December 2019
Question 4 of 6: HC11 address-decoded I/O routing
Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer)
Notes on this paper
National Exams — December 2019 · 16-Elec-A4 Digital Systems & Computers.
Closed book · 3 hours · one of two approved calculators. Six questions; any five constitute a complete paper and all questions are worth 12 marks. All six are solved here as a study resource.
Reference texts: M. M. Mano & M. D. Ciletti, Digital Design (6th ed.); J. F. Wakerly, Digital Design: Principles and Practices (5th ed.); R. J. Tocci, N. S. Widmer & G. L. Moss, Digital Systems: Principles and Applications (12th ed.); Motorola/Freescale M68HC11 Reference Manual; V. C. Hamacher, Z. G. Vranesic & S. G. Zaky, Computer Organization (5th ed.).
Check — figure readings. The two circuit figures are redrawn below from the printed paper. Readings used below: Q1’s second and fifth product terms are $A\overline{B}C$ and $\overline{A}\,\overline{B}C\overline{D}$; Q2(a) asks for 8:1-multiplexer realizations and gives $ABC=011$ and $111$ as don’t-cares for $f_1$; Q3’s gates are three-input ANDs and flip-flop $B$ is wired as a toggle ($R_B=B$, $S_B=\overline{B}$), so the circuit is a binary up/down counter; Q4’s flip-flop clock is taken from decoder output ̅Y2 (third output down), not ̅Y0. Each correction is explained in the relevant answer.
Given. Decoder address $A_2A_1A_0 = A_{15}A_{14}A_{13}$; the flip-flop is clocked by a decoder output (read from the drawing as $\overline{Y}_2$); on that clock it latches $D_0$; $Q=1$ closes switch 1 (→ HOST), $Q=0$ (so $\overline{Q}=1$) closes switch 2 (→ MCU).
Find. The effect of each of the four store operations.
Check — clock source. The clock tap leaves the decoder’s third output, $\overline{Y}_2$. With $\overline{Y}_2$ the four parts give distinct, sensible answers; with $\overline{Y}_0$ all four would be “No Action”. The answer follows the drawing ($\overline{Y}_2$).
Approach. A store only reprograms the latch if its address activates $\overline{Y}_2$, i.e. $A_{15}A_{14}A_{13}=010$ (any address in the $4000_{16}$–$5\text{FFF}_{16}$ block). When it does, the latched $D_0$ (bit 0 of the stored byte) picks the route; otherwise the routing is unchanged.
Decode each store address. Take the top three address bits: $8000_{16}\Rightarrow100=Y_4$; $4000_{16}\Rightarrow010=Y_2$; $5000_{16}\Rightarrow010=Y_2$; $2500_{16}\Rightarrow001=Y_1$. Only (b) and (c) hit $\overline{Y}_2$ and clock the flip-flop.
Read $D_0$ where the clock fires. $D_0=\text{bit }0$ of the accumulator value: $29_{16}=0010\,1001\Rightarrow D_0=1$; $B4_{16}=1011\,0100\Rightarrow D_0=0$.
Apply the routing rule.
$$\boxed{\text{(a) No Action}\quad\text{(b) HOST}\quad\text{(c) MCU}\quad\text{(d) No Action}}$$
(b): $Q\!\leftarrow\!1\Rightarrow$ switch 1 closes → HOST. (c): $Q\!\leftarrow\!0\Rightarrow$ switch 2 closes → MCU. (a),(d): decoder selects $Y_4/Y_1$, $\overline{Y}_2$ never pulses, so the previously latched route is untouched.
Figure 4.1 — per-instruction decode. The stored byte’s $D_0$ only reaches the latch when $A_{15}A_{14}A_{13}=010$.