Friday, April 20, 2012

Class today start at 3:30pm
Emran Mohd Tamil

Tuesday, February 28, 2012

WRES2107 29 Feb 2012 (Wednesday)

Class is as usual, thank you,

Emran Mohd Tamil

Thursday, May 20, 2010

7 segment LED programming with 8086/8088

Question
Given below is a snippet of a program that will display number “3” on a 7-segment LED which is connected at output port 08h.


Program:
MOV AL , 30h
OUT 08h, AL

7-segment detail
 7-segment LED (a-f) is connected to the port pins (1-7) respectively.
 7-segment LED is lid at low state

Assume a second 7 segment LED are connected to outport port 05h. Modify the program to display number “80” (the second LED will display number “8”).

Then assume the output from the port 05h and 08h will be inserted into another microprocessor (also at port 05h and 08h respectively). Write the program needed at the second microprocessor to receive the data. The data should be saved into any other location after retrieval.




Answer
 
30h =  011 0000 <-- gfedcba
 
a = 0
b = 0
c = 0
d = 0
e = 1
f = 1
g = 0

First LED (number 8,port 08h)
to display number 8, all will be active (active at low)

a = 0
b = 0
c = 0
d = 0
e = 0
f = 0
g = 0

000 0000 = 00h

Second LED (number 0,port 05h)
to display number 0, all will be active except g (active at low)

a = 0
b = 0
c = 0
d = 0
e = 0
f = 0
g = 1

100 0000 = 60h

therefore the complete program would be

MOV AL , 00h
OUT 08h, AL //activate first LED to display 8
MOV AL , 60h
OUT 05h, AL ////activate first LED to display 0

-------------------------------------------------

the program at the second microprocessor to receive the input

IN AL,08h // retrieve the data
MOV DL,AL // store the data at another location
IN AL, 05h
MOV DH,AL

Wednesday, May 19, 2010

Shifting & Rotating

Question
Calculate the changes in AL by each of the instruction below. (AH=33h,CF=0 and each instruction is not related to each other)
i.    RCR AL,2
ii.    SHL AL, 2    
iii.    SAR AL,2    

Answer

i.    RCR AL,2
AH=01110111 CF=0
rotate with carry to the right two times
AH = 10011101 CF=1
Answer >> AH = 9D16 CF=1

ii.    SHL AL, 2    
AH=01110111 CF=0
shift to the left two times
AH = 11011100 CF=0
Answer >> AH= DC16 CF=0

iii.    SAR AL,2    
AH=01110111 CF=0
shift arithmetic to the right two times (if the sign bit is one, then number 1 will be shifted into the stream, if not zero will be inserted, in this case the sign bit is 0 so zero will be inserted)
AH= 00011101 CF=0
Answer >> AH= 1D16 CF=0

Bus access request - HOLD,HLDA in minimum mode

Question 


In minimum mode of microprocessor 8088, HOLD and HLDA pin are used to control the bus system access by both CPU and I/O devices. Draw simplified data/wave form for HOLD, HLDA and bus access pin/device.

Answer

Bus access request - RQ/GT' maximum mode

Question

Explain how external chip/IO devices request and control the system bus in maximum mode. Draw the corresponding timing diagram.

Answer

In maximum mode, the RQ'/GT' (request and grant) pin will play the important role. Whenever a device want access to the system bus, the device will lower RQ'/GT' for one cycle to request the access. After receiving the request, 8086/8088 will grant the access to system bus by also lowering the RQ'/GT' pin for one cycle.

Note that even though it is the same pin that being lowered at both occasion, the purpose is different

Request --> RQ' = 0' = 1= requesting access
Grant --> GT' = 0' = 1 = granting access

Read cycle timing diagram in minimum mode

Question

Draw a simplified timing diagram for a read cycle of the 8088 microprocessor (minimum mode). The diagram should include at least the following
i.    Address pin
ii.    Address/Data pin
iii.    WR' pin
iv.    CLK timing
v.    ALE pin
 
 Answer

READY pin function in 8284A Clock Generator chip

Question

Briefly describe the function of READY pin in 8284A clock chip in relation to synchronization with other I/O or memory.

Answer
The ready pin generates the Ready signal for the 8086/8088. Usage example can be seen in the following READ and WRITE cycle where the important process only started after READY pin is set.



8284 Clock Generator using an external source for its frequency

Question
Modify the following  8284A clock generator circuit if it will be using an external frequency from another source.



Answer

EFI - changed from earth to the OSC input from other 8284A (EFI=external frequency input)
F/C' - changed from earth to Vcc (5v) because now the chip is using F(requency) input instead of C(rystal) input
Both X1 & X2 - grounded

Illustrated here

Calculate CLK & PCK frequency of a 8284A clock generator

Question

Given in the following diagram is a simple 8284A clock generator circuit that uses a 15MHz crystal input. Calculate the corresponding CLK and PCLK frequency. 
8284A with 15Mhz crystal diagram


Answer

CLK = 33% crystal/EFI = 0.33 (15Mhz) = 5 Mhz
PCLK = 50% crystal/EFI = 0.5 (15Mhz) = 7.5Mhz

Popular Posts

Latest Post from my Other Blog