Sie sind auf Seite 1von 12

CONFIDENTIAL

EE/APR 2008/KJE609/ECE590

UNIVERSITI TEKNOLOGI MARA FINAL EXAMINATION

COURSE COURSE CODE EXAMINATION TIME

: : : :

ELECTRONICS AND MICROPROCESSORS KJE609/ECE590 APRIL 2008 3 HOURS

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

DO NOT TURN THIS PAGE UNTIL YOU ARE TOLD TO DO SO


This examination paper consists of 9 printed pages
Hak Cipta Universiti Teknologi MARA

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

FULL WAVE RECTIFIER

FILTER

REGULATOR

200:10
Figure Q1(c) (10 marks)

Hak Cipta Universiti Teknologi MARA

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)

Hak Cipta Universiti Teknologi MARA

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.

State and explain any assumption/s made during the analysis.

Ri=220kQ Rc=2.2kQ (3=60 Vcc=12V ro=4OkQ VOUT

Figure Q2(b) (12 marks)

Hak Cipta Universiti Teknologi MARA

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 :-

f(A,B,C,D)= AB +CD + BD + ABD


(6 marks)

Hak Cipta Universiti Teknologi MARA

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-

Hak Cipta Universiti Teknologi MARA

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

Figure Q4(c) (8 marks)

Hak Cipta Universiti Teknologi MARA

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

i) ii) iii) iv) v)

MOVE.W MOVE.B ROL.W ADD.B OR.B ,

DO, D2 D3,(A1) #3, D1 (A0), DO (A2), D2


(5 marks) CONFIDENTIAL

Hak Cipta Universiti Teknologi MARA

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.

PAO-PA: MC68230 Pl/T

BCD to 7-segment j Decoder

+5V

God

Figure Q5(c) (10 marks)

END OF QUESTION PAPER

Hak Cipta Universiti Teknologi MARA

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

Copyright 2004 By: Chuck Keiry


Operation Oeicriptioii Add 18 will tod

d.PC) l In

*U*o* -

fit m kk I wk ir 51 #n.ds IL kk 11 i ! By,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

tABffl or ADIK1 is used vheet source is #n)


Add aidress (.W sign-extendedtoA) Add immediate IddMiclifflftedielliiiplbl Addwiby .opIMIO ^AtlOl is usei when sotires is #n) .opalJlihffltt ,oa3cai AHO Immediate to CCR aliiiraeiatets^!Prislgei}) Arithmetic shift Dy 0^ bits bft/>ight iiititicsiftDfliilisU lit: 1 loll iifhelsidsiiileft/#r(.lii?]

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

IL kk 8 MB i i ' ff a IL Ill) USB s 1d Be If label e ffiffi 81 kk kk S Buds L ECU)


#rufs

ds d s -

d ds k ds OS k s d d k d d is s s s s -

ds

fklds^s

- fit Ids-) sis

d s -

MCLM1 MM

d d k d s s s

d s ds ds i ds is ds
ds

rf ec true then PC*d->PC

l a i ittnlfeltefeHe K? pgt (d:8/i-lihigidifeiip)

!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

l l l f m b f o f i s ! ^ Set 2 witt state of speciffedbit in is then IKLiifiofii^iiBfds invert lie i ids

illimtefdl^I ietZiii state of speeieliii!iistlie!i


@->ifflikpsfds clearfclit ii ds Branch i t e p Id: l/i-iit sigid i i t e l Set Z will state of spaclfWfeltiE is then sgtieiiiE ifatiifosiftreii{sl:S/!6-lsit sip-lit) Set Zwift state of spBciftei bit in is toe fell ids u i b p d Edpre Do w l I] i d oppertafil [sr] SfearteMontozEfD Cwtpare Qn to source EnfafeAitosirce Irapredesttiitiifc loipare{k)toif];lMreraffllkSli
-

- is

ds ds ds

ds ds

R4lK WIViukkHl i^ttaifds PI->-(SPkPC*d-PC


NflT(bllDriQfds)->Z lllliefdsl^I

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 firfofikriffllP r r - - i-^ds s S set CCR with Dn - sf r P


S S setCffislk-f F F - set CCRvfiihds-#n

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 i/iisf^iBn ii:[i-ijitfeffliilep,IS-eipietitj ? s lll/lilsr^ia r Si= [ |-|it renaWer, Mi qiient ] CONFIDENTIAL

s S S s r F P r

s S s r P r

Hak Cipta Universiti Teknologi MARA

CONFIDENTIAL Continued i l Bui -**OO

APPENDIX 1(2)

EE/APR 2008/KJE609/ECE590

m
it

IL ftijs ill' 3 #nXCR


EI
;

-**OO ***** ***** -'00

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 -

Balds^i fe!ds->ds fell ffl^CCR


register <-->feptif

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

1 srSR 1 SRjds - ISPAi

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 ; sr - * * O O sr u*u d s ***** d s ***** d s -**OO d s - * * O O sr


-**0O -**OO ***** ***** -**OO

sr
OS

sr Is
Sf ds sr


S P

sr sr sr sf4SR SR->ds IP -> in


-

ysp
W pr ' L t Rn-ftn.ds sr,l?n-fe
SI' ;

Jta-1BP
sr is
SP

IIP in ft!*) US Hill w ICO KE E HI IP s KT i l d D 01 BL srln V


01!

sr sr ~

sr ds sr -

sr ds sr -

SI*

Sf

sr

sr -

sr -

mm

dMDii #ti,Dn sp.0n sr.On 8 d s '! d s II d s

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

Duds ln,ds #n,Cffl d s

RESET ROL BIL Mi #n,Oy ds ii BIL OiDy ii #n,D? ds

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 -

#nORSR->5R ds-MS?) Assert RESETUw t-M

-**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

Hak Cipta Universiti Teknologi MARA

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

Subtract BCD wife Extern!


Ifcctefendsl-iiiniii else tB ^oooooooo fa In to SI. stop psesss" (Nfcd) SuitractSiifflPi (ilorilisiedwbiiQUiwisfiij

k k 3 k s

d is k s

ff cc is true then I's ^ is ibfi's-Hs

SI
1

sr k

fillip
ds- fluids

il

sr.Ori

On.ds l sr,in
T * * * X

SLCI- l i kk SliBO- fill #n.ds I I Dyjh


(iHW

* 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

Pusi P and i . K set tf w!ei" iabls In factortiifee i N - ^ (inrapBio IS)

IP! 1T 11 k S IK

IfitelPi] k k k d d s s

-*QQ

k k

tsslds->CCR

If overflow, e^scuie an Overflow TRIP W Z set is reflect ds fendralwispEebiistei

in4i;(SPHin

Condition Tests C & bgical AND, +logieal. WwiMl

"Isipd)

c c I F H P [?

CDtidition true false

Test
I

c Condition c V overflow ebr C


ovsffbw set

lest

!f I
i II

k Aedressregisfef (16/32-bit, 8=0-7) Dn Batarepfcf | / i / 3 M i t r , = f l - l h asfdifeor-airassiipter PC si1 #n ea

SSP S i p w Stack Pomlsr (32-bit) USP User Steek Pointer [32-bitl SF Active Slack Pointer {sams as .47)

hiaji I IC&IZ P plus b or sarse c? M minus * l

CE,ff carry clear ! C CUff tarry set

it gfesterorapl N&V+1N&IV II bsian M&ilf+!lfi

1 E 3

not aqual

eod

I Z I

S greater ten I1I!W!? I If bsorsqual Z+H&IV+W&V


iWtv-2004

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

Distributed under tie Gil) psrel p i t usefeense.

Hak Cipta Universiti Teknologi MARA

CONFIDENTIAL

Das könnte Ihnen auch gefallen