Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
54 views

Microprocessor Microcontroller RESIT 2021 MG

This document contains instructions for a re-sit examination for a Bachelor of Engineering program. It provides information on the exam such as the department, course code, instructor, date, and venue. The exam is divided into two sections and contains multiple choice questions, true/false questions, and short answer questions related to microcontrollers, microprocessors, and memory. Students are instructed to show their work clearly and answer all questions.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views

Microprocessor Microcontroller RESIT 2021 MG

This document contains instructions for a re-sit examination for a Bachelor of Engineering program. It provides information on the exam such as the department, course code, instructor, date, and venue. The exam is divided into two sections and contains multiple choice questions, true/false questions, and short answer questions related to microcontrollers, microprocessors, and memory. Students are instructed to show their work clearly and answer all questions.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

Bachelor of Engineering

Re-sit Semester Examinations


2020/2021 Academic year

Department: Computer Option: CSE/EME Level: 300/400


Engineering
Course code/ Title: CSE 302/ Microcontrollers and Credit value:
Microprocessor
Duration: Date: Venue: Examination Hall
Course Instructor M. AZANGUE Brice Arthur / M. AKUPAN Rene

Read the instructions carefully before you start answering the questions.
Instructions
o Answer all questions
o You are free to start by any section.
o This paper is divided in to two sections section A and section B
o Orderly presents your answer
o Respect all symbols tags for technical diagrams

CORRECTION
Section A: (25 marks)
MODULE I: TRUE or FALSE (10 marks)
Draw a table and answer by TRUE and FALSE
Instruction: 1.5 marks for correct answer and - 0.5 mark for wrong answer and

0 mark if no answer.

Questio 1 2 3 4 5 6 7 8 9 10
n
Answer

1. Under a memory, the validation/selection of a cell is possible thanks to any terminal


hold by a cell.
2. The PWM signal at the output of the converter is actually filtering by the low pass filter
so that the signal is well recover.
3. The circuit that provides external clock to the microcontroller has one capacitor that the
function is to maintain constant functioning of the circuit.
Page 1 / 9
4. The first programming language is the Assembly language for the programmers.
5. The most active memory between the ROM and RAM is the ROM.
6. Microcontroller can be considered as an embedded system the include in his chip a
processor and externals interfaces.
7. The particular terminal used by a single cell of a memory for locate the cell is and
input terminal call chip enable (CS).
8. In the memoryr, the stack pointer register is used to select a particular location bank of
the register and send the content to the ALU.
9. To give an instruction of the processor to process and restore data, you can press on
the keyboard the button “Enter’’.
10. In the case of and external event at the level of microprocessor the watchdog stops the
current process and treat the event first.

Question 1 2 3 4 5 6 7 8 9 10

Answer F T F T F F T F T F

MODULE II: Multiple choices (5 marks)

1. A microcontroller at-least should consist of:


A. RAM, ROM, I/O ports and timers
B. CPU, RAM, I/O ports and timers
C. CPU, RAM, ROM, I/O ports and timers
D. CPU, ROM, I/O ports and timers
2. Give the names of the buses present in a controller for transferring data from one place
to another?
A. data bus, address bus
B. data bus
C. data bus, address bus, control bus
D. address bus

3. What is the file extension that is loaded in a microcontroller for executing any
instruction?
A. .doc
B. .c
C. .txt
D. .hex

4. What is the most appropriate criterion for choosing the right microcontroller of our
choice?
A. Speed
B. Availability
C. ease with the product

Page 2 / 9
D. all of the mentioned

5. Why microcontrollers are not called general purpose computers?


A. because they have built in RAM and ROM
B. because they design to perform dedicated task
C. because they are cheap
D. because they consume low power

MODULE III: Short Questions (10 marks)


1. What is a microprocessor and what are its basic units and their functions? (2 mks)
Answer
Microprocessor is a CPU fabricated on a single chip, program-controlled device, which
fetches the instructions from memory, decodes and executes the instructions.
The basic units or blocks of a microprocessor are
- ALU – arithmetic and logical operations
- an array of registers - data storage
- control unit. - issuing of control signals

2. What are the disadvantages of microprocessor- give two? (2mks)


Answer
It has limitations on size of data. Most Microprocessor does not support floating point
operations.
3. What is Instruction Set? (2mks)
Answer
It is the set of the instructions that the Microprocessor can execute
4. Give a list of some microcontrollers and microprocessor you know (3 mks)

Answer
Microcontrollers: PIC16F877A, PIC16F84A, Atmel
Microprocessor: intel 8085, intel 8086
5. Give the functions of the TRISB in a PIC16F84A microcontroller (1mk)
Answer
This is where the pin configuration of PORTB takes place. Its is used to decide which pin
you use as an input pin or s an output pin.
Section B: (45 marks)
Question One (12 marks)
a. From the microcontroller give two differences betweem Harvard Architecture

and von- Neumann architecture ! (0.5 marks x4=2 marks)


b.

Page 3 / 9
Harvard Architecture Von- Neumann architecture

RISC CISC
RAM+ROM in single memory RAM and ROM in different memory
Low speed High speed
Less complexity More complexity

c. Draw the circuit of PULL-UP resistor. Explain the functionning until the pulse signal
(logic) is send. (1.5 marks + 1.5 marks = 3 marks)
Drawing of the PULL-UP circuit

Functionning  : at the resting state, the output is supply at Vcc then the logic is « 1 ».
when pressing on the push button, the output is directly toggle to logic « 0 », due to the
fact the we have connexion with the ground and the dropping voltage due to the
resistance.
d. From figure 1 below ;
e.1 Give the function of each terminals of the memory (1x4 =4marks)

Figure 1

Figure 2 describe the memory cell selection technique.

Figure 2

Page 4 / 9
e.2 Explain clearly how each memory is located. (1 mark)
e.3 If a size used by a cell is 32K, what is the size for the memory of figure 2 ! (1 mark)
e.4 Describe a particular procedure that can be used to extend the size of this memory in such
a way that the memory shall be 5 times the actual one. (1 mark)

Question Two (13 marks)

Mapping memory of the microprocessor

We consider a single processor that drive the RAM memories with 16 adresses and 8 bits for
data lines for access at each memory cell. Each memory cell has a capacity of 64K. Figure 3
and Figure 4 show the appearance of a processor and a single RAM memory with the pins.

a) How many RAM memory cell is used! (2 marks)

The number of RAM memory cell is equal to the number of data pins driven by
microprocessor. We will used 8 RAM memory cells.

b) How the data are transferred (from address pins) until reach to the memory!

The data in transferred in packet of data. (1 marks)

c) Draw the diagram that describe the arrangement of the microprocessor and these RAM
memories. (4.5 marks)

Diagram of the arrangement

d) Explain exactly how the RAM memory cell is accessed. (1 mark)

Each cell memory is accessed using a data pins (from 0000000 to 11111111) of the
microprocessor. These pins are driven when new packet of data is present at the level of

Page 5 / 9
address pins. And when memory cell is already used, a particular counter check other bit to
know whether memory cell is being used of not.

The whole memory is full when each RAM memory cell is used (from 0000000 to
11111111).

e) What is the total size (CT) of the Whole memory! (1.5 marks)

Total size: CT = 64K x 8 = 512K CT = 512 K

f) What can be the behavior of the memory if an additional data (from address pins)
arrived! (1.5 marks)

If we an additional data (from address pins) arrived, the memory can’t be able to store it.
Data will be rejected.

g) We consider that a set of each data that will be stored in a RAM memory cell used the
half (1/2) of the memory cell. How many sets of data is possible to full the whole
memory! (1.5 marks)

The size of memory cell is 64K then the half is 32K. then to full a single cell we need 2
packets of data. Since we have 8 memories cells, then we will have 16 packets of data to
completely full the whole memory.

Question Three (20 marks)


Consider the electronic circuit below designed on the PIC16F84A. The circuit is a seven-segment
display circuit which displays the numbers 0,1,2,3,4,5,6,7,8,9and repeat the sequence continuously

X1 U1
16 17
OSC1/CLKIN RA0
15 18
OSC2/CLKOUT RA1
1
RA2
4 2
CRYSTAL (4MHz) MCLR RA3
RA4/T0CKI
3
COMMON CATHODE 7 SEGMENT
C2 C1 R1
22pF 1pF 6
RB0/INT
7
RB1 220
8
RB2
9
R2
RB3
10
RB4 220
11
RB5
12
R3
RB6
13 220
RB7
PIC16F84A
R4
220
R5
R8
220
10k R6
RESET PIC (MASTER CLEAR) 220
R7
220

a) Explain the relevance of R1, R2, R3, R4 R5, R6, R7 and RESET PIC

Page 6 / 9
b) Develop an assembly language program that will implement this sequence of counts. The PIC is
operating at a frequency of 4MHz. The MCLR Button resets the PIC controller. You are obliged
to add comments to your code
c) Based on your program written in (a), calculate the total time of execution of the program

Answer

a) R1, R2, R3, R4 R5, R6, R7 limits the voltage the goes to power the LEDs in the 7-sement
and RESET PIC is used to reset all operation in the PIC
b) ======
;Project: Counting on 7-segment display
List P = 16F84
#include <p16F84.inc>
__CONFIG 1Bh ;_CP_OFF & _PWRTE_ON & _WDT_OFF & _RC_OSC

COUNT1 EQU 09H


COUNT2 EQU 08H
TRISB EQU 86H
PORTB EQU 06H
BSF STATUS,RP0
CLRF TRISB
CLRW
BCF STATUS,RP0
CLRF PORTB
START MOVLW 0x3F ;0
MOVWF PORTB
CALL DELAY
CALL DELAY
MOVLW 0x06 ;1
MOVWF PORTB
CALL DELAY
CALL DELAY
MOVLW 0x5B ;2
MOVWF PORTB
Page 7 / 9
CALL DELAY
CALL DELAY
MOVLW 0x4F ;3
MOVWF PORTB
CALL DELAY
CALL DELAY
MOVLW 0x66 ;4
MOVWF PORTB
CALL DELAY
CALL DELAY
MOVLW 0x6D ;5
MOVWF PORTB
CALL DELAY
CALL DELAY
MOVLW 0x7D ;6
MOVWF PORTB
CALL DELAY
CALL DELAY
MOVLW 0x07 ;7
MOVWF PORTB
CALL DELAY
CALL DELAY
MOVLW 0x7F ;8
MOVWF PORTB
CALL DELAY
CALL DELAY
MOVLW 0x6F ;9
MOVWF PORTB
CALL DELAY
CALL DELAY
GOTO START
Page 8 / 9
;;;===================DELAY FUNCTION=================
DELAY
LOOP1 DECFSZ COUNT1,1
GOTO LOOP1
DECFSZ COUNT2,1
GOTO LOOP1
RETURN
END
c) ======
Frequency = 4MHz
Total instructions = 72
Total number of cycles = 4 * 72
Total time of execution = ( 4*72)/(4MHz) = 72us

Page 9 / 9

You might also like