Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
21 views

Microcontroller Technology and Microprocessor Systems Module III July 2021

Good.

Uploaded by

muemamukilya31
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
21 views

Microcontroller Technology and Microprocessor Systems Module III July 2021

Good.

Uploaded by

muemamukilya31
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 10
2521/302 2602/02 2601/302 2603/02 MICROCONTROLLER TECHNOLOGY AND MICROPROCESSOR SYSTEMS June/July 2021 Time: 3 hours THE KENYA NATIONAL EXAMINATIONS COUNCIL DIPLOMA IN ELECTRICAL AND ELECTRONIC ENGINEERING (POWER OPTION) . (TELECOMMUNICATION OPTION) s (INSTRUMENTATION OPTION) MODULE I MICROCONTROLLER TECHNOLOGY AND MICROPROCESSOR SYSTEMS 3 hours INSTRUCTIONS TO CANDIDATES You should have the following for this examination: Answer booklet; Non-programmable scientific calculator; Drawing instruments; Intel 8080/8085 microprocessor instruction set; Intel 8051 microcontroller instruction set. This paper consists of EIGHT questions in TWO sections, A and B. Answer any THREE questions from section A, and any TWO questions from section B in the answer booklet provided. All questions carry equal marks. Maximum marks for each part of a question are as indicated. Candidates should answer the questions in English. This paper consists of 10 printed pages. Candidates should check the question paper to ascertain that all the pages are printed as indicated and that no questions are missing. © 2021 The Kenya National Examinations Council Turn over SECTION A: MICROPROCESSOR SYSTEMS Answer THREE questions from this section Ee @) |\Define each of the following with respect to microprocessors: w Bus; @) word length. (2'marks) (6) Describe each of the following microprocessor registers: (i) program counter (PC); ii) accumulator. (4 marks) (©) _ With the aid of a timing diagram, describe an op-code fetch machine cycle. (8 marks) (@) Perform the following number system conversions: a fe () (13375) to binary; Gi) (73.75) to octal. (6 marks) 2. (2) Define each of the following with respect to subroutines: @ parameter passing; Gi) _ nesting. (2 marks) (b) With the aid of a flow chart, describe the interrupt driven mode of data transfer. (8 marks) (©) Four bytes of data are stored in consecutive memory locations 3500 H to 3503 H. Write an assembly language program to add the data and store the result at memory location 3504 H to 3505 H, starting with the lower byte. (6 marks) (@) __ The accumulator contains data C4H. Determine the contents of the accumulator after each of the following shift operations: (arithmetic right shit; (ii) logical right shift. (4 marks) 3. (@)_Describe each of the following microprocessor addressing modes citing an example in each case: implicit; (ii) register indirect; (iii) page zero. (6 marks) 2521/302 _2602/302 2 2601/302 2603/302 June/July 2021 (b) © ) © Table 1 shows instruction listing of a delay program, The clock frequency is 5 MHz. Table 1 [Label [Mnemonic | Tstates LX1B, 1000 H 10 Loop: |DCxB 6 XTHL 16 XTHL 16 NOP 4 NOP 4 MOVA,B 4 ORA C 4 INZLOOP 107 HLT $ Determine the: () program delay time; (i)__-number of memory locations occupied by the machine code program. (11 marks) State three CPU signals used in Direct Memory Access (DMA) data transfer technique. (3 marks) State three advantages of assembly language-over machine language programming. G marks) Explain each of the following microprocessor system development tools: compiler; (ii) cross-assembler. (4marks) With the aid of a flowchart, describe ‘handshaking’ input/output data transfer, (6 marks) (@ Figure 1 shows an interfacing of 8085 microprocessor to a seven-segment display. Port C 9sv b) @ (b) Fig. 1 state with reason the logic level that turns on a segment; i) determine the binary word that will display digit 4; i) write an assembly language program to display the digit in d (ii) (7 marks) 5. (@)__ Table 2 shows a machine code program. Table? Address (Hex) | OP-code(Hex) 8000 21 8001 00 8002 25 8003 TE 8004 23 8005 96 8006 23 8007 1 8008 16 (i) translate the machine code into 8085 mnemonics; (i) explain what the program accomplishes. (8 marks) (b) — (@)_ State two reasons of disabling buffers when not in use. (i) With the aid of a diagram, describe the operation of a tri-state data buffer. (7 marks) 521/302 2602/302 4 2601/302 2603/302 June/Suly 2021 © b) © 2521/302 2601/302 June/July 2021 Table 3 A and 3 B shows an int’ 8155 programmable input/output (P1O)port register addresses and the command status bits respectively. Table 3A. ‘Table 3B [Port Register [Address CSR 40H PORTA 41H PORT B 42H PORT C BH High order timer | 44H high order time [45H Port A interrupt, Port B interrupt Write a program segment to configure: + port Aas an input port; + port B as an output port; * port Cas ahandshake port. (S marks) SECTION B: MICROCONTROLLER TECHNOLOGY Answer TWO questions from this section. With the aid of a memory map, describe the intel 8051 microcontroller. register banks. (7 marks) Write an 8051 assembly language program to compute, 1 +2+3 + ——-=- +15, and store the sum at memory location 70 H. (7 marks) Explain cach of the following intel 8051 microcontroller instructions, stating the addressing mode in each case: @) MOV A, 60H; (i) MOVE A, @A+PC; (ii) ADD A,@RI. (6 marks) 2602/302 5 Turn over 2603/302 7. (@)__ Define each of the following with respect to process controllers: @ tuning; Gi) lag time. (2 marks) (®) Describe the effects of a derivative controller on a process control system. (4 marks) (©) Acontrol system is tuned using the reaction curve method. ‘The resulting output is shown in figure 2. a Process Variable (PV) % », N= 4.8. site aPV=6 42. 40: 1 2: = 4 $ 6 7 ‘Time (s) Fig. 2 Determine the: (@ proportional gain, K,; Gi) integral gain Ki; (iii) derivative gain, Ko (6 marks) 2521/302 2602/302 6 2601/302 2603/302 JunekJuly 2021 @ EO} (b) © @ 2521/302 2601/302 June/ duly 2021 Figure 3 shows a diagram of a PLLC-controlled pick and place robot that picks up parts, from one conveyer belt and places them on another belt. When a part moving on the ower conveyor belt activates switch 1, the motor tums in anticlockwise direction to move the gripper to the pick-up position. When the gripper reaches switch 2, the motor stops and the solenoid powered gripper clamps on the part. After 2 seconds, the motor turns in the clockwise direction to move the gripper to the drop-point. When the gripper reaches switch 3, the gripper’s solenoid is de-energized to drop the part ‘onto conveyor 2. Draw a ladder diagram program for this operation. (8 marks) Conveyor 2 Conveyor | Fig.3 () Define aperture time with respect to data loggers. Gi) A data logger has an analog input signal of 40 KHz and a qauntizer of 12-bits. Determine its aperture. G marks) With the aid of a diagram, describe the operation of a counter-type analog-to-digital converter. (7 marks) Describe the three rotational forces in a robotic arm. (6 marks) Describe each of the following robot programming methods: (i) lead through; (i) off-line. (4 marks) 2602/302 1 ‘Turn over 2603/302 Appendix A: Instruction Set of 8051 Microcontroller Mnemonics, Arranged Alphabetically MNEMONIC DESCRIPTION CYCLES | FLAGS CALL asset POs2— (SP ada SPC z ADO A. dace As (dec -9A 1 Jeovac D0 & @R: At) oa 1 feovac ADO A. data As iol +A 1 Jeovac ‘ADD A. Rr AsRowa 1 [eovac ‘ADOC A. deeet A+ (droct) + C08 1 [eovac A000 Aan Ar (Ree =A + |eovac DDC A Weta Arkdsa SC oA 1. [eovac 400¢ A Rn AtRneC a +” |eovac ‘ASMP adit ‘Adertt <9 Po 2 ANU A ect ARND (rect) +A 1 AN AR ‘AANO (Rt) = 1 ANE A, feta [RAND Penta > A 1 ANU A Ro AAND Rn wa 1 ANE avec A {rec NDA» ec) 5 ‘ANE direct Hata (rect; ANG sata rect) 2 & fan co CAND bec 2 |e AM CBE CANO. c 20 he SINE Acree ret | [A> (rec) PC +3 el PC 2 {e GINE Aisi | (Aeocsa PC +3 +r she. 224¢ § | CINE QR. soata rel | (Ry <> dah PC +9 cual FC aos 2? | CANE Ro, toa, cot IRn <> datas: PC + 3 + rei 5 PC 2 c “lara ona 5 UR be = bn : four c onc zoel lop. x Bon : PL bi Bra bt a crc Tac ae DAA Abin > Adee tie Deca An1oA af DEC axec (rect) 1 (direct) : Sec @nt = 108) 1 DEC a Br-taRn | see owas 8-4 n8 j 4 feo INE ec. rl j ec) 1 <> 001: PC +3 rel -+ Pc 2 ANE Renal Wn=16 00; °C+2e08-sPC 2 = AeioA 5 In diet (eat * 1+ (cret) Aap inc PTR Dera +1. oerm 3 INC ea (y+ 10 1 WNC Fen Rn tan JB Dh et BIE PC+3 + rei-v PC % SC iret {=H PC + 3+ reins POO on 2 JC et (Cth PC+2+ rpc 2 AMP @A+ DPTR DPTR+A-sPC 2 NB bite =O; PC + 3+ ret» PC 2 SNC ret ICs: PC +2 el PC 2 INZ rel POO! PC 2 rls PC 2 22 el (A-00| 6c + 2+ rl > Pe ee toate aaarie [cea er mda ec 2 Lan? asar6 Aecn'6 420 a OV A creet (aueet) 24 1 | Mov A, et GA 1 | mov A sor a9 : Moy aR Raa } MOV dived. A A foreay 1 MOV orect drect | faseen "sfc | = [Mov met @ | = MOV direct Miata 2 MOV seec fin 2 | MOV Bt. 2 |e Mov Cis e 1 ‘MOV GRA | 1 MOV GR deect 2 MNEMONIC DESCRIPTION BYTES | CYCLES | FLAGS MOV Rr, Hata | ada Rn 2 7 MOVE A @ArvPTR | (As0PTA)—»A 1 2 MOVE A, @A‘PC C:PQ) 0A * 1 2 MOVE A’ QOPTR (OPTRA 1 2 MOVE A @R (Ripa 1 2 MOV QOPTR,A Ao (OPTRYY 1 2 MOVX @Fi,A AR 1 2 NOP: Por tsec , + Mol Aa AxG AB t + low ORL A, dect ‘AOR (direct) + 2 t ORL A QR: AOR (RI) -»A, 1 1 ORL A: fdata AOR fasta +A 2 1 ORL AR AORRn-A fe ORL direct, (area OR A (avect) 2 1 ORL direct Hse (cirect) OR Hasta > (ect) a 2 ont C. bit CORBI +c 2 me fc ORL Cbt CORBI 4c 2 gle POP rect (SF) -+ (erect) 2 2 PUSH rect (eect) + (S°) 2 2 RET (se) 1 2 RET (SP) Pcl 1 2 ALA ADMATHAD.«-ATe-A0 ' : RUC A ConATEAB.« ADS C 1 +16 RRA AQAT-9A6, 481-94) 1 1 RRC A CATAB.- 940-40 : Veet: ‘SETO bi ers 2 1 SETB CC 136 1 ety ‘SUMP rot PC+ 2 rat-+PC 2 2 SUBB A. direct | Acleredhc + 2 1 [covac SUBB A. @R Faapcoa ’ 1 [covac ‘SUBB A. Hata An Nsata-C +A a 1 |covac SUBB A. Ra. AARC oA, 1 1 |eovac SWAP A | Also es aman 1 1 XCH A det 4 (deeet) 2 : | XCH A @R: Ae iki) 1 1 CH ARn AGRn 1 rey XCHO A, @R Alan o» (Riis : |. KRU A drect, AKON ract) + A 4 ' ARL A. QR AXOR RD oA i 1 XRL A oats AXOR asta +A, 2 1 XRL ALR AXORRn-+A 4 1 XRL erect 4 (Girec) XOR A (eect) 2 r XRL creo, fata (rect) KOR Hass + (Sree) 3 z ACRONYMS ‘dirt Pape adress of 11 bis, which i in the same 2K page as the address of he folowing instruction ‘sdér16 Adress for any locaton inthe E¢K memery space, bt ‘The adctess ofa bin the inieinal AM bit acdress ates ora bitin an SFR. © Tha cary ta, Héale ANBAR inary pumber kom 00 to FF, Hénta16 18. inary ruber rom 0000 to FFF rect _Aninternal RAM adraus or an SFR bile ade. fn Least sgneant bola msn Moti sgnteantsinble : rel "Narberth s odd to the adaress of the next struction to form a acess +1276 to ~128d rom Doe ‘adess othe neat nstucton. Ra ‘Any ol esters RO io R7 of he current riser bank. Note tnat tag atte Increetedoras using the conten of RO or A. IF te condition insice the brackets fs true, THEN the action std wil occur, ELSE goto the neetinstucton EXTERRAL masnacy teat Con:enso! the location inside te parentheses iascactlon ae shown ahere soorootale: any operations which affect te SW adaress may also afet te fags 2521/302 2601/302 June/July 2021 2602/302 9 2603/302 Turn over minne 8080/8085 or or o 008 | mnvemow | coor | amemowrc | cove | mnemonic nwemone © ior 2 lox w | se [wv om 2 o fix spre 2 Int | 2 |wov om nc a jsrax 9 | 20 focn 1 | se |mov ew . a fx 8 | 2 lw tos | s0 | mov e¢ x he jo fina og 2F iema 5A [Mov £0 DB q o foce 2 | 30 sm 50 |uoy ex Ae % |wvi 08) a1 [uxt spore] sc | wov en iz or |ric 32 (STA Adr 50 | Mov EL saioos | j | os |- a jinx se | se | wov ew ma fona | nr Inst 9 | joo 0 [ae fwa mw | st luv ea 5 Jorn t | to {mo a» ftoaxe |-35 focn m | 60 |wov ne a jon | et [ror mw | oe jock s | a6 |wvi moe] 61 |uov wc oz fom a | 2 [90 aw oc jiwn oc a7 |ste. 82 | Mov Ho 88} cM op es | xt op foce c | ae |. ~ 63 | mov He 9 fom c | ea | cpo aw of fw 39 Jon s& | ee [mov nx cur 0 | te frum w or jnnc 2n |tom aa | os | mov oa ow c | te [am oe 10 fe 38 Jocx = | e¢ [mov am ewe on | ey [nor « fon oom ac ime x | 7 [mov Ha cur. | ee | are 12 jstaxp | a0 loce a | 60 |wov cp oe fom ou | eo | pcm {2 fox o [ae fut ape! so fuoy uc or fou a | ew res ta jm | 3 jeme 6A | mov U0 | co | ane ee j 1 Joch 0 | «0 Juov as | os |wov ur cr fro a | ec ay 16 |mvt 008} 41 |wov ac 6c | MOV LH c2 | anz adr | EO 7 fra, 42 [Mov BD 60 | Mov LL c3 [amr adr | cE 0B 0 ee ee Sie aloe: | 19 |pao, o 44 [MOV aM oF | MOV LA cs | Push 6 Fo ta |ipax 0 | as |uov at | 70 | mov w cs [ao oe | ri sw 8 |Dex Dp | 46 [Mov am 7 | Mov Mc 7 [mst of Fz [arte re fine © | a tov ga | 72 | wav mp cn | ne ra [pu i 10 [onc & | a juov ca | 73 | wov me co [rer an | es [or aw Xe Jui 08) «@ |nov ce | 7 | mov mn ca |. Fs | rush ow 1 Ian a |wov co | 25 | wov wa a |— Fe fom os 2m jm [ww fuov ce | re fur | cc cz aw | #1 [nor [2 ux ward ac fwov cw } 97 | wov ma | catt mw | re 72 [suo ao | 40 |uov cr | 70 | mov aw ce |act on | ro jB Jwx «| ae Jwov cw | 70 | mov ne cr fast a | ea jm jive | a [wov ca | 1a | wov ap 0 | awe fe | 2% Joca w ‘0 [Mov OB 7 | Mov ag | 1 } Por oD Fo x [uv wos) 3 |wov oc | rc | mov aw oz |ne aw | Fo | a ona st |wov o0 | 70 | mov at oa }our on | re fom oe x | sh fuov ox | 26 | vow am | 2 oe Jove aw | re fast 7 x Jono | s fuov om | | mov an ps | ruse 0 | am [uu ae | ss fwov ou | 00 | moo os | su oe inet eniies 10 on Bt Gta vanity, DIE = consanh or lepiaTaihgwaie nm iy. Ady Te bit addres ‘vanes to + T6hi dees A THIS IS THE LAST PRINTED PAGE. , 2521/302 — 2602/302 10 2601/302 2603/302 June/July 2021

You might also like