Cu184 Main
Cu184 Main
Cu184 Main
a) Draw a diagram which shows how a pietzo electric crystal is connected to the MC6809 Microprocessor
and state the relationship between the frequency of the crystal and the free running clocks E and Q. Draw
a diagram which clearly shows the phase relationship between E and Q and on that diagram clearly mark
bus cycles. When during the marked bus cycles do the actual data transfers take place. [10]
b) Draw a diagram of a simple circuit which can be used to generate a power on reset as well as a push
button reset to RESET the MC6809 microprocessor. What appears on the address bus of a powered
MC6809 microprocessor while the reset line is pulled down active low? [5]
c) Describe the terms: access time, data retention time and endurance when used to describe EPROMs and
EEPROMs. Give typical values of these three parameters. [6]
d) Compare and contrast memory mapped I/O and dedicated or separate I/O and state which microprocessor
manufacturer uses which scheme between Motorola and Intel. [4]
QUESTION TWO
a) Draw to scale the memory map of an MC6809 microprocessor based Microcomputer where the first half
is read write memory and the last quarter is read only memory. The remaining one quarter is to be shared
equally by four I/O devices in the following order. First two are Motorola MC6821 PIAs and the last two
Rockwell R6551 ACIAs. Construct the memory address decoding table and write down the size of each
range and the range of addresses for each memory component and I/O device. [12]
b) Write down the selected device for each of the following addresses:
i) $D957 ii) $10FF iii) $897A iv) $B398 [3]
c) Implement the memory address decoding logic using discrete logic gates: NOT, AND, OR, NAND and
NOR. [10]
d) Draw the logic circuit diagram of an FPGA (field programmable gate array) which can implement the
address decoding much more compactly. [5]
QUESTION THREE
a) Draw the diagram of a current loop RS232 interface and explain its operation. What are the advantages
and limitations of the current loop interface when compared with the traditional RS232 interface which
uses line drivers and line receivers? [6]
b) With the use of appropriate diagrams, describe software handshaking and hardware handshaking when a
slow receiver receives data at a fast pace from a fast data sender. [6]
c) Describe the three errors associated with the RS232 interface: Parity Error, Framing Error and Character
Overrun. What can be done to minimise the occurrence of all the errors. [6]
d) Table Q.3 provides the information required to configure the Rockwell R6551 Asynchronous
Communications Interface Adapter (ACIA) chip. A 3.6864 MHz crystal is connected to the ACIA.
Determine the control byte and the command byte which must be written during initialisation to the
control register and command register respectively for the following configuration:
19 200 bits per second, Odd Parity, 1 Stop bit, 8 bits per character, receiver interrupts and all the
outgoing handshake signals active and normal ACIA operation. [7]
QUESTION FOUR
a) Describe the operation of the stack on the MC6809 Microprocessor. How is the stack initialised? Explain
clearly why interrupts are disabled by default after a hardware reset and why it is not allowed to call
subroutines before the system stack pointer register is initialised. [6]
b) Write down the sequence of five steps which is continuously repeated while a von Neuman processor is
fetching and executing instructions. At which point are pending enabled interrupts honoured? [6]
1
c) Explain clearly, with the use of an appropriate diagram, why an edge sensitive interrupt like NMI (non
maskable interrupt) on the MC6809 cannot be connected to several I/O devices which then share the one
interrupt request input. [4]
d) Explain clearly, in great detail, what happens from the time a falling edge occurs on the interrupt input
line NMI until control is transferred to its interrupt service routine. [6]
e) What is an open drain (O/D) output? Explain why clearly why input and output device interrupt request
outputs are open drain. [3]
QUESTION FIVE
Listing Q.5 is an MC68HC11 assembly language program. Assemble the program by hand into machine
code using the normal listing file format used by most assemblers. Convert the machine code into Intel
hex format records and Motorola S format records. In each case write down the end of file record. [25]
ORG $F800
START LDAA #30
STAA BAUD
ECHO_LOOP LDAA SCSR
BITA #RDRF
BEQ ECHO_LOOP
CMPA #$61
BLT DO_ECHO
CMPA #$7A
BGT DO_ECHO
ANDA #UPPER_MASK
DO_ECHO PSHA
TX_LOOP LDAA SCSR
BITA #TDRE
BEQ TX_LOOP
PULA
STAA SCDR
BRA ECHO_LOOP
Listing Q.5
QUESTION SIX
a) An MC68HC11 microcontroller is driven by a 1.8432 MHz crystal. The configuration bits RTR1:RTR2
are set to “11” to give a real time interrupt once every 2 16 enable cycles. Determine the exact interval
between real time interrupts and calculate the real time rate. Hence determine the values of the two
variables, time_out and adjust required to maintain a real time clock in the machine code
developed in lectures.
[8]
b) Describe input capture and output comparison on PORTA pins on the Motorola MC68HC11
microcontroller. [5]
2
c) Show how output comparison can be used to produce a variable speed control system for a DC motor
with the use of pulse width modulation (PWM) when variable mark space ratios are to be arranged for.
Draw the diagram of the circuit that interfaces the control signal to the DC motor whose speed is being
controlled. [12]
TABLE Q.3
CONTROL REGISTER BIT ALLOCATIONS COMMAND REGISTER BIT ALLOCATIONS
7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0