Professional Documents
Culture Documents
Faculty of Engineering Technology Department of Electrical and Computer Engineering Diploma in Technology Level 04
Course Information and Tutor Marked Assignments (2011/2012) ECX4236 Microprocessors and Interfacing
Target Group: Students who are readying for the Diploma 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. 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 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 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 28h of May 2011 from 0900 to 1130hrs 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. 2 ECX4236 Microprocessors and Interfacing
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 SystemUsing Assembly and C Second Edition Prentice-Hall India (Muhammed Ali Mazidi, JuniceGillispieMazidi, Rolin D. Mckinlay) Embedded Systems & Robots:Projects Using The 8051 Microcontroller SubrataGhoshal
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 +94 11 288 1437
E-mail: Phone: -
[Q1] (a) How would you explain the process of writing an Assembly Language Program (ALP), the compilation using ASM51 compiler, simulation using 8052 simulator and the generating the files for a beginner who is going to use an 8051 microcontroller? Explain using screenshots of the processes. (b) A student has written a simple ALP program and has compiled it using ASM51 compiler. A part of the generated .LST file is shown below in Figure 1. Briefly explain each part of the code segments circled?
Figure 1 (c) Calculate the no. of machine cycles has been consumed in executing the written program. (d) Assume that currently the processor executes the instruction resides in the memory location 0003H. Explain the process of executing the next instruction resided in 0005H. You are expected to discuss the change of the contents of the Program Counter and the fetch and execute cycles. [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) What is the difference between each type of memory and write down sample codes to access each memory segment? (c) Write a simple ALP to store the values of the array shown below in a stack and retrieve the value which is equal to 05H. 5, 10,20,15,16 (d) What is the mechanism used to identify the register bank is being addressed at a particular time from the available four register banks? 4 ECX4236 Microprocessors and Interfacing
(d) Draw a diagram and describe the process of counting the number of the occurrences of a particular event in counter mode used above in part (d).
[Q4] Assume that you have asked to design a practical model for the students who are studying microprocessor and interfacing. You are allowed to select any component from the following, A LCD, Two seven segments displays, DIP Switch, 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 flow chart 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 practical model?
[Q1] (a) What are the available types of Stepper motors? (b) How to determine the direction of rotation in a Stepper motor? (c) Assume that you have provided a four wire lead, permanent magnet stepper motor which the step angle is 1.8 degrees. 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. (d) Explain about the interfacing devices that you have used in your design. (e) Write a small ALP of your design. No of steps require to rotate one complete rotation = 360 deg. / step angle in deg. The relation between RPM and steps per sec. is given by, Steps or impulses /sec. = (RPM X Steps /revolution) /60 [Q2] There is a push button connected to the pin 2 of Port 2 (P2.2) and there is a corresponding LED connected to pin 0 of Port 0 (P0.0). (a) Write a simple ALP to glow the LED once the push button is pressed. (b) Draw the circuit diagram by considering the necessary changes to be done in order to use interrupts and re-write the ALP using external hardware interrupts. (c) What are the advantages of using interrupts over poling method? You are expected to answer by considering the scenario given above. (d) Assume that you have connected an extra LED to pin 1 of Port 0 (P0.1) and have written the ALP to automatically toggle the LED every time when the Timer1 overflows. What will be the contents of the IE register that you require to assign? Justify your answer. (e) How do you prevent the confusion that could happen with simultaneous interrupt occurring? (f) What happens if an interrupt occurs? You are expected to describe by specifying the change of the contents of the Stack Pointer.
[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. To detect whether it is morning or not II. To measure the RPM of a DC motor III. To check whether the soil is dry or not IV. 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
SBDS can be found at all central and convenient locations throughout the city. Only 3 simple steps are necessary to ensure the user care-free and individual transport: REGISTER User-code will be made available upon registration. RIDE - Type in your code at a SBDS and it will release a bike for you to ride. RETURN - When you have reached your destination, return your bike to any SBDS. The bike is automatically locked and ready for the next user! The SBDS consists of the docking modules' which lock the bicycles in place, ready for use, as well as the vertical interactive and informative column that identifies the user.
[Q2] [Q3]
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
[Q4]
Objectives: Having completed the experiments you will be able to understand Familiar with the software tools for microprocessor programming. Understand about the contents of List file (*.lst) and Hex (*.hex) file. Identify the basic functions of AES-51 development board. Understanding the sensors and actuators Understanding microprocessor Interfacing techniques Hands on experience of microcontroller interfacing
Experimental Tasks: Session #1 Identify the basic functions available in the AES-51 development board. Run the self-test program and familiar with the each functions of the AES-51 development board. Familiar with the 8052 simulator Assemble the programs written in TMA#1 and observe the results by using AES-51 development board.
Session #2 Assemble and simulate the programs which you written in TMA#2 Verify ALP by using AES-51 development board with given external interfacing circuits/devices.
Session #3 Assemble and simulate the programs which you written in TMA#3 Verify ALP by using AES-51 development board with given external interfacing circuits/devices.