Microcomputer Applications
Microcomputer Applications
Duration: 2 Hours
Note to Candidates: Please check the Programme Title and the Module Title to ensure that you have
received the correct examination paper.
If in doubt please contact an Invigilator.
Q1 (a) List four categories/criteria under which one might examine an application to
decide whether to use a micro-controller or microprocessor?
[9 marks]
(c) The PIC 16c74 arranges its memory into two register banks. What
advantages/disadvantages does this have? How do you control which register
bank is addressed/selected at any time? [10 marks]
[Total: 34 marks]
Q2 (a) The following excerpts of code and memory addresses perform an important
function within the PIC. Explain what this function is (4 marks), how it operates
below (4 marks) and give two other examples where you might use it.(4 marks)
org 0x0004
goto ISR
:
ISR: btfss PIR1, TMR1IF
retfie
:
bcf PIR1, TMR1,IF [12 marks ]
(b) Derive and explain the following formula based on the Clock Speed and Time,
which can be used to calculate the pre-load values for Timer1 of the PIC Micro-
controller. How can this be changed to suit Timer2? [12 marks]
Calculate the pre-load value for the 16c74 micro-controller to generate a 2.0 kHz
square wave using Timer 1 or Timer2, specifying which timer it is for and
showing in code how the value would be loaded in. Assume a clock of 4MHz.
[10 marks]
[Total: 34 marks]
Q3 (a) Describe the capabilities and operation of the Analog to Digital Converter Unit
of the Microchip PIC, explaining each of the following:
The possible input signal levels
The number of possible inputs
The possible output values
Key registers used both in the configuration
Key registers during the operation
How does one know a conversion has 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 -> 3V on RA2 and outputs it in binary
format on PORTC. [20 marks]
[Total: 34 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 4800
baud? Calculate the baud rate generator configuration value and show how it
would be loaded. [8 marks]