Beruflich Dokumente
Kultur Dokumente
EE/APR 2008/KJE609/ECE590
: : : :
INSTRUCTIONS TO CANDIDATES 1. 2. 3. 4. This question paper consists of five (5) questions. Answer all FIVE questions only in the Answer Booklet. Start each answer on a new page. Do not bring any material into the examination room unless permission is given by the invigilator. Please check to make sure that this examination pack consists of: i) ii) iii) the Question Paper a three - page Appendix - MC68000 CPU instruction an Answer Booklet - provided by the Faculty
CONFIDENTIAL
CONFIDENTIAL
EE/APR 2008/KJE609/ECE590
QUESTION 1 a) State the differences between an extrinsic and intrinsic semiconductor materials. (5 marks) Illustrate the connection of a PN junction diode with the power supply during forward bias and reverse bias; and explain what happen to the depletion region in both cases. (5 marks) The circuit in Figure Q1(c) below shows the block diagram of a DC power supply system. i) ii) Draw and label the voltages marked VA, VB, VC and VoutIf voltage VC is produced using an RC filter, calculate it's percentage ripple. The values of the capacitor and resistor used in the filter are 50 uF and 2.5 KQ respectively. The AC supply voltage has a frequency of 60 Hz. Assume that the diodes were ideal diodes.
b)
c)
VA
VB
VCQ
Vout
240Vac
FILTER
REGULATOR
200:10
Figure Q1(c) (10 marks)
CONFIDENTIAL
CONFIDENTIAL
EE/APR 2008/KJE609/ECE590
QUESTION 2 a) Figure Q2(a) shows a single-stage common emitter amplifier using a BJT transistor having the DC gain (3 of 150. Given that Vcc = 20 V, Ri = 40 kQ, R2 = 15 kQ, Re = 1 kQ, RE = 1.2 kO.
Vcc
R1
R2
Figure Q2(a) For the transistor, take VBE = 0.7V, determine :i) ii) iii) iv) The Base voltage VB. The Emitter voltage VE. The Emitter current IE, Base current IB, and Collector current l c . The Collector voltage Vc and draw the DC load line for the transistor. (8 marks)
CONFIDENTIAL
CONFIDENTIAL
EE/APR 2008/KJE609/ECE590
b)
For the circuit shown in Figure Q2(b) below, calculate :i) ii) iii) The transresistance value, re. The input impedance ZiN , and output impedance ZOUTThe voltage gain, Av.
CONFIDENTIAL
CONFIDENTIAL
EE/APR 2008/KJE609/ECE590
QUESTION 3 a) For the operational amplifier circuit in Figure Q3(a) below :i) ii) Derive the output voltage Vo, in terms of input voltages and the resistors, Calculate the output voltage Vo, given that :V1 = 1V, V2 = 2V, V3 = 3V and V4 = 1V. The resistor values are Ri = 500 kQ, and R2 = R3 = R4 = Rf = 1 MQ. iii) If the output voltage Vo is equal to - 4V and the current that flows through resistor Ri, R2, R3 and R4 has equal value, find the current flowing in Ri and the voltage V3. The value of resistor R3 is 2 kQ and Rf is 1 kQ. (14 marks)
R1
AAA/ R2 A/V\
R4
Figure Q3(a)
b)
Using an 8 to 1 multiplexer and other logic gates, implement the Boolean function below :-
CONFIDENTIAL
CONFIDENTIAL
EE/APR 2008/KJE609/ECE590
QUESTION 4 a)
Convert the following numbers into the number system stated. Show all the calculations involved. i) ii) iii) iv) 01110001102 convert into octal number 2548 convert into decimal number 12910 convert into hexadecimal number AE16 convert into binary number (4 marks)
b)
i) ii)
Deduce the Boolean expressions for output X and Y in terms of the input variables A, B, C and D for the circuit of Figure Q4(b). Obtain the simplified expression for Y using the K-map method.
f>
Figure Q4(b) (8 marks)
D-
CONFIDENTIAL
CONFIDENTIAL
EE/APR 2008/KJE609/ECE590
c)
Analyze the asynchronous counter circuit of Figure Q4(c) below. All JK and SET inputs are connected to logic "1". Hence :i) ii) determine the counting sequence and the MOD number of the counter. sketch the waveforms of QA , QB and Q c up to 5 clock pulses.
CLK
CONFIDENTIAL
CONFIDENTIAL
EE/APR 2008/KJE609/ECE590
QUESTION 5 a) Explain the function of the components of a microcomputer system stated below. i) ii) iii) b) random access memory (RAM) arithmetic logic unit (ALU) general purpose registers (5 marks) Determine the contents of the registers and memory locations that are affected by the following MC68000 CPU instructions. The initial values inside the registers and memory locations are as shown in Table 1 and Table 2 below. Assume that before each instruction is executed, the registers and memory locations are restored to their original values. Every instruction is not related to each other. Table 1: Initial register contents DATA REGISTERS D0=$78904536 D1=$FFCB5A8B D2=$FFFFFC18 D3=$0000186A ADDRESS REGISTERS A0=$00005000 A1=$00005001 A2=$00003000 A3=$00003001
Table 2: Initial memory contents ADDRESS $3000 $3001 $5000 $5001 DATA $32 $57 $BC $6D
CONFIDENTIAL
EE/APR 2008/KJE609/ECE590
c)
Figure Q5(c) shows the MC68230 Pl/T connection to a 7-segment display unit. Draw the flowchart and write a MC68000 CPU assembly language program that will display the number 3, only when both switches SW1 and SW2 is pressed. All other states of SW1 and SW2 causes the display to show number 0. Assume Port A and Port B are already initialized as output and input port respectively.
+5V
God
CONFIDENTIAL
CONFIDENTIAL
APPENDIX 1(1)
EE/APR 2008/KJE609/ECE590
EASy68K 68000 Quick Reference v1.5 hltp/i Effective Address Ipcode Ik Operand m ynntrn k MW * ! m aW k i l if/is
HDIPJJ
d.PC) l In
*U*o* -
* * * ** if s r ds
S sr f
is
sr ds
sr
s?
is ds
sr k
sr k
SP
S P S f -
s ST+BB-JDH r ]i+ds->is
S f - la+ds -> is
Add binary
ds
El S S S S s P P P P r s r *** ** d d d k d s s s s s s d d ***** d is d d h d d k d s s s s s s
fi+ds^js Qy+Ox+X->Dx
***** -**oo
-HflO ***** *****
**^ * H
il
Sfjjtl
SP
Si1
sr
Sf
SP
sr
SP
S P
s S sr&Dn->Dn r P
Juds
m-l
ds d s -
d ds k ds OS k s d d k d d is s s s s -
ds
fklds^s
d s -
MCLM1 MM
d d k d s s s
d s ds ds i ds is ds
ds
!S!
ii
I1 is
1
BKJl If lab! * is' OSET n [ids k ids bb! B S R E! S hk __* is1 ds ds Is1 ds ds hk P ci f SP,I -muu Sf S Sf -0100 k d d s s cm i i ds CP 81 sr,Bn M S s s P r ? 3 _**** S s Sf Sf Cl i srJto P r 1 d d d s s s HI iL Itijs IL ( ? } * e a - ice I Itilafeel
w n
ds ds ds ds ds ds ds ds ds ds ds
ds
k k k k k k k
ds ds ds ds
k k k k k k k
- is
ds ds ds
ds ds
i ds ds k ds k i ds ds s S sr s sr r P r s s s k d d k d S s P r S S P P S P S P if it S Sf P
ds ds
s s k d d i - ' - *
S P
s r d s
S P
sitCffiilW-i)
fccfa!seten{Dn-I->On IestMiiiii,di;raeit^lra!cfi
ifOs<>-itbPW-)PE} (dJ-isigiditeprS
m m
1 srln I srjn
_***Q
s r
S P
s r
s r
S P S P
S P
s r
S f S f
s S S s r F P r
s S s r P r
APPENDIX 1(2)
EE/APR 2008/KJE609/ECE590
m
it
W#n.SR
My
d s d s e 63 a -
d d k d d & k s s s s d d s s d d k k s s -
Lopical effibsive 01 Dn to ds [opal e i b i e i f i t d os [opal sriusive Oils to CEI looica! eschisive QS #B to SR (Ppiviteged) Exchange registers (S2-bii onW EessFalt i b a i instruction exesption
- d s
d s Sf
-
E ii O H n
ILLEGAL
SsJ4flftl|[kf4fcl SliiextdfcbgeJtoliffio.Li
-
Ji JS S
ia
H IK
LSL
d s d s wk kk
d d d k d d s s s s s
***g*
d d d k d d s s s s s
S P
ds4PC FC-MSWs-^C
sr -> An SP**t4SP
imptoadfes specified M s pesh PC, jumptosubrouiias at asdress ds LosJ sifeotivB address of sr to An Create bsai warfepce m stack (ii must lie neptive to fate!)
V
s r
sr if
Sf
Sf
it
Kifiy fnlv
ds IL ea,ea
spjCCR
d d k d is s s s
-**00 *****
i k
S P Sf SP ->ds
Loi'rahhMfJxfeisif/figlit Logical shift Ov. #n biis L/R (#n: 1 to 8) LogieaJ shift ds i bittoft/rightLW onlv)
Iifisfa!afrain3oiirc?tod?stiaiii l a s ssuree lo D^ndmon Cede fegistsr h a siurce b Status liegister IFAifeisIl Move Stilus Register to destiiatbn l e w Her M t Pointer to k (Psiiege! fa k te User Staei: Poisr (PrMlepl
i?E 1
m m m
e sr ia e m e e Si e sr a a a a a Sf sr sr s IP sr sr sr s r r ***** Sf - sr Sf s S sr ir sr S r P f d d d d d k k d s s s s s s
sr
OS
sr Is
Sf ds sr
S P
ysp
W pr ' L t Rn-ftn.ds sr,l?n-fe
SI' ;
Jta-1BP
sr is
SP
sr sr ~
sr ds sr -
sr ds sr -
SI*
Sf
sr
sr -
sr -
mm
sr sr d s d s d s d s
S P
sr d s d s d s
m or m m
il 8 W
i
d s -
d s SP sr ds ds d d s s - - d s
s r sr sr is d s is d s is d s - is d s S P sr ds d d s s - - d s
S P
S P S P
d s d s d s d s
SP
sr S P sr d d s s d d s s d d s s - -
sr
S P S P -
sr
S P -
4 d s
sr ds d s a d s s
SP
sr d s
sr d s
is d s d s
Hare source to k ( I f srinuse WEI.) tea specified rssisters fa/from itierttary fagiste -> ds sr -> legistsrs Llf source is sigB-estemlei to iferHnS - h->dtibUt2(Aii!LiM(* ims Onta/fremalternate mmey bytes d^0tl;MfliiMi (Access only sviti or odd address^) isve sign u M k i 8-hil l lo fc #B->Dn sr !litsr*lftOi^& i l p l ? sipd IB-bit; m i l sped 32-bit Wiplf suisi i li-iil-result:uasig'd 22-sii S ieiiisr*ii Unfits P - D-ds-l(->ds feptsBCOwittEnrf - 0-ds-ds fejate is - 0-ds-K-^ds tefatgJswftliErfssI - he looperatioBiicffii's lopcal i f (aes compfement of ds) IW-Hs srlfti^ia OnORds^-ds 1DRI is usedtthensource is fit) Logicai Dl #n to ds litiik-Hs kpaillntoCK
s? - > An -
-**g*
-
d d d d s s s s d s is d s -
***Q*
C*w
d d J d s s s s
is
k d s
kpalilnfolfFpiAgsi) Push effesfe address sf ds onto slack issee a hantoare RESET (Prfflfega!) SDtate Oy, Qx bits Jeft/rJght {wittout X) *J hhbDr.ftlifeleft/i$(hlto8} fctatedsWfeft/iiiWilKl) iotate 0v, DX bits L/R (Xussd tten mJ updated)fotatsfeIn tefeft/rigltf#n:i to 8) folatedsl-lHi/iiWff* CONFIDENTIAL
CONFIDENTIAL Continued I
APPENDIX 1(3)
EE/APR 2008/KJE609/ECE590
m m
*****
t[U{}T
SBCO 8 Bv.fc mm Sc B k e SI In
(5PK-)-> PC
SPMitfHFE
0xr - OVID - X -> Dx!D
Returnfromescepfioii (Privilsgsd) Return from subroutiftg arid rasters CCS Return (pom subrautifie
k k 3 k s
d is k s
SI
1
sr k
fillip
ds- fluids
il
sr.Ori
On.ds l sr,in
T * * * X
* r * * *
**--* + *
is sr sr sr d d k s s dk d k d s s s
^f
i
sr sr ds ds
sr
it
s r
sr s On - sr -> On r sr
-
k ds k s r s S sr P r d d is d s s s d d k k s s
in sr 4 k ds - #55 -> ds
Sutetated'sp-entendfei)
Subtract taidiste Subtract pfcfe fmriiite ( l i mm. Ito1 Subtract wfth Extern!
- ds-lii4ds
Ox-Dj-BDi
11
1
lip
1O n s B d
In
-00 _
k k k d d k k s s -
&HfeH4-(kS - fe[3i]f4isPi U i g e i e IE-it tote a fe - !isHs4H;l4Bofi N SRHI Z settoref leel ds,fciffef ds settof
IP! 1T 11 k S IK
IfitelPi] k k k d d s s
k k
tsslds->CCR
in4i;(SPHin
"Isipd)
c c I F H P [?
Test
I
lest
!f I
i II
SSP S i p w Stack Pomlsr (32-bit) USP User Steek Pointer [32-bitl SF Active Slack Pointer {sams as .47)
1 E 3
not aqual
eod
I Z I
Program Counter* (2Wit) label QesWon of Brand (teeibir dilates Source ds iednitbn Isplacsmentrab} Immediate data d fefeirf S8 Status Rsgister- (15-bit) Effeiisffi lidress [mm c cestkiron) CCR M i t e Cede lepter Site? te of I ) Coded flecimal N oesatire, Z zero, oieifa, 11 cany, I extend *seSadigteralofop!f3l - not affected. Qcleared. Iset lluodsfeed lib sies: 1 1 .S10to+121 bytes, .H or 1 - a Mfa+ 1 1 bytes
2 3
CONFIDENTIAL