Sie sind auf Seite 1von 8

THE OPEN UNIVERSITY OF SRI LANKA

Faculty of Engineering Technology Department of Electrical and Computer Engineering Diploma in Technology Level 04

Course Information and Tutor Marked Assignments (2012/2013) ECX4236 Microprocessors and Interfacing
Target Group: Students who are readying for the Diploma/Degree in Engineering Technology Aims and Objectives: This course provides the background knowledge necessary to build interfaces to a simple microprocessor based system. After studying this course, you are expected to achieve the following: Be able to identify the programming model of a microprocessor/ microcontroller. Ability to use the Instruction Set Architecture (ISA) to perform o Arithmetic / Logic Operations. o Data / Control Transfer Operations. o Input / output Operations. Describe the role of a computer simulator in program development and the ability to use such a simulator. Describe the purpose and use the following basic components of the 8051 architecture. o Special Function Registers (SFR) o Register Banks o Interrupts o Timers / Counters o Serial Communication Ability to write programs in assembly language to perform a particular task using a microprocessor / microcontroller. Know the difference between a microprocessor and a microcontroller. Know the different types of applications for which microcontrollers are used. Ability to use basic interfacing techniques to connect the microcontroller to the outside world. Basic knowledge about the ASIC and HDL. 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 no. and password is s-user (If you need an enrolment key please email your request to the course coordinator) Three home-based Tutor Marked Assignments (TMAs) will direct such reading. You are required to prepare three home TMAs. These should be prepared individually although you are encouraged to form discussion groups and discuss the issues among yourselves whenever 1 ECX4236 Microprocessors and Interfacing

possible. Plagiarism (that is, presenting others work as your own) will not be tolerated, and will be reflected in the grade of all parties involved. For each assignment, a viva voce examination will be held during laboratory classes. 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. CA Final = Average Best 6 of (3 TMA, 3 lab sessions, 1 CAT) Lab Average = average of (3 lab sessions) Eligibility = CA Final 40% AND Lab Average 40% 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 26th May 2012 from 0900 to 1130 HRS 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: What Every Engineer should know about Micro-Computers Hardware/Software Design a Step-by-step Example (William S. Bennett and Carl F. Evert, Jr.) The 8051 Microcontroller and Embedded System Using Assembly and C Second Edition Prentice-Hall India (Muhammed Ali Mazidi, Junice Gillispie Mazidi, Rolin D. Mckinlay) Embedded Systems & Robots: Projects Using The 8051 Microcontroller Subrata Ghoshal

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. cjbas@ou.ac.lk Direct: +94 11 288 1437 (Ext: 437)

E-mail: Phone: -

2 ECX4236 Microprocessors and Interfacing

Tutor Marked Assignment #1 2012


Use the ASM51 Assembler and the 8052 simulator to verify your ALP. Submit your written assignment on or before 29th June 2012 and late submissions will not be accepted! You should be prepared to face a viva voce examination based on TMA #1, during the first laboratory session.

[01] (a) A student has written a simple ALP program and has compiled it using ASM51 compiler. The generated .LST file is shown Figure 1. (Refer Page 31 LIGHT.ASM in Book 1) (b) Calculate the no. of machine cycles has been consumed and verify the delay time in the written program (Figure 1). (c) Modify the given ALP to glow a LED when push button switch is pressed and released. Assume that the push button switch is connected to the port 2 bit 0 (P2.0) of the 8051 microcontroller. i. ii. iii. iv. Draw a schematic diagram for your solution. Draw a flowchart for your algorithm. Write ALP for your modification. Draw the expect I/O waveforms of the system.

(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 to eliminate switch bounce using software solution that suggested in Q1.(e)

Figure 1 3 ECX4236 Microprocessors and Interfacing

Tutor Marked Assignment #1 2012


[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. (b) Write the differences between each type of memory and write an ALP to access each memory segment. (c) Briefly describe the Lookup Tables by giving an example with ALP. (d) Briefly explain the differences between interrupts and Polling by giving an example with ALP. [Q3] (a) List down the software tools that helps to develop 8051 based microcontroller systems and state their usage in embedded system designs. (b) List down the different manufactures that produce 8051 derivatives with their proprietor names. (c) Compare and contrast the followings with the 8051 microcontroller 1. PIC 16F877A 2. Atmel AVR 8 bit RISC 3. 4. PLC 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, briefly explain why low level languages are most preferred than high level languages in microcontroller based systems [Q4] Assume that you have asked to design a laboratory experiment model for the students who are studying 8051 microcontroller. You are allowed to select any component from the following, A LCD, Two seven segments displays, Switches, two DC Motors, two Stepper motors, LEDs and/or any other electronic components. Make sure that it is compulsory to use one of the given motor types. (a) (b) (c) (d) (e) Draw a block diagram of your design. Describe your design using a flowchart and mention the assumptions that you made. Draw a schematic diagram of your design. Prepare a complete list of components that you are expecting with a short description. What are the motives that the student would be able to gain by using your laboratory model?

[05] Study the southern highway in Sri Lanka, entry points, exit points, distance and toll between each points, maxim and minimum speed limits, etc. (Use internet for your study) (a) Draw a simple map of the southern highway in Sri Lanka by identifying above parameters.

4 ECX4236 Microprocessors and Interfacing

Tutor Marked Assignment #2 2012


Use the ASM51 Assembler and the 8052 simulator to verify your ALP. Submit your written assignment on or before 24th August 2012 and late submissions will not be accepted! You should be prepared to face a viva voce examination based on TMA #2, during the second laboratory session.

[Q1] (a) What are the available types of Stepper motors and DC motors? (b) How to determine the direction of rotation in a Stepper motor and a DC motor? (c) Choose one type of stepper motor that you identified in Q1. (a). I. Design a small apparatus to rotate the stepper motor clockwise, anticlockwise and to measure the RPM after pressing correspondent switches and draw the connection diagram of your apparatus. Explain about the interfacing devices that you have used in your design. Write an ALP of your design.

II. III.

(d) Explain a mechanism to control the speed of a DC motor 25%, 50% and 75% of its full speed and draw the output waveform. (e) Write an ALP to control the speed of a DC motor 25%, 50% and 75% of its full speed according the mechanism that you explain in Q1. (d).

[Q2] (a) List the available analogue to digital converter (ADC) with specification in the market. (I.e. resolution bits, cost, interfacing mechanism, sampling speed etc.) (b) Draw a block diagram to interface an analogue to digital converter ADC0804 with 8051. (c) Draw a flowchart to measure analog voltage using ADC0804 with 8051. (d) Write an ALP to implement your algorithm Q2. (b).

[Q3] (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 @RMOV 01 -5000 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)

5 ECX4236 Microprocessors and Interfacing

Tutor Marked Assignment #2 2012


[Q4] (a) You are expected to search the internet and find the suitable devices (sensors/transducers or actuators) need to be interfaced with 8051 for the following. Justify your answers. I. II. III. IV. To detect whether it is morning or not To measure the RPM of a DC motor To check whether the soil is dry or not To check whether there is an obstacle within a certain area or not

(b) List down the model, measurement range can be made and the type of the output signal of the devices mentioned above in part (a) (c) Draw simple block diagrams to depict the way of interfacing the sensors or the actuators mentioned above in part (a) with 8051

[05] Study the southern highway in Sri Lanka, entry points, exit points, distance and toll between each points, maxim and minimum speed limits, etc. (Use internet for your study). (a) Identify the vehicle classes based on the weight and their toll according the distance traveled. (b) Draw a flowchart to calculate toll of any vehicle in the exit points.

6 ECX4236 Microprocessors and Interfacing

Tutor Marked Assignment #3 2012


Use the ASM51 Assembler and the 8052 simulator to verify your ALP. Submit your written assignment on or before 26th November 2012 and late submissions will not be accepted! You should be prepared to face a viva voce examination based on TMA #3, during the third laboratory session.

Electronic Toll Collection System (ETCS)


The following description is about the Electronic Toll Collection System (ETCS) and you are to analyze and design the requirements for the ETCS according to the 8051 microcontroller specifications.

Figure 1.1: Typical view of ETCS


(Image source: http://www.mindfully.org)

The electronic toll collection system (ETCS) allows drivers to pass through toll gates in southern highway in Sri Lanka without stopping for toll payment. A typical view of the toll booth in ETCS is shown in Figure 1.1. One of the biggest complaints of motorists using toll roads is the congestion and delay caused by stopping to pay at the tollbooths. Many toll authorities have searched for ways to improve the toll collection process You are required to analyze and design the toll booth operation as depicts in the Figure 1.1. As a vehicle approaches the toll booth, sensors alert the electronic toll collection system of its presence (refer no 1 in the typical view). The vehicle next passes through a light curtain, which records when a car has entered and exited the system (refer no 2 in the typical view). When the vehicle reached to the gate area then the gate will be opened 900 degrees upward (refer no 3 in the typical view).

7 ECX4236 Microprocessors and Interfacing

Tutor Marked Assignment #3 2012


Design Guidelines 1. Design for operate the gates and for calculates the toll collection in the exit point. 2. Use seven segment displays for display current vehicle count (i.e. current vehicle count = total arrived vehicles total leaving vehicles) and toll. 3. There are identical toll booths available at the Entry point and Exit point and they are interconnected with each other. 4. These two toll booths operate via a single 8051 microcontroller unit. 5. When the vehicle reaches the light curtain the gate should be opened, and stay open for 90 seconds. 6. No vehicles are allowed in the entrance, if the current vehicle count reaches 90 and that gate should not be opened. 7. You can use external memory of the microcontroller to store the current vehicle count, total arrived vehicles, total leaving vehicles and toll. 8. Crystal frequency of the 8051 microcontroller is 12MHz. State all other assumptions (if any) clearly, when answering the questions. [Q1] (i) Identify the sensors and the actuators required in each phase that shown in the Figure 1.1 (no 1, 2, and 3).

(ii)

Draw the external view of the system (i.e. a diagram that shows the inputs and the outputs of the system).

(iii)

Identify the sub units/sub modules of the system and draw the interconnected block diagram of the system using the central controller. Draw a flowchart to represent the algorithm for operations of the system. Write an Assembly Language Program for the system. (Clearly show assembly routines with comments) Identify the design issues and the necessary improvements of your design. Is it possible to implement your design on an ASIC (Application Specific Integrated Circuit)? Justify your answer? List the ethical issues/considerations of your design

(iv) (v)

[Q2] [Q3]

[Q4]

8 ECX4236 Microprocessors and Interfacing

Das könnte Ihnen auch gefallen