Professional Documents
Culture Documents
CONFIDENTIAL
COURSE
COURSE CODE
KJE609/ECE590
EXAMINATION
APRIL 2008
TIME
3 HOURS
INSTRUCTIONS TO CANDIDATES
1.
2.
Answer all FIVE questions only in the Answer Booklet. Start each answer on a new page.
3.
Do not bring any material into the examination room unless permission is given by the
invigilator.
4.
Please check to make sure that this examination pack consists of:
i)
ii)
iii)
CONFIDENTIAL
EE/APR 2008/KJE609/ECE590
CONFIDENTIAL
QUESTION 1
a)
b)
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)
c)
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.
VA
VB
VCQ
Vout
FULL WAVE
RECTIFIER
240Vac
FILTER
REGULATOR
200:10
Figure Q1(c)
(10 marks)
CONFIDENTIAL
EE/APR 2008/KJE609/ECE590
CONFIDENTIAL
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)
The Emitter current IE, Base current IB, and Collector current l c .
iv)
The Collector voltage Vc and draw the DC load line for the transistor.
(8 marks)
CONFIDENTIAL
EE/APR 2008/KJE609/ECE590
CONFIDENTIAL
b)
ii)
iii)
Ri=220kQ
Rc=2.2kQ
(3=60
Vcc=12V
ro=4OkQ
VOUT
Figure Q2(b)
(12 marks)
CONFIDENTIAL
EE/APR 2008/KJE609/ECE590
CONFIDENTIAL
QUESTION 3
a)
Derive the output voltage Vo, in terms of input voltages and the resistors,
ii)
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
EE/APR 2008/KJE609/ECE590
CONFIDENTIAL
QUESTION 4
a)
Convert the following numbers into the number system stated. Show all the
calculations involved.
i)
ii)
iii)
iv)
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>
D-
Figure Q4(b)
(8 marks)
CONFIDENTIAL
EE/APR 2008/KJE609/ECE590
CONFIDENTIAL
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
Figure Q4(c)
(8 marks)
CONFIDENTIAL
EE/APR 2008/KJE609/ECE590
CONFIDENTIAL
QUESTION 5
a)
b)
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
ADDRESS REGISTERS
D0=$78904536
A0=$00005000
D1=$FFCB5A8B
A1=$00005001
D2=$FFFFFC18
A2=$00003000
D3=$0000186A
A3=$00003001
i)
ii)
iii)
iv)
v)
MOVE.W
MOVE.B
ROL.W
ADD.B
OR.B ,
ADDRESS
DATA
$3000
$32
$3001
$57
$5000
$BC
$5001
$6D
DO, D2
D3,(A1)
#3, D1
(A0), DO
(A2), D2
(5 marks)
CONFIDENTIAL
EE/APR 2008/KJE609/ECE590
CONFIDENTIAL
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.
PAO-PA:
BCD to
7-segment j
Decoder
MC68230
Pl/T
+5V
God
Figure Q5(c)
(10 marks)
CONFIDENTIAL
CONFIDENTIAL
fit m
kk
I wk
ir 51 #n.ds
IL kk
11 i ! By,O?
il
Sfjjtl
IL kk
8 MB
i i ' ff
a IL
Ill)
USB
1 ds
Bee If label
ffiffi 81 kk
kk
S
L
Buds
ECU)
d.PC) l In
Add 18 will tod
* * * ** if sr
ds
is
sr
ds
sr
s?
is ds
sr
k
sr
k
SP
sr ST+BB-JDH
SP
ds
]i+ds->is
El SP SP SP SP sr
sr
*** ** ds ds ds
ds ds k ds ***** ds is ds ds h ds ds k ds Sf sr
-HflO
*****
*****
Si1
sr
SP
ds ds k ds OS k
ds ds k ds ds is
- -
ds
SP
ds
ds
-
sr
Sf
SP
ds
-
SP
- la+ds -> is
Add immediate
fi+ds^js
IddMiclifflftedielliiiplbl
Qy+Ox+X->Dx
Addwiby
sr SP sr&Dn->Dn
fklds^s
- fit Ids-) sis
MCLM1
MM
**^ * H
!S!
I1
ds ds k ds
-
ds
ds ds
ds ds
ds ds
ds ds
ds ds
is
BKJl If lab!
*
is'
OSET n [ids
k
ids
bb!
B
S
R
ES!
hk __* is1 ds ds
Is1 ds ds
hk
ci f SP,I -muu Sf SP Sf
cm i i ds -0100 k ds ds
C
M
P 81 sr,Bn
SP sr s?
3
_****
Cl i srJto
SP sr Sf Sf
1
ds ds ds
HI iL Itijs
IL ( ? } *
ea
-
ice I Itilafeel
w
n
ds
ds
ii
#rufs
.opIMIO
^AtlOl is usei when sotires is #n)
.opalJlihffltt
,oa3cai AHO Immediate to CCR
aliiiraeiatets^!Prislgei})
Arithmetic shift Dy 0^ bits bft/>ight
Sf
Add binary
Sf
*****
-**oo
Oeicriptioii
Operation
*U*o* -
Juds
m-l
EE/APR 2008/KJE609/ECE590
APPENDIX 1(1)
ds
ds
ds ds
i ds
is ds
ds
ds
ds
ds
is
ds
ds
ds
l a i ittnlfeltefeHe K? pgt
(d:8/i-lihigidifeiip)
rf ec true then
PC*d->PC
- -
@->ifflikpsfds
clearfclit ii ds
R4lK
WIViukkHl
i^ttaifds
PI->-(SPkPC*d-PC
NflT(bllDriQfds)->Z
lllliefdsl^I
i ds ds
k ds k i ds ds
sr SP sr sr sr
k ds ds k ds -
ds
ds
sr sr firfofikriffllP
- - i-^ds
SP sr
SP
if
SP Sf
Cwtpare Qn to source
SP SP
SP
it
SP
sr
ds -
SF SF setCffislk-f
EnfafeAitosirce
ds
k ds ds i
- ' - *
- set CCRvfiihds-#n
sitCffiilW-i)
SfearteMontozEfD
Irapredesttiitiifc
loipare{k)toif];lMreraffllkSli
fccfa!seten{Dn-I->On IestMiiiii,di;raeit^lra!cfi
ifOs<>-itbPW-)PE} (dJ-isigiditeprS
m
m
1 srln
I srjn
_***Q
sr
SP
sr
sr
SP
sr
Sf
s? i/iisf^iBn ii:[i-ijitfeffliilep,IS-eipietitj
sr SF SP sr
SP
sr SP sr
Sf
sr lll/lilsr^ia
SP
SP
CONFIDENTIAL
Continued
i l Bui -**OO
IL ftijs
ill' 3 #nXCR
it
EI
W#n.SR
-**OO
*****
*****
My
EH ii On
ds
ds
wk
kk
ia
H
IK
it
Kifiy
spjCCR
1 srSR
1 SRjds
- ISPAi
m
or
m
dMDii
#ti,Dn
sp.0n
sr.On
8 ds
'! ds
I I ds
il
8
W
i
Duds
ln,ds
#n,Cffl
Lopical effibsive 01 Dn to ds
[opal e i b i e i f i tods
[opal sriusive Oils to CEI
register <-->feptif
SsJ4flftl|[kf4fcl SliiextdfcbgeJtoliffio.Li
-
ds -
ds ds ds k ds ds
SP
sr
sr if
Sf
ds ds ds k ds ds
ds Sf
Sf
ds4PC
FC-MSWs-^C
imptoadfes specified M s
sr -> An
SP**t4SP
ds ds k ds is
i k
-**00
*****
ea sr ia ea m ea ea Si ea sr
sr Sf sr sr sr IP sr sr sr
***** Sf - sr Sf sr SP sr ir sr Sf
ds ds ds ds ds k k ds
SP
Sf SP ->ds
sr sr
sr sf4SR
SR->ds
IP -> in
Jta-1BP
sr
SI'
sr
sr
OS
sr
Is
sr sr
~
Sf
SP
ds
is
sr
SP
sr
ds
sr
-
sr
ds
sr
-
SI*
Sf
sr
-
sr
-
sr
SP sr
ds ds
ds ds
ds ds
- -
SP
sr
SP
SP
-**OO
sr
- * * O O sr
u*u ds
***** ds
***** ds
- * * O O ds
- * * O O sr
-**0O
-**OO
*****
*****
ds
RESET
ROL
BIL Mi
#n,Oy
ds
ii BIL OiDy
ii
#n,D?
ds
Balds^i
fe!ds->ds
fell ffl^CCR
ysp
US
Hill w
ICO
KEE
HI
IP
KDT i l ds
01 BVL srln
1
IIP in ft!*)
01!
***g*
WL pr '
t Rn-ftn.ds
sr,l?n-fe
mm
ea 63
fnlv
ds
IL ea,ea
i?E 1
m
m
m
ds ds k ds ds & k
ds ds
ds ds k k
- -
Ji
JSS
LSL
ds
ds
-
-'00
ILLEGAL
EE/APR 2008/KJE609/ECE590
APPENDIX 1(2)
ds
-
sr
sr
ds
ds
ds
ds
SP
sr
ds
ds
ds
ds
SP sr
ds ds
ds ds
- - ds -
sr
sr sr
is ds
is ds
is ds
- is ds
SP sr
ds
ds ds
- - ds
SP
SP
SP
ds
ds
ds
sr
ds
4 ds
SP
SP
is
ds
ds
sr
ds
ds
as ds
sr
s? - > An
#nORSR->5R
ds-MS?)
Assert RESETUw
ds ds ds ds
ds
sr
sr
ds
ds
t-M
is ds
***Q*
C*w
ds ds Js ds
is
k ds
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
-**g*
Loi'rahhMfJxfeisif/figlit
Logical shift Ov. #n biis L/R (#n: 1 to 8)
LogieaJ shift ds i bittoft/rightLW onlv)
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
*****
m
m
SBCO 8 Bv.fc
mm
Sec B k
t[U{}T
il
l sr,in
SI
sr sr
ds ds
is
sr sr sr
ds ds k
ds k ds k ds
SLCI- l i kk
SliBO- fill #n.ds
I I Dyjh
* r * * *
**--* +
ds is k
^f
T * * *
On.ds
k k 3s k
sr.Ori
In
SI
1 On
B ds
lip
Test
false
HP
[?
hiaji
IC&IZ PI plus
b or sarse c*? Ml minus
not aqual
eod
IZ
I
Ifcctefendsl-iiiniii
fillip
ds- fluids
it
sr
k k k ds ds
-
k k -
cc Condition
VC overflow ebr
ovsffbw set
"Isipd)
lest
!f
I
i
II
it gfesterorapl N&V+1N&IV
II bsian
M&ilf+!lfi
Subtract taidiste
- ds-lii4ds
&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
tsslds->CCR
in4i;(SPHin
fendralwispEebiistei
else tB ^oooooooo
Sutetated'sp-entendfei)
in sr 4 k
ds - #55 -> ds
IfitelPi]
CDtidition
true
k
ds k
sr
sr SP srds ds is ds
ds ds k k -
sr
k k k ds ds k k
-
cc
I
F
sr sr On - sr -> On
1
E3
Returnfromescepfioii (Privilsgsd)
Return from subroutiftg arid rasters CCS
Return (pom subrautifie
sr
sr
k
SPMitfHFE
(5PK-)-> PC
Ox-Dj-BDi
IP!
1ST 11 k
IK
-00
_
In
(iHW
11
EE/APR 2008/KJE609/ECE590
APPENDIX 1(3)
2
3
CONFIDENTIAL