You are on page 1of 5

1

UNIVERSITY OF SOUTH AFRICA


SCHOOL OF ENGINEERING
CONTINUOUS ASSESSMENT

TEST NO: Major Test 2 – Assessment No: 694208

Semester Course

MCD2601

MICROCONTROLLER DESIGN SYSTEM

Examiner: Ms NPF Nqukwe


Marks: 55 Internal Moderator: Mr K. Chetty
Weight of Assessment: 35%
INSTRUCTIONS TO ALL STUDENTS:

YOUR SCRIPT MUST BE SAVED WITH STUDENT NO, SUBJECT CODE AND
UPLOADED ON ASSESSMENT PLATFORM.
• Honesty Declaration must be completed
• The module is invigilated
Additional student instructions
1. Students must upload their answer scripts in a single PDF file (answer scripts
must not be password protected or uploaded as “read only” files)
2. NO emailed scripts will be accepted.
3. Students are advised to preview submissions (answer scripts) to ensure legibility
and that the correct answer script file has been uploaded.
4. Students are permitted to resubmit their answer scripts should their initial
submission be unsatisfactory.
5. Incorrect file format and uncollated answer scripts will not be considered.
6. Incorrect answer scripts and/or submissions made on unofficial examinations
platforms (including the invigilator cellphone application) will not be marked and
no opportunity will be granted for resubmission.
7. Mark awarded for incomplete submission will be the student’s final mark. No
opportunity for resubmission will be granted.
8. Mark awarded for illegible scanned submission will be the student’s final mark.
No opportunity for resubmission will be granted.
9. Submissions will only be accepted from registered student accounts.
10. Students who have not utilised invigilation or proctoring tools will be
subjected to disciplinary processes.
11. Students suspected of dishonest conduct during the examinations will be
subjected to disciplinary processes. UNISA has a zero tolerance for plagiarism
and/or any other forms of academic dishonesty.
12. Students are provided one hour to submit their answer scripts after the
official examination time. Submissions made after the official examination time
will be rejected.

2
QUESTION 1 [10]
1. 96 bytes asynchronous data is serially transmitted at a rate of 14058 Baud. How much transmission
time is needed by the 8051 micro-controller to complete the task? Even parity is used. [2]
2. Analyse the following assembly code and give the content of register B in hex format:

MOV B,#0x37
MOV 0x30,#0x03
MOV A,B
Loop: RL A
DJNZ 0x30,Loop
MOV B,A [2]
3. Which timer is used to generate the baud rate for the serial port? [2]
4. Write down an 8051 Assembler instruction to enable Level triggered interrupts on External Interrupt 0.

[2]
5. 127 bytes asynchronous data is serially transmitted at a rate of 19200 Baud. How much transmission time is
needed by the 8051 micro controller to complete the task? No parity is used. [2]

QUESTION 2 [15]
Write an 8051 program (C language) to generate a 12Hz square wave (50% duty cycle) on P1.7
using Timer 0 (in 16-bit mode) and interrupts. Assume the oscillator frequency to be 8MHz.
Show all calculations

QUESTION 3 [10]

A temperature sensor with amplification is connected to an ADC (9-bit). If the sensor reads 268 0C,
the sensor output is 8.47V. The temperature range that the sensor can measure is 0 - 268 0C, and
the output voltage range is 0V - 8.47V. The internal reference voltage of the ADC is 22.87V.

3.1 Sketch a circuit diagram of the system. Clearly show the amplifier circuit with all required
resistors. [2]
3.2 For best resolution on the ADC, determine the required voltage gain of the amplifier. [3]
3.3 Design the circuit of the amplifier to ensure best resolution. [2]
0
3.4 For a sensor reading of 225.12 C, calculate the sensor output voltage and the ADC output code.
[3]
3.5 The sensor reading should be displayed using a micro-controller. What scaling factor should the
ADC output code be multiplied with in order to convert it back to a temperature reading.[2]

3
QUESTION 4 [20]
4.1. Consider Figure Q4. Use edge triggered interrupts on the push button and develop a program in
C or Assembler that would turn on the buzzer for as long as the button is pressed. A 5V supplied
to the buzzer will activate it to make a sound and a 0V will turn it off.

Figure Q4

4.2. You have to design a one-way intercom system for an office. The system should have two
8051 micro-controllers connected to each other for full duplex serial communication. The two
MCS 8051’s are located at the entrance to the building and the office. Micro-controller 1 has a
normally HIGH push button on INT0 (P3.2), and an ADC0804 connected to the data bus on
address 4000H. The ADC’s INTR line is connected to P3.3. Connected to the ADC, is a
microphone with amplifiers. The ADC is used to convert the microphone analogue sound signal
into a discrete signal. As long as the button is pushed, micro-controller 1 should continuously
read the ADC and serially transmit the sound samples to the other micro- controller.
The Questions refer to micro-controller 1. Use edge triggered interrupts for the push button.
Do not use interrupts for the serial port.

The following specifications apply:

Fosc (Crystal Oscillator frequency) = 11.0592MHz


Baud rate = 9600 Baud (bits / second)
Baud rate generator : Timer 1 = Mode 2 (auto reload operation)
PCON = 0x80 thus K = 2
TH1 = 256 – [(K x Fosc) / (384 x Baud rate)]
UART operation = 8-bit operation with variable baud rate option

4.2.1. Draw a flow chart of the program that will implement the system. [7]
4.2..2. Write a program in the C language that will implement the system. [8]

4
TOTAL MARKS 55
©
UNISA
2022

You might also like