Upload
ahmetozdemiresogu
View
429
Download
3
Embed Size (px)
DESCRIPTION
Microcomputers questions part 2
Citation preview
[email protected] 2014
Reference : Microprocessors and Peripherals Hardware, Software, Interfacing and Applications Second Edition Barry B. Brey
INTRODUCTION to
MICROCOMPUTERS in ESOGU
Questions about
8085 Microprocessor with Solutions
Solved by Ahmet ÖZDEMİR
Chapter-3/Q-5
What is the clock cycle time whwnever a 4-MHz crystal is attached to the 8085A?
The clock frequency of an 8085A is one half the crystal frequency. The period of one T –cycle
is the inverse of the clock frequency. At a crystal frequency of 4-MHz, the clock is 2-MHz and clock
cycle time equal to 500ns.
Chapter-3/Q-8
How many bytes of memory can the 8085A address directly?
The 8085A MPU with 16 address lines capable of addressing 65536 (generally knowns
as 64K) memory locations.
Chapter-3/Q-12
What is the purpose of the signal?
The control signal Read ( ) enables the output buffer , and data from the selected register
are made available on the output lines. This is an active low input control signal used to read data
from the memory location whose address is available on address lines whenever chip select signal is
enable. This signal is available on system control bus and generated by the microprocessor or the
other master in the system such as DMA controller or co-processor.
[email protected] 2014
Reference : Microprocessors and Peripherals Hardware, Software, Interfacing and Applications Second Edition Barry B. Brey
Chapter-3/Q-13
What is the purpose of the signal?
The control signal Read ( ) enables the input buffer , and data on the input lines are
written into memory cells. This is an active low input control signal used to write data to the memory
location whose address is available on address lines if chip select is enable . This signal is available on
system control bus and generated by the microprocessor or the other master in the system such as
DMA controller or co-processor.
Chapter-5/Q-16
Develop a memory system using two 2716 EPROMs and three 2732 EPROMs located in memory
location 0000H through and including memory 3FFFH.
D
E
C
O
D
E
R
G
2716
0000H
to
07FFH
CE
2716
0000H
to
0FFFH
CE
2732
3000H
to
3FFFH
CE OE
2732
2000H
to
2FFFH
CE OE
2732
1000H
to
1FFFH
CE OE
M
E
M
O
R
Y
8
0
8
5
A
16 K
2 K
4 K
2 K
4 K
4 K
0000H
- The 2716 EPROM is 2K and similarly 2732 EPROM is 4K. We known
what the 8085A has 64K memory locations. I shown 16K memory in
8085A.
2x2716 4K 3x2732 12K
-Means that 16 K memory locations are enought to illustrate memory
locations 0000H through and including memory 3FFFH.
[email protected] 2014
Reference : Microprocessors and Peripherals Hardware, Software, Interfacing and Applications Second Edition Barry B. Brey
Chapter-3/Q-10
What is the purpose of the ALE signal?
ALE is the address latch enable signal. This is a positive going pulse generated every time the
8085 begins an operation(machine cycle); it indicates that the bits on are the address
bits. This signal is primarily used to latch the low order address bus, its generate a separate set of
eight address lines . Means that these lines contain address bits whenever ALE is
a logic 1, and data bus connections when ALE is a logic 0.
Chapter-3/Q-19
What memory access time does the 8085A allow if operated at its maximum clock frequency?
In the 8085A the amount of time allowed for the memory or the I/O to access data is
time, which amounts to 575 ns at the highest allowable clocking rate 3 MHz.
[email protected] 2014
Reference : Microprocessors and Peripherals Hardware, Software, Interfacing and Applications Second Edition Barry B. Brey
Chapter-5/Q-18
Develop a memory system that uses one 2716 EPROM and one 4016 RAM. Locate them anywhere
you wish. (HINT: Use incompletely specified decoding.)
2716 EPROM and 4016 RAM are 2K. We can find this dividing the last two term by two. Means that they are required totaly 4K memory locations. Therefore 8085A have 64K memory space, we must divide by 32 field. And we can take into consideration minimum field 2K in this separation.
So we can use 5 digit address bits to declare our devices’ selection bits.
Designing a decoder
We can use 74138 for decoding
60K
RAM
(2K)
ROM
(2K)
ROM
RAM
0
1
2
3
4
5
6
7
ROM
RAM
C
B
A
7
4
1
3
8
Means that
inverter
[email protected] 2014
Reference : Microprocessors and Peripherals Hardware, Software, Interfacing and Applications Second Edition Barry B. Brey
Chapter-5/Q-30
From the flowchart of figure 5-29 develop a program that will test a 1K-byte RAM residing at
locations 1000H through 13FFH.
We can find any error with this code about working RAM at starting microprocessors. If RAM
correctly works then there is no indicate failure. But there is any indicate failure at any time, means
that we have some problem about working RAM.
SOLUTION
Start:
Clear:
Set:
Indicate Failure:
LXI LXI XRA MVI ORA JNZ INX DCX JNZ LXI LXI MVI MVI CMP JNZ INX DCX JNZ JMP
H,1000H B,03FFH A M,00H M Indicate Error H B Clear H,1000H B,03FFH M,FFH A,FFH M Indicate Failure H B Set Start
START
Clear all locations
All clear? No
Yes
Set all locations
All set? No
Yes
RETURN
Indicate failure
[email protected] 2014
Reference : Microprocessors and Peripherals Hardware, Software, Interfacing and Applications Second Edition Barry B. Brey
Chapter-6/Q-10
Develop a decoder that will generate a logic one for page EDH.
This decoder generate a logic one when the address lines have the number EDH. We can
illustrate the hexadecimal number ED to 1110 1101. The other bits are not important, means that
they are don’t care.
My decoder is:
or
ED strobe
[email protected] 2014
Reference : Microprocessors and Peripherals Hardware, Software, Interfacing and Applications Second Edition Barry B. Brey
Chapter-6/Q-12
Design a circuit that will develop eight I/O strobes at memory-mapped I/O locations 10XXH. Make
certain to label the address ranges of your output strobes.
In this memory range there are 256 bytes. If we have eight I/O strobes , this range will be
divided into eight field. Therefore every field has 32 bytes memory space. Address bits are
illustrate this range are and are illustrate in this range when after division. The other
address bits are seletion pins our devices.
My decoder is :
10FFH
1000H
0001.0000.1111.1111
0001.0000.0000.0000
0
1
2
3
4
5
6
7
C
B
A
7
4
1
3
8
Means that
inverter
without
[email protected] 2014
Reference : Microprocessors and Peripherals Hardware, Software, Interfacing and Applications Second Edition Barry B. Brey
Chapter-6/Q-19
Develop initialization dialog for the 8155 in problem 15 if ports A and C were to function as inputs,
port B as an output, and the timer were to produce a series of pulses at 1/374 of the input rate.
Reference Question 15: Interface an 8155 to function at isolated I/O space CXH.
Firstly we will draw the interface to understand solution. Isolated I/O space CXH tells us what
the memory range is starting from C000H to C0FFH of the 256x8 static RAM in the 8155. And the
interface of this function can drawn as ;
A
B
C
RAM
TIMER
8155
8085A
Firstly initialized my timer with count 374;
1 0 0 0 1 0 1 0 0 1 1 0 0 1 1 0
MSB LSB
Cont. Square Wave Our input rate 374
41H 76H
[email protected] 2014
Reference : Microprocessors and Peripherals Hardware, Software, Interfacing and Applications Second Edition Barry B. Brey
Chapter-6/Q-25
Connect seven solenoids to an output port of the 8155 and develop the hardware and software to
control these seven 10-ms solenoids. Your subroutine should fire the solenoids in the pattern passed
to it in the accumulator register.
Firstly we have interface an 8155 to function at isolated I/O space CXH. Because of this
reason we can also use this one in new question. But this time, seven solenoids will be connected
my output port B.
START: MVI A,76H ;Load LSB of timer
OUT C4H
MVI A,41H ;Load MSB og timer and its mode(as continuous square wave)
OUT C5H
MVI A,C2H ;Timer is started, Ports A and C choose inputs, Port B is output
OUT C0H
CMD EQU C0
PA EQU C1
PB EQU C2
PC EQU C3
LSB EQU C4
MSB EQU C5
A
B
C
RAM
TIMER
8155
8085A
Not connected
anywhere
connected
solenoids
CMD EQU C0
PA EQU C1
PB EQU C2
PC EQU C3
LSB EQU C4
MSB EQU C5
INIT : MVI A,02H
OUT C0H
XRA A
OUT C2H
FIRE: OUT C2H
MVI A,10H
FIRE2: CALL DELL1
DCR A
JNZ FIRE1
XRA A
;Port B selected output port
;Accumulator will reset why turn off solenoids
;Send to pattern to solenoids
;Waste 10 milisecond
;Turn off solenoids
[email protected] 2014
Reference : Microprocessors and Peripherals Hardware, Software, Interfacing and Applications Second Edition Barry B. Brey
If there are any error
or
you have some questions
you can contact me.
dept. of computer engineering
in esogu