Академический Документы
Профессиональный Документы
Культура Документы
Target Group:
Students who are readying for the Diploma/Degree in Engineering Technology
After studying this course, you are expected to achieve the following:
Prerequisites:
The prerequisite for this course is as listed in the Student Guide Book.
Course Components:
At the time of registration, you should receive the following:
ECX4236 Microprocessors and Interfacing Laboratory Experiment Book.
ECX4236 Supplementary Notes
This course does not have a predefined set of lessons as such, and you are expected to search and find the
relevant materials in the library and on the internet. Moodle online class is available for this subject. User ID is
your NIC number and password is s-user (If you need an enrolment key please email your request to the course
coordinator)
There will be one CAT (Continuous Assessment Test). The CAT will be OPEN BOOK type, where you are allowed
to refer any materials during the test.
There are seven activities in this course. Three TMAs, Three Lab Sessions and One CAT
Eligibility:
Best six of the seven activities will be considered towards the continuous assessment mark.
Final Examination:
There will be a three hour CLOSED BOOK type test at which you are not allowed any reference materials.
Day Schools:
There will be five day schools. Please attend the first day school without fail. The first day school will be held
on 08th November 2014 from 1500-1700 hours at the Colombo Regional Centre.
Laboratory:
At the time of registration, you are supposed to assign yourself to a particular lab group. If you are not assigned
to a group yet, feel free to contact the course coordinator and get a group.
When you come to the LAB, you should bring the soft copy of the ALP (Assembly Language Program) that you
have written for each TMA.
Recommended Readings:
Contacts:
S-mail: - The Course Coordinator, ECX4236 Microprocessors and Interfacing,
Department of Electrical and Computer Engineering, The Open University of Sri Lanka
P.O. Box 21, Nawala, Nugegoda, Sri Lanka.
E-mail: - cjbas@ou.ac.lk Phone: - Direct: +94 11 288 1437 (or Ext: 437)
[01]
(a) Calculate the total number of machine cycles and time taken to generate software delay,
( + ) microseconds; where will be last three digit of your registration number (Clearly
show your all calculation for R1, R2 and R3 values etc.). Attach the simulation results (screen
images) to prove your calculation by using 8051 simulator software (MCU 8051 IDE)
(b) Calculate a timer 0 value TH0 and TL0 to generate same delay that you have obtained in Q1. (a)
(Clearly draw a timer configuration diagram with values).
(c) By using the delay that you have obtained in Q1. (b), toggle the LED when push button switch is
pressed and stop when switch is released.
(d) Explain the switch bounce caused in push button switch with I/O waveform.
(e) Suggest the hardware and software solutions to overcome the switch bounce condition.
(f) Modify your ALP written in Q1. (c). iii, to eliminate switch bounce using the solution that you
suggested in Q1. (e).
[Q2]
(a) Draw a simple block diagram by specifying the available types of memory in 8051
microcontroller and clearly mention the area belongs to each type of memory and ALP
commands for memory operations in each type.
(b) Compare and contrast XRAM and IRAM by using examples with ALP commands.
(c) Design a memory system for 8051 which require 32KB ROM and 16KB RAM using 2KB ROM chips
and 4KB RAM chips. State required width of the address bus, data bus and clearly show your
calculations and RD/WR and CS signals. Assume that the word length is 8 bit. State any other
assumptions.
(d) Draw a memory map for your design in Q2. (c) (Clearly show starting address, end address, and
address line values for each chip).
(b) List down the different manufactures that produce 8051 derivatives with their proprietor names
with cost.
(c) Compare and contrast the followings with the 8051 microcontroller (choose a microcontroller
from each category)
1. PIC 3. MSP430
2. Atmel ATMEGA 4. ARM
(Consider the I/O, Memory, ADC/DAC, Serial Communication, Availability, Cost, ISA, Forums and
Online Supports and the Applications etc. in your comparison)
(d) By giving examples, compare and contrast the low level languages and the high level languages
for programming of the microcontroller based systems
[Q4]
(a) Briefly explain each function of the decoder, de-multiplexer, encoder and multiplexer using
block diagrams and truth tables.
(b) Draw flowcharts to demonstrate the functions of each device.
(c) Draw a block diagram to interface 16 push-button switches, 16 LED to 8051 microcontroller
using Q4. (a) Indicated devices. (You need to select appropriate device for optimum solution)
(d) Write an ALP to glow each LED if the relevant push-button is pressed.
[05]
Study the available sensors for very small and large distance measurement in the real world
application and list two sensors for each category with name, model, distance, cost etc.
(b) How to determine the rotation direction, rotation angle and rotation speed of a stepper
motor and a servo motor.
(c) Explain a mechanism to control the direction, angle and speed of a stepper motor and
draw an output waveform.
(d) Write an ALP to control the direction, angle and speed of a stepper motor according the
mechanism that you explained in Q1. (c).
[Q2]
(a) List the available analogue to digital converter (ADC), digital to analogue converter (DAC)
with specification in the market. (I.e. resolution bits, cost, interfacing mechanism,
sampling speed etc.)
(b) The n-bit R/2R digital-to-analog converter (DAC) has a reference of 16 V and the analog
output for the input code 1 is 15.625 mV. Find the digital input value for the output
9.140625 V.
(c) Draw a block diagram to interface an 8 bit ADC with 8051. Clearly show your calculations
and assumptions to use above DAC to set the ADC reference voltage 10 V and display the
result in three seven segment displays.
(d) Draw a flowchart to measure analog voltage 5 V using above ADC and DAC. Display the
result in three seven segment displays. Clearly show your calculations and assumptions.
(a) In a serial communication experiment of 8051 microcontroller, a student set the crystal
frequency as 11.0592MHz and the variable baud rate is 9600. Find out the timer values of
the 8051 microcontroller for the experiment.
(b) Write an ALP to send a string @DEG 120 to a PC through serial communication every X
milliseconds of the 8051 microcontroller (where X is your first digit of registration
number). Use 9600bps, 8 data bits, 1 start bit, 1 stop bit and no parity bits for the
communication. (Assume that the PC will receive data without any error)
(c) Draw a block diagram and explain how serial mode 3 can be used in multi device
communication. (Select number of devices as ( + ) where x is first digit of your
registration number)
(d) Draw a flow chart to send a string to any device in your multi device platform.
(e) Modify the ALP wrote in Q3. (b) to send the same string to any device in your multi device
platform.
[Q4]
(a) Briefly explain importance of the watchdog timers in the microcontroller based systems.
(b) A student is expecting to generate PWM signal. Duty cycle of the PWM signal may 25% or
50% or 75%. Assume frequency of the PWM signal is 40 kHz.
i. Sketch the wave form of the PWM signal for each of given duty cycles.
ii. Write an ALP to generate the PWM signal having 75% duty cycle using timer
interrupts.
[05]
Very briefly explain the operation of each sensors that you have identified in TMA #1, Q5,
with diagrams.
The following description is about an Electronic Diameter Measuring System (EDMS) which is
used to measure the diameter of a metal ball. You are to analyze and design the requirements
for the EDMS (Figure 1) according to the 8051 microcontroller specifications.
The EDMS consists of a Diameter measuring unit, a Conveyor unit, a LED display panel, a
Start/Stop button panel and a 8051 microcontroller unit (8051 MCU) with a seven segment
display. The Conveyor unit which has only one motor (M1) rotating in one direction moves
the metal balls on to the diameter measuring unit. The Diameter measuring unit has a Linear
Variable Differential Transformer (LVDT) displacement sensor attached to the measuring bed.
The LED display panel has seven LEDs to show the classification of the metal ball (Table 1).
The 8051 MCU is used to connect all the modules in the system. In addition to that, the seven
segment display shows the diameter of each metal ball in millimeters and the Start/Stop
buttons are used for switching the system on or off.
The EDMS will classify the metal balls according to the metal ball diameter. Assume that
acceptable diameter range of a metal ball is between 2mm and 6mm and the metal ball
diameter is a single digit integer (1 to 7). The classification values and LVDT output voltages
are shown in the Table 1 below.
State all other assumptions (if any) clearly, when answering the questions.
[Q1]
(i) Propose a mechanism to measure the diameter of the metal ball when it comes to
the measuring bed and release the result to the 8051 MCU before the next metal
ball arrives to the measuring bed with the help of the other sensors, actuators and
interfacing devices.
(ii) Find the resolution and the reference voltage ( ) of the Analog to Digital
Converter (ADC) which interfaces the LVDT and the 8051 MCU. Hence calculate
the equivalent digital values for the LVDT sensor.
(iii) Draw the external view of the system (i.e. a diagram that shows the inputs and the
outputs of the system).
(iv) Identify the sub units/sub modules of the system and draw the interconnected
block diagram of the system using the central controller and other required
interfacing devices.
(v) Draw a schematic diagram of the system
[Q2] Identify the design issues and the necessary improvements of your design.
Study the AES-51 development board and execute assembly language programs.
Study the microprocessor interfacing for AES-51 development board.
Study the advanced microprocessor interfacing techniques and build real time
application by using 8051 microcontroller.
Objectives:
Experimental Tasks:
Session #1
Session #2
Verify ALP by using AES-51 development board with given external interfacing
circuits/devices.
Session #3