You are on page 1of 28
be treated as malpractice 1g blank pages 1 cross lines on the remaining ‘or equations written ey, 4 pulsoriy draw appeal to evaluator ‘of identification, i 2 Important Note : 1. On completing your answers, comy IKE RS? Degree Examination, Feb./Mar. 2022 Microcontroller Fifth Semester B. Time: 3 hrs, Max. Marks: 100 Note: Answer any FIVE full questions, choosing ONE full question from each module. 1a, With a neat block diagram, explain 8051 microcontroller’s each block. (0% Marks) b. Explain Addressing modesof8051 with example for each (06 Marks) c. Explain the bit pattern of Program Status Word (PSW). (Weel OR 2a. Show the status,6£CY, AC and P flags after adding the following data: (i) 9CH and 644 (i) 88H and 93H (06 Marks) . Describedthe fitnctions of various pins of 8051 microcontroller with Pin diagram. (0 Marks ¢. Compate the Microprocessor and Microcontroller. (06 Marks) Module-2 3° a. Explain the following assembler dire (i) ORG i (iv DB (08 Marks) b. Write an ALP program forthe a it numbers, the numbers are FC4SH and 02ECH. Place the sum in R7 and Ré Id have lower Byte. (06 Marks) ¢. Explain the following instructions with an example: * (06 Marks) (@) RRCA Gi) XCHDA,@Rp Gil) SWAP A OR to complement the value SSH, 700 times. (06 Marks) e : 4 a. Write an-asstmbly language program mM structions. With a neat diagram explain the range of JUMP and b. Explain JUMP and CAL CALL instructions. (08 Marks) ©. With a neat diagram, explin working of PORT). (06 Marks) — 7 lodul (08 Marks) Explain the differenPDs C microcontroller. 5a. Explain the different Data types suppor by 8051 are Write an 8051, “program to erefés)squae wave of fiequency 2500Hz on port pin Fs» Use timerLin node 2 to create the.delay f= 11.0592 MHz. * ¢. Explain TMOD Register. aie OR ; 0592 MHz. What value do we need to load into the timer time delay of S msec? Write an assembly language program for i have a . ep eth in '0 create & Lee wie eae Pay ae s ane it 4 er 0 in mo Nay seconds ¥ Oe ecko Th ‘ss a tits of Ps continuously every’S00 msec. Use Timer 1 in 6 a. Assume crystal frequenicy'ws I Assume that 601 all €. Write a C program to togsle (08 Marks) mode | delay. lof2 Scanned with CamScanner Shot on OnePlus By SB Scanned with CamScanner TIléyvo 5 ‘i we Controller (Fe b| Mar- 2022) BGs of Evaluation ae ion Uubject Micwcontolle> ea 3 Code! jee 5D i) £ 5*8 Coda) Departnne nt ' enact & Electronics ea “aRegea \Sy di JP Ok Ravindra piotekary . 1a) ——_ at Vly} r Vet block at plas 2051 x Mtoe LU rch Woe osm) wig ok mmupt Be oe fe Bet Mero Ar con ore Eo eal [ Above shows the block iy The ae “bh B05 |> Tr has Sbib CPU ‘with iis A bo Tt |has AK bytes of on “Kom £8 be extended upto 6Ar. h * KAM “size is Pi (28 Ltn ch whi 3> The stk jo a an 4y “T+ pas) ee bit stone 5) 4 ports Po, 1 Scanned with CamScanner & oOsei anny, CANUTE Bes at Ey Sup pev's Stull Pa Modes 5 forieach. Cong Ab. explain Address! 96 With an exannple | “Ans: Delo: he wassous 10 ob AMY data Vis cotled as Addres 9 wlodes As Trmediate Ain — al To romediat aim, the Soul pet or on tromediate dota with a. ban, “4! destination Opecand ‘a mage “O° i : e ; ace Mov Rd, Ht data ~ ex! MON Ro, HO5h,. > Reger Addressing Mode: | Hee Baer ATM both Sore § Opcond ‘5 an ayn me ae ‘ Mov Kd, Ks. (Exle MON KoA. MOV Re, wn 4S On iovetid: i Sy. _Dinect Am, In “thts SPH ob AM, One. wilt be address, ¢ phok t MOY Rd address Ex! MOV Ri, 406, » ashes Modirect Ara? In ‘this Ko § Rr js Usead Syptay ! mov Ext POV wy 5) Thdewed Armi— Move a gata MON cA CAF Scanned with CamScanner ey Bit inherent Arm! - CLR Ofb . © explain the bit pattern oF a ae Status wlord CRSW) eh (am) : ‘ (ev [ae | ro [wai] aoliow] =] Y Ca aan we - ah there ig a con ae Sanee Da , then, Gye eee ext FO ‘ti, 9000 + Bay ‘00D 0.0." 0) Sigs 2? Aurillaxt Comm : i Olll oo; oO | > Th dtheve is Carey ke Date D4 hen Ac=1 else =x. ash 100 * ag 37 FO + User Scanned with CamScanner LE LlUlt—~— i € 1 100 ©0°3 . Acs) ? = pate 1000 é sagree M4 : a 6» Pash tag CP are ae 29 q +a : Accurputaioy Abe Pav a) P20 20) show Ape Status aye ee the eI a ACh Caan un 5 at 1001 1100,- O1 10 9100 a -.. O00006 0° ck aah seer i { 2) pin ove 7 k ’ as ‘a * Pind ‘|Pe Yc Scanned with CamScanner used as iP § ality por * Pin lo-1t —+ Post 3 Can op pot at Vs a dual - with pirs TD, RxD, RO, * Pin 18 & 14) Y tol Frog % Oscitlatoy, ts * Pingo. Ves * Pin a4 _agae lp poi Scanned with CamScanner 2~" © ify 7 lus external AK) ae exterool C727] aaa yeapal mer , te Ke neo con aay Gario ait EA: Used cohencver *% Pin so-2a: Pato 1s mot uscd then 5 o\ps- ; : Se a ne pron Sa in 40! 20) Compayt tan. Dia paces or J Micro contotley 2 (em) ioe Micropry ceesor Y General Pung » specie Pe i,.0 Don't onan 2% Prowédes Hleibility ey eelemt bill 27 Many instouctions to » aegleal move data bw. memory it & cPeu. ; 4 One or two bit bonding ov bit manipulation, instruction Ss» Req ule, yoore havducare ey Versatile Modute Bar — Pp tain the Airectiyes - Oo) ORG Scanned with CamScanner Scanned with CamScanner # Be gxplain the followhy wi serarmpte. COM). * 3 RRC ws This } ithe Accumulator 7% + forex. Az orb ie cy: 0 ") Xcup A,@Ri Ex! XCHD A, © Ko A=oah 0 Ro= 50h = 5SOh-Olb 'C) Swae 7 SWAP A: This wit Swap th. ; < k aceum ulatoy WW with high 2x1 SKIAP A d A=4 5) AE } OR AQ Sh 4 AISte ay asecmbly to Cor Plement the Wate KG cow}, © MON A, a5 5h | Mov Rs) 2410 Next" Mo a : \, Ra, a0 Wain CPL eas 4 DINZ Ro PINZ | vig? >) explain With peat & Crt i CALL Scanned with CamScanner Jump § Cau tostmctlons ~veplaces the Contents Of Program Counter (PC) with new Address Prey ran exceution to stovt free That nets address. The Aifjperernce Cin bytes ) Of this neso address fyom address in tam vohere purop § call Instruction is 3 of Turep or, Call. cae atted Range 5 a — | Sadd Uroit j a 5c lime [Relative Uirpttf; ~~ INC TB ae | ane. SNB, Bc. pus ATMP.- Scanned with CamScanner explain s40% % om) by Ary Porto Bis abit address able 3 Acldress of pot ois 30h. ~ To use this pos Np aa DWarike 4 to i|p, letch the data? Thus, tt rma kes the avansistor 2) when ™i,Mz ere OM © CK, there will be DO Co wound. a 5) so Ai vectly the ifp sj tostote ! <0 7? To Ueeniaana P YD Witt a O +o > My Mee tums ON Pim Ye eopmected > Any ‘emp ct Hae art as Scanned with CamScanner Data types. © Unsigned Char * The Char dota supe ts Of Sbits. This cata hype ‘takes a “Walite in WN O-255 @0-FFh). St is She wmoost widely ed aata ro Saeoell 2” Si ned Char: f ‘Tt ts also an B-bit dato Hpe that uses MSB . D4 to vepsesent sibve or ne ye value, So On ct bits ave Used to sent magnortude Of number. Tt aati 12% $0127 ay Unsiqned int! ! ‘gh is a 16-bit data type that a ee rere fe, © to 65,535. St is Wed to dene a 1e@-bit wowable such as mary : naa les 5 yy signed tots _ ; ay js aleo an 1Gbit data Hpe-Fhet Uses misB D115 TO 7S wee teen ee wate. Shy ot rales tap ~32768 to 22788. t . te Bit): ey oe oe oe aa bit addres : i + Oorl, le pst BB e ‘Sey Ug + Scanned with CamScanner fe Wate an A Square wave [oe . ¢ pat pir og, Ulss Foeq time® pe W059 | Create “the delay — ar include 47t sih7 , Void Tims. petay (void > : Sbit bit = Pod1) Noid main cvoidd ° Unpsiqned. char %) ¥ wobi! C1) HW mybit = smybit / «a TIM2 Delay CD5 void Ti M2 Delay esoidd TMOD =Ox201 ss ‘THA ae qa TRI= Vy 7 wobi le cfs oa TK = TF eee Yesoonz = = 4004S. HOO HS ]3 =20048. 2O00HS] ogsys = 1h. Ex ptai n Scanned with CamScanner TKi In TCON istey roust be Set-to 1 for timer 1 to wun je, Rie}. Bite: clt : When C[Te1 , Countey enode . in Counter Beoode, dsmey | voit Count event om Tr as Bien C|T=0 , timer vy eye Wewermeat every machine Cycle - Mr Me Mode ie Oo 13-bit Uihmer 16-bit teoer —” weload erode roode . Scanned with CamScanner TATE at Pad 5 Moy TmoD , #°! Here: Mov TO, #00% - Mow THO, HoeeEh a ; SETR P23 sete TRO a Agee: ove Tro, ae” CtR Poe CtR TKO a Byeur? Tho. 6b : ~ pr ecde 2 Wee 2 al Ecopds & moiputes On P, & Pat Aesume that Gonz external Clk supplied +o To pie ( Paad. Cem) os at include 275g 5 b7 . \toid ToTime rae Chard, Noid main t) aa Countex 0 in “tnstgees Chay vol) ao) TMOD = OX06) Ho = -60 } while Gola Scanned with CamScanner vte ee aul bits o inte a C ama Coots nucushy every BOOmmsec. USE Timer 1 in tt \oclude <7tq 5\Vby Cooked Void Medety cvoldd > ’ ' Ntoid main: (voiad a Unsiqned Char xy : P2 0x55), ‘ while C1) J ! . Poe les 4 é tor (%=0; “42005 er ies hasdetay 69; me a + 4 ah, i} Nod “oa cv ole TMOD=, Ox10 7 TU =OxFE- 7, TH = OXAS ; TRie 1 cobile CVF 1 = Oy pee oO; 22042 Xi Scanned with CamScanner iT shit abit shill o;) ' e-bit upRt | BR: = Wawable a2 m a-bit unr fese/i2. oF Sese]a “4 2 q-pit UNRI] BKe Wawable - SMa! Tt is used ctor Matis Tn g05) we orven't Using roultiprocessor. So REN! Enables Reception. REN: 1 (enables aeeeptiony = REN=0 Cdisables 2xce Bon), PBB: Tt vetews ko the qth bie | ‘i “ceived | eae 24s. 11) qrreanemit Inheoruph F sae hardcore, tsansrmotted z Must be ‘at a RT! Receive oom ey ‘hg 7 Scanned with CamScanner 5) Using ms 's not Com att ble Coiss, ( Since RS oaD today’s BUEEIES © Wwe need x Une diver (vottage Converter) “to Convert RS 2390's si nal ; to TT ved levels that Lollt be Fal to 8051's Ty & RxD Pin. Such a Copveriey | is May 232. One ae % MAK 232. chip | is that It Uses a +5y Power Sourte cohich | Je same 5 the Source Coll « Ser %05). MAX 230 bas wo a OL Unc VYdeivers doy 7 Acta , Typ Red. while ReD are Rs-232 Uses a ar pin a= DBI, The moat for hese Con aehent is ooig Scanned with CamScanner VH1 = OXFAY q SiON = 0X50} Ra ey while (1D Spur. A’ : uobile (TL == 0)’ ee j oR 8a Explain di feerent LoReeoX pi Of B05) indicating’ thely ~Vectsr address (6m) 4 > When” Reset pio fe activated » B05) jurp. to address tovatton O000h, 2> Two interrupts are set aside tor Tosp Memory location O008b & 001&b ey To i“ Treapect nals Pi 2 ‘Two intwrupth are set aside Sor bh) external joterrupts oN TNT, ete - They ane also » eed as EXO & Ex). Memory Location ooo3¥t ool b assiqne tO INTo ©. INT, 5 8 ula J Ny seal Conmmunication bas a Hat belo to both de r Mero addrss O09 af Ty \ kre : 7 ae nieuw 7 ple iotenu Scanned with CamScanner C-proqrarn ‘to hranster the Yeemalty at 4600 Laud, bit. Do-this Cooou ously , (am ab include 5m) Awid sevty CUunsiqned Char) > \eoid ee TMOD = 0¥20;, TH) = OXFD? g Ston = 0x50" TRiev) 4 wohile (1) Scanned with CamScanner > bi ar include 4 noid rain "unsigned Chad at Za TMopy. 0x20; TW = OxFA, SCON = OX5D) TRia Wy 7 vobile C1) weg BVP oid) wohile (RI==00), yoy byte = SBUF Pi = roy bite 5 Module & Explain +he Cons teppes Molor . ¢ angle & steps | 1 { pe Scanned with CamScanner Scanned with CamScanner the arwchitectuse & u Draw Fhe tnterpace b yh S05) Microconbtll > Le 1S interkaced by. a Pow 0 Poy to Poe. 27 when VOL e “48 apptied, electsostatic Field i, created U-this allows the u ‘ght to pass Hhrough Seqmech + dasvin au needs a Awvir ed. integrated Inv ck OF y The dispy hos oie Regate » Pato 5? Dato Comroa' by RS tb wuts ¥ | 6 Unterfaci : Lep if Scanned with CamScanner With nee explain joter 1 4c. (6m) Ok DAC Pia a oq fp puts Are Converted to Current 2) Then bey B xcister to Tout pin +O Voltage . Is (a Function Sk oh ‘PAc 0808 5 Scanned with CamScanner Ae 10.0+) gpplain the ADc Ogo4. Explare 4 ADC B05+ apc “to Oo Sosr x4 => & pn sical Que buridi eft. '% Usuatt aQ aelice ts Used Hence, we Hhese png asi afc rt them - Si s- Geoail It has 8 ilp Unes (Dnt - addetss lines CA, 8 c) ALE pln is eel : 2 Dato lines are 3C'> | Stast oy E0e> €nd o O8 3 Of Scanned with CamScanner Scanned with CamScanner rte p pe ey 2 ORG S6o00b ~ Mato! sere '|h.q 1 Mov A) #66b “Mow pi) A JINe Far , CW RRA | 4 ¥ Acatt lela Mov PLA SMP Tus RL A | Acout Pele) 1 Scanned with CamScanner

You might also like