This is a summarized guide of Digital System 3. It contains 90% of possible question and answers for the exams. All possible questions for the exams are taken from the questions in the book Pic Trix by Pat Ellis. These are those questions and answers. 250 pages bundled into 23. Pic Trix can not be ...
2017
2017
2018
1. Introduction and history of microprocessors
(1) Name the three basic functions that all microprocessors perform.
(1) Data transfer.
(2) Arithmetic and logic processing.
(3) Decision making.
(2) Sketch a labeled diagram of the basic bus structure of a microcontroller system.
MEMORY
INPUT UNIT CPU RAM & OUTPUT UNIT
ROM
1 0 x 0 x x 1 x x 1 1 x
ADDRESS BUS
DATA BUS
CONTROL BUS
(3) Briefly discuss each of the following terms:
(3.1) CPU
CPU (Central Processing Unit), contain all the intelligence.
Contains: Control Unit (CU), and the Arithmetic and Logic Unit (ALU)
(3.2) ALU
The ALU(arithmetic and logic unit) is were all the arithmetic and logic processing take place.
Responsible for the decision making that takes place within the microprocessor system.
(3.3) CU
The control unit is responsible for synchronising and controlling every event that takes place within the
microprocessor system.
To be able to perform these tasks the control unit takes charge of the control bus.
(3.4) RAM
The RAM (Random Access Memory). Here the microprocessor can store information (write) in the memory,
or retrieve information (read) from memory.
RAM is a temporary means of storing information. Is “volatile” information is lost on power down.
(3.5) ROM
The ROM (Read only Memory) portion of the systems memory is normally reserved for program storage and
for data that are considered permanent and which does not need to change under program control.
Is non-volatile and not lost during power down.
(3.8) I/O devices
INPUT DEVICE: Input information into the microprocessor system from outside world.
(1) Keyboards.
(2) External storage devices.
(3) Transducers coupled through analogue to digital
OUTPUT DEVICE: Receiving information from the microprocessor and responding to that information.
(1) Cathode ray tube terminal (CRT).
(2) Printers.
(3) External data storage units.
(4) Industrial actuators.
(3.9) Address bus
Is a group of wires (16 wires) that will identify the address (specific location) in the memory that the
microprocessor is writing to, or reading from.
Its uni-directional. DETERMINE WHERE INFORMATION SHOULD BE SENT
(3.10) Data bus
The data bus (8-bits) provides a path for data to flow from the microprocessor to all the functional
blocks and from the function blocks to the microprocessor.
Bi-directional CARRY INFORMATION
(3.11) Control bus
Control bus, each wire serves a separate and unrelated controlling function.
DETERMINE OPERATION OF INFORMATION
(3.12) Tri-state bus driver
Two of these states are logic levels of “1” and “0”. The third state is a high impedance state
(floating), effectively disconnected from the bus.
,(3.13) Program
The program in a computer system is made up of various instructions that direct the operation of the
microprocessor.
Instructions are binary numbers that are interpreted by the microprocessor as various operations that are to
be executed by the microprocessor. A grouping of these instructions is called a program.
(4) Briefly discuss how an instruction will be read from ROM into the microprocessor
To access the ROM and read the next sequential instruction, the microprocessor will do following actions:
(1) The microprocessor places the address, of the next instruction, on the address bus.
(2) The microprocessor activates the control bus signals to identify the current operation as a memory “read”
cycle.
On these actions of the microprocessor the ROM will respond in the following way:
(3) Its outputs become active.
(4) The instruction is placed on the data bus.
(5) The instruction is interpreted by internal decoder and executed.
(5) Discuss the operation of storing information into RAM.
(1) The microprocessor outputs the address, of where the data is to be stored, on the address bus.
(2) The microprocessor activates the control bus signals to identify the current cycle as a memory “write”
cycle.
(3) The microprocessor places the data, to be stored, on the data bus.
(4) The internal circuitry of the RAM are activated to take the data from the data bus and place it in the
location as indicated by the address on the address bus.
(6) With the aid of a sketch discuss the difference between memory mapping and I/O map.
A memory map is normally a listing or graphical representation of the memory and I/O device allocations for a
particular system.
FFFFH FFFFH FFH
A003H Memory Mapped I/O I/O Mapped I/O F3H
I/O # 2 Memory and I/O share the Processor provides separate
A000H 6FFFH
I/O # 2
entire address range of the address range for memory
8000H processor address range and I/O F0H
I/O # 1 RAM
Processor provides more Less address lines for
8000H address lines for accessing accessing I/O 6000H A0H
address lines
I/O # 1
More decoding required Less decoding required
6FFFH decoding 1FFFH A0H
Memory control signal are I/O control signal are used to
RAM used to control Read &Write control Read &Write
ROM 00H
6000H control signal 0000H
1FFFH
ROM
0000H
2. Introducing to assemblers and assembly language
(1) Explain each of the following terms:
(1.1) Object program
A computer program which has been translated into machine language (binary code) by a compiler and
assembler. If this program is entered into a PIC based microprocessor system it will be able to execute the
program directly.
(1.2) Mnemonic
This instruction name should in some way describe the operation of the instruction. The instruction code name
is referred to as a “mnemonic” (memory jogger). ----> movlw 32H (MOVE)
(1.3) Assembler program
The assembler translates the “source program” written in mnemonics(assembly language program) into
a machine code program(binary bits) called an “object program”, which the microprocessor can execute.
(1.4) Pseudo-opcode.
A pseudo-operation, commonly called a pseudo-opcode, is an instruction to the assembler that does not
generate any machine code. The assembler resolves pseudo-ops during assembly, unlike machine
instructions, which are resolved only at runtime. Called assembler instructions or assembler directives.
(2) Discuss the shortcomings of an object program:
(1) Programs are difficult to understand and debug because all binary numbers look the same, especially
after looking at them continuously for a couple of hours.
(2) The entering of programs into the microprocessor is slow and tedious.
(3) The program is not descriptive of the tasks performed.
(4) Programmers often make careless errors that are difficult to detect.
, (3) Give six features of assemblers.
(1) Allows the programmer to assign names to memory locations, I/O devices and instructions.
(2) Convert data or addresses from various numbering systems (e.g. decimal or hex) to binary and
converting characters to ASCII and vice versa.
(3) Perform some arithmetic as part of the assembly.(calculating the jump sizes).
(4) Tell the loader where in memory the different parts of the program or data should be placed.
(5) Provide the information required to include standard programs from program libraries, in the current
program.
(6) Allow the programmer to control the format of the program listing and the input and output devices
employed.
(4) With the aid of some examples, discuss the different assembly language fields.
Optional field Contains either an The address field The comment field is also an optional field
allowing the instruction mnemonic may contain an and is used by programmers to add
programmer to or an assembler address, data or an descriptions of their intents to try and make
assign a label to a directive (an operand. This field the program easier to read and understand.
statement for instruction to the
reference from assembler program). may sometimes This field can start in any column as long as
somewhere else in This field can never be blank. it uses a semicolon as a delimiter at the
the program. The be left empty. The beginning of the field.
label must start in assembler directives
column 1 of the are sometimes called
page. pseudo-instructions.
(5) Explain why labels are used in an assembly program.
1) It identifies a location within source code.
2) A label can be moved or changed to correct a program.
3) The assembler can relocate the whole program by just adding a constant (a relocation constant) to each
address in which a label was used.
4) The program becomes easier to use as a library program.
5) You do not have to calculate memory address.
(6) Give five important factors to consider when choosing a label.
1) Do not use labels which is the same as the mnemonics(opcodes) or register names.
2) Do not use labels which are longer than the assembler permits.
3) Avoid special characters.
4) Start each label with a letter.
5) If you unsure if a label is valid rather don’t use it.
(7) Discuss the following types of assemblers:
(7.1) Cross assembler
An assembler which can convert instructions into machine code for a computer other than that on which it
is run.
(7.2) Two pass assembler
The assemblers convert source code programs into object code programs by passing through the source
code twice. During the first pass through the source code program the assembler will scan all the labels in
the label field and compile a label table with the address at which each of the labels appears in the program.
On pass two of the source program, an object code program is formed by referring the label table and
instruction table (mnemonics and machine language codes).These two tables are used to convert the
source code to object code.
(7.3) Meta assembler.
This type of assembler can handle many different instruction sets and can therefore assemble a variety of
different microprocessors. The programmer must therefore specify which particular microprocessor instruction
set is to be used for the assembly.
Les avantages d'acheter des résumés chez Stuvia:
Qualité garantie par les avis des clients
Les clients de Stuvia ont évalués plus de 700 000 résumés. C'est comme ça que vous savez que vous achetez les meilleurs documents.
L’achat facile et rapide
Vous pouvez payer rapidement avec iDeal, carte de crédit ou Stuvia-crédit pour les résumés. Il n'y a pas d'adhésion nécessaire.
Focus sur l’essentiel
Vos camarades écrivent eux-mêmes les notes d’étude, c’est pourquoi les documents sont toujours fiables et à jour. Cela garantit que vous arrivez rapidement au coeur du matériel.
Foire aux questions
Qu'est-ce que j'obtiens en achetant ce document ?
Vous obtenez un PDF, disponible immédiatement après votre achat. Le document acheté est accessible à tout moment, n'importe où et indéfiniment via votre profil.
Garantie de remboursement : comment ça marche ?
Notre garantie de satisfaction garantit que vous trouverez toujours un document d'étude qui vous convient. Vous remplissez un formulaire et notre équipe du service client s'occupe du reste.
Auprès de qui est-ce que j'achète ce résumé ?
Stuvia est une place de marché. Alors, vous n'achetez donc pas ce document chez nous, mais auprès du vendeur slex04. Stuvia facilite les paiements au vendeur.
Est-ce que j'aurai un abonnement?
Non, vous n'achetez ce résumé que pour €8,17. Vous n'êtes lié à rien après votre achat.