Cork Institute of Technology Bachelor of Engineering in Applied Electronic Design - Stage 3 Bachelor of Engineering in Electronic Automation and Robotics - Stage 3 Bachelor of Engineering in Communication Systems - Stage 3 Answer THREE questions. (NFQ Level 7) Autumn 2006 Microcomputer Applications (Time: 2 Hours) Examiners: Mr. F. O Reilly Mr. P. Watson Mr. J. Berry Dr. R. O Dubhghaill Q1 (a) Compare and contrast microprocessors and micro-controllers. What advantages, disadvantages does each have? [8 marks] (b) For the following applications identify, (i) Approximate no of Input & Outputs (ii) Estimate of speed/performance required. (iii) Complexity/Range of algorithms/programmes to execute. Applications Handheld Remote Control for TV/Video. Microwave Oven with digital timer and programmer. PlayStation Portable (PSP) handheld games console. From the following micro-controller/microprocessors, suggest suitable models and why for each of the above applications. Embedded 8051 Low Cost IC, Motorola 68000 processor, Intel Pentium 3 family, Microchip PIC. [15 marks]
(c) As a member of an 8-bit micro-processor usage team, you are tasked to devise a scheme to vary the number of special registers from 200(basic model) to 800(advanced model), while being restricted to using only 8 bits(max of 256) to describe which register is in use. Can you suggest a scheme to do this? Which micro-processors/micro-controller currently use such a technique? [10 marks] Q2 (a) Interrupt handling is important for embedded systems. Explain what happens when an interrupt occurs in the PIC and how the interrupt should be handled. Explain what memory addresses are used, the different types of interrupts available and how they can be differentiated. [12 marks] (b) Explain the operation and configuration of Timer 2 on the PIC micro-controller. Derive the following formula for the preload value. [10 marks] Pre-load Value = Time * FOSC (Using Internal Clock) Prescalar * 4 (c) Calculate the pre-load value for the 16c74 micro-controller to generate a 4.0 khz square wave using Timer2, showing in code how the value would be loaded in. Assume a clock of 4MHz. [12 marks]
Q3 (a) You have an analog signal with a maximum frequency of 4KHz which varies in voltage from 0 -> 5V. You wish to digitise this into a numerical value at a regular sampling interval. Describe how this can be done with a Microchip PIC, describing the manipulation of the input levels, range of output values and any key registers used both in the configuration and operation. How does one know one of these conversions will have completed? [14 marks] (b) Write the configuration, interrupt handling and data reading sections of a PIC assembly language program for the 16c74 micro-controller, which continually reads in an analogue voltage from 0 -> 5V on RA0 and outputs it in binary format on PORTB. [20 marks] Q4 (a) What peripheral device is used on the PIC to achieve a Serial Data interface? How would this be configured to give an asynchronous serial interface at 7200 baud? Calculate the baud rate generator configuration value and show how it would be loaded. Explain, naming the registers and pins used, how it can be used to Transmit data serially. Receive data serially. [16 marks] (b) Describe, using diagrams, the principle of how a 16 key-keypad can be read from a microcontroller/micro-processor. How many input/outputs are needed and provide an example of how a particular key press (no 5) would be determined and identified. You should explain the algorithm to determine which key has been pressed with a flowchart. [18 marks]