Microcomputers questions

10
[email protected] 2 0 1 4 Re f e re n c e :M icrop ro c e s s o r s a n d P e rip h e ra ls H ar d w ar e , So f tware, In ter f acin ga n d Ap p lic at ion s S e c o n d E d itio n Barry B. Bre y INT R ODUCT ION to MICRO COMP UTERS in ESO G U Questi on s about 8085Micr o pro ces s or withS oluti on s So lve d b y ŚŵĞƚ PD7Z Cha p t e r - 3 / Q - 5 Whatis thec l o c k c y cle tim e whwn ev er a 4 - M H z cry s t alisatt a ched t o the 8 0 8 5 A ? The cl o ck frequ enc y o fan 8 0 8 5 Ais o n e h alf t h e cry s tal frequ ency . The p erio d o f o n e T ʹcycl e isthe in v ers e o f t h e c lo ck f requ ency .At a cr y stal freq u ency o f 4 - M H z ,t h e cl o ck i s2 - M H z and c lo ck cy cle t i m e equ alt o 5 0 0 n s. Ͷ ݖܪܯʹ ݖܪܯʹͳ ݖܪܯʹͲǤͷ ݏߤͷͲͲ ݏCha p t e r - 3 / Q - 8 H o w m an y byt es o f m e m o r y c an the 8 0 8 5 Aad d r ess d i rect ly ? The 8 0 8 5 A M P Uw i th1 6 ad d ress li n es cap ab le o fadd r essing 6 5 5 3 6 (gen e ral ly kno wns as6 4 K) m em o r y lo cati o n s. Cha p t e r - 3 / Q - 1 2 Whatis th e p u rp o s e o ft h e ܦsig n al? The c o n tr o lsig n alR ead( ܦ) e n ab lest h e o u tpu t b u ffer , a n d datafro m thes elec t edr egi ste r are m ad e a v ail ab le o n t h e o u tpu t li n es. Thisisan act i v e l o w inp u t c o n tro l sign al u sedt o re ad da ta fro m t h e m em o r y l o cati o n who s e add ress is a v ail ab le o n add ress lin es whene v er chi p se lec t sig n alis enab le.Thissig n alis av ail a b leo n s y st em c o n tro l bu sa n d generatedb y t h e m i cro p ro ces s o r o r the o ther m as te rin t h e s y st e m such as D M A c o n tro ll er o r co - p ro ces s o r.

description

Microcomputers questions part 2

Transcript of Microcomputers questions

Page 1: Microcomputers questions

[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.

Page 2: Microcomputers questions

[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.

Page 3: Microcomputers questions

[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.

Page 4: Microcomputers questions

[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

Page 5: Microcomputers questions

[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

Page 6: Microcomputers questions

[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

Page 7: Microcomputers questions

[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

Page 8: Microcomputers questions

[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

Page 9: Microcomputers questions

[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

Page 10: Microcomputers questions

[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

[email protected]