Vous êtes sur la page 1sur 1

Assignment # 1 – Microcontroller Based Systems – Spring 2019 – Dept. of Mechatronic Eng.

Q1. Given the following specifications for a Hypothetical Microprocessor: 10 Points

 Instruction Format: Size of the Instruction = 32 bits; (Opcode = 7; Address = 25)


 Integer Format: 10 bit integer with the MSB being used as the sign bit.
 Partial List of Opcodes: (HEX values)

Load AC1 from I/O: 00 h Store AC1 to memory: 04 h


Load AC2 from memory: 01 h Output AC2 to I/O 05 h
Subtract AC1 from AC2 and store result in AC1: 02 h Store AC1 in AC2: 06 h
Subtract AC2 from AC1 and store result in AC2: 03 h

Where:

 PC = Program Counter; IR = Instruction Register; AC1, AC2 = Accumulators.


 Input from Keyboard (device C5 H ) = 56 H ;
 Data at the 2nd memory location = 4E H ;
 Output Device is a “Monitor” (device 9A H).
 The program instructions are to be stored contiguously in memory from location 7A9C3E H onwards.

Write a program in (hexadecimal format) for the given TASK below:


(‘Memory Map’ and ‘machine cycle’ steps are NOT required. Write “1s” for all don’t care conditions; A don’t
care condition occurs when you have nothing to write in the “address field” for an instruction because it doesn’t
require to access the RAM in its execution cycle!)

The TASK:

Subtract the input of the keyboard from the data present at the 2nd memory location and store the
result at the 2nd Last memory location and also output the result at the monitor.
(Note: To resolve any confusion regarding subtraction consider the following example: If you are asked to
subtract “5” from “8” then you’ll do the calculation “8 – 5 = 3”)

[(CLO_1) (Cognitive Level C2 - Understand) (PLO_1, i.e., Understanding and Applying)]

Q2. For the specifications of the system in Question 1 above, answer the following: 10 Points

1. What would be the maximum size of the RAM that could be connected to the given microprocessor?
2. What would be the address range for the RAM (in HEX)?
3. What would be the size of IR?
4. What would be the size of PC?
5. What would be the size of AC1?
6. How many I/O ports are available with the given processor?
7. What is the maximum number of the instructions possible for the given microprocessor?
8. What will be the width of A-BUS?
9. What will be the width of D-BUS?
10. What range of integers can the given processor handle?

[(CLO_1) (Cognitive Level C2 - Understand) (PLO_1, i.e., Understanding and Applying)]

BRAINSTORM!

Vous aimerez peut-être aussi