2
Roll No.: BETS?D3 Dr. Babasaheb Ambedkar Technological University, Lonere B.Tech. course in Electronics and Telecommunication Engineering Semester Examination, May- 2'017 . Subject: Embedded Systems Design Date: (6/5/2017 Semester: VIII Marks: 70 Instructions to students: 1) Figures to the right in square bracket indicates full marks. 2) PICI8F458 SFR list is provided at the end of question paper (Page 3). 3) Necessary data is gh'cn in the respective questions. If such data is not given it means its knowledge is a part of examination. 4) If some part or parameter is noticed to be missin~. appropriate data may be assumed and should be mentioned clearly. 5) Q. t is compulsory. Attempt any 5 tlUes.ions from remaining. Which of the following value of TRISAregister can be used to make RA6, RA5 & RA2 pins as output pins? Q. 1 Choose correct answer from given alternatives. I. How many bits are required to store MOVLW 55H instruction? II. a) 16 b) 08 c) 32 d) 24 [10] a) OOH b)9CH c) 9DH d)OCH III. Which register is used to access data indirectly from internal RAM of PIC18 microcontroller? a) WREG b) FSR c) PIR d) LATA IV. In PIC18 microcontroller family, how many RAM locations are bit addressable? a) 16 b) All c) 256 d) 128 V. Maximum prescale value forTimer 0 is_ a) 16 b) 128 c) 256 d) 32 VI. When BRGH= 1, UARTdivides operating frequency by__ a)16 b)32 c)04 d)08 VII. In ARM state which registers are orthogonal? a) rO- cpsr b) rO- r14 c) rO- r15 d) rO- r13 VIII. Which of the following instruction is invalid? a) MOV rO,#OxFF b) MOV rO, #Ox00002200 c) MOV rO, #Ox2300 d) MOV rO, #Ox255 IX. ARM Processor will be in Jazelle mode if a) J=1,T=O b) J=O,T=1 c) J=1, T=1 d) J=O,T=O X. In ARM instructions how many bits are used to represent conditional execution part of a instruction? a)04 b)05 c)02 d)Ol Q. 2 Attempt any two questions a) Write a program for PIC18 microcontroller to perform the following operations [6) i) Keep monitoring the RB2bit until it becomes HIGH; ii) When RB2 becomes HIGH, write value 45H to Port C, and also send a HIGH-to-LOW pulse to RD3 Page 1 of 3

[10] • I. How many bits are required to store MOVLW 55H ... · BETS?D3 RollNo.: Dr.Babasaheb Ambedkar Technological University, Lonere B.Tech. course inElectronics and Telecommunication

  • Upload
    vantram

  • View
    214

  • Download
    1

Embed Size (px)

Citation preview

Roll No.:BETS?D3Dr. Babasaheb Ambedkar Technological University, LonereB.Tech. course in Electronics and Telecommunication Engineering

Semester Examination, May- 2'017 .

Subject: Embedded Systems DesignDate: (6/5/2017

Semester: VIIIMarks: 70

Instructions to students:1) Figures to the right in square bracket indicates full marks.2) PICI8F458 SFR list is provided at the end of question paper (Page 3).3) Necessary data is gh'cn in the respective questions. If such data is not given it means its knowledge is

a part of examination.4) If some part or parameter is noticed to be missin~. appropriate data may be assumed and should be

mentioned clearly.5) Q. t is compulsory. Attempt any 5 tlUes.ions from remaining.

Which of the following value of TRISAregister can be used to make RA6, RA5 & RA2 pins as

output pins?

Q. 1 Choose correct answer from given alternatives.

I. How many bits are required to store MOVLW 55H instruction?

• • II.

a) 16 b) 08 c) 32 d) 24

[10]

a) OOH b)9CH c) 9DH d)OCH

• •

III. Which register is used to access data indirectly from internal RAM of PIC18microcontroller?

a) WREG b) FSR c) PIR d) LATA

IV. In PIC18microcontroller family, how many RAM locations are bit addressable?

a) 16 b) All c) 256 d) 128

V. Maximum prescale value forTimer 0 is_a) 16 b) 128 c) 256 d) 32

VI. When BRGH= 1, UARTdivides operating frequency by__

a)16 b)32 c)04 d)08

VII. In ARM state which registers are orthogonal?

a) rO- cpsr b) rO- r14 c) rO- r15 d) rO- r13

VIII. Which of the following instruction is invalid?

a) MOV rO,#OxFF b) MOV rO,#Ox00002200 c) MOV rO,#Ox2300 d) MOV rO,#Ox255

IX. ARM Processor will be in Jazelle mode if

a) J=1,T=O b) J=O,T=1 c) J=1, T=1 d) J=O,T=O

X. In ARM instructions how many bits are used to represent conditional execution part of a

instruction?a)04 b)05 c)02 d)Ol

Q. 2 Attempt any two questions

a) Write a program for PIC18 microcontroller to perform the following operations [6)

i) Keep monitoring the RB2bit until it becomes HIGH;

ii) When RB2 becomes HIGH, write value 45H to Port C, and also send a HIGH-to-LOW

pulse to RD3

Page 1 of 3

Q. 4 Attempt following questions.a) Write a C program for PIC18 microcontroller to generate a square wave of 10Hz frequency on

pin RB4. Use TimerO, 16 bit mode, the 1:4 prescaler to create the delay.Assume XTAL=lOMHz. (6)

Q.5 Attempt any two questionsa) Assume that 8 switches and 8 LEOs are connected to PORTC & PORTO of PIC18 microcontroller

respectively. Write a program to generate a square wave of 2 KHz on pin RB5, while at thesame time transfer data from PORTC to PORTO. Assume that XTAL= 10 MHz. (6)

b) Explain 32 bit encoding format of ARM data processing instructions in detail with neatdiagram. [6)

c) Explain different addressing modes for load-store multiple instructions of ARM with suitableexample of each [6]

b) Assume that 10 8-bit numbers are stored from 40H to 49H internal RAM locations. Write aprogram for PIC18 microcontroller to add these numbers and store lower byte of 16 bit resultat SOH and higher byte at slH (6)

c) Explain how ARM instruction set differs from the pure RISC definition? [6)Q. 3 Attempt any two questions

a) Write a program for PIC18 microcontroller to move values of block SOH - 55H to another blockof memory locations 40H - 45H. Create and use a macro by any name that will transferspecified file registers data to WREG. (6)

b) Assume that XTAL= 10 MHz for PIC18 microcontroller. Find the clock period fed into TimerOif a prescaler option of 256 is chosen. Also find out what is the largest time delay we can getusing this prescaler option for 16 bit mode of Timer O? (6)

c) Explain ARM7 3 - Stage pipelining with suitable example. (6)

Q. 6 Attempt any two questionsa) Explain following instructions with suitable example of each

i) MVN iI) RSB iii) ORRb) Explain SWI instruction with 32 bit encoding format and a suitable example.c) Explain following registers of LPC2148 :

IOSELO; IOlDIR; IOlSET;

Pic18F458 SFR Data Sheet

flleNotne BIt7 I e.G I BItS I BIt4 I BIt3 I Bil2 I BIt. I 8ilO

fOFh lNOF2 u- _ d F~ lO__ dolO-r ...-d f'$Il2l'oOld'I8ngod(1'oOl• phy$COl"""'*')FDEh POST1NC2 Uoos~ d FSR:/10_dora """""'Y .••••• d FSR:/_H".leNd (I'oOlOphyIicoIrwgisIo<)FOOh POSTDEC2 Uses_ d FSR:/lO-. •••••"""""'Y .••••• d FSR:/paoI4eO"''''iled (rd a phyIicoI~)fDCh PRE1NC2 UwI_ d FSR:IIO__ dolo"""""'Y •••••• d FSR:/pi•••••• ,•• olocl(1'oOl• ~ ~FOOIl PLUSW2 Useo...- d FSR:/10-. dora"""""'Y' ••••• d FSR2••••.•., ", •• ,Old(l'oOlol'ftyoiallrwgisIo<)•

•••.••d fSR2 "' ••• byWfDA/l FSR2H I - I I IIn<lirode-....".,., ___ 2 ••FD9h FSR2L IrIdnidDataMomary____ 2 Low!lylefDeh STATUS I I I N I (N I Z I DC I CfD7h n.RlH T1morORegiSWHil1'flyIofD$l TMRlll. T1morORegiSWLow!lylefD5h TOCDN TUROONI ToeBIT I Toes I T05E I PSA I TOPS2 I TOPS' I TOl'SOfCfh Tt.tA'H Tmor'IRegiSW~!lyIeFCEh TMRll Tmor'IRegioIo<Low!lylefCOt1 nCON RQ'6 - I TlC!<PS, I T'CJ<PSI) IT'DSCENI TlSYNC ITUR'CS I Tt.tA1ONfCCh TUU Trnet2RegioIo<FClIh PR2 Trnet2_ RegiSWFCNI T2CON I TO\1TPS3I T0UTPS2 I TOOTPS' I TDUTPSOI Tt.tA2ONIT2CKPS' I T2O<PSOFAFh SPBRG USARTIBaud__FAEh RCREG USAATIReooMtRegisterFA(lOI TxREG l/SART,T•••••••••~F-'Ch TXSTA CSRC I TX9 I TXEN I SYNC I - BRGH I llUAT I TXSllFAIlh RCSTA SPEN I RX9 I SREN I CREN I AOOEN FERR I OERR I RX9DFA5Il 1PR3 IRlOP WN<S' ERRJP TXB2IP TXB'IP TlCBOIP RJ(B'P RX80IPFA411 PIR3 IRX1F WI>XJF ERRiF TXll21F TXB11F nalOIF RXB11F RXIlClfFKJtI PEl IU<JE WAlOE ERRIE TXB2IE TXB11E TXBOIE RJ(B'E RXIIOEF~ IPR2 CMIP EEP eeLII' lVDP Thtll3P ECCI"IP"FA'h P1R2 a,IIF EElF IlCLF lV01f TMUIF ECCP1IP'FAOh PE2 CMIE EEE IlO..E lVDE TNR3E ECCP1E'"F9Fh IPRI PSPIP ADlP RaP TXP SSPP CCP'IP TMR2P TUR'PF9Eh PlR' PSPtF AQlF ROF TXF SSPF CCP1F TMR2IF TMRllf,F9DII PIE1 PSPIE ADIE Rae TXE SSPIE CCP'IE TNR2E TURIEFFBh PClATU - I - I biQ1f2l I~ RegioIo<hlrPC<20:16>"All t'U,AIH - tpc<15:8>

FFlih PCl PC~ 8ylo(PC<7;O»FF8h T81PTRU - 1 - I biQ,f2l 1"'_ MemoIyT_ -\JIll>Ot Byte(TtllPTR<20;16»Ff7h TIlU'TRH P\ogolmMomaryT__ 1tgIl8ylo(TBlPTR<'5;B»FFfih TBlPTRL P\ogolmMomaryT__ LowByte(11lI.PTR<7:O»FF5h TA8'.,OT PIograMMomaryT_lOlChFF4h PRllDH - RegIlOo<ItgIlllyllt'.311 I'><UJl . lEW LowIlyleFf2h INTCON GIEJGIEH PE1E1GlEl TMRCIE INTOE RIlE TMRllIf INTOF RBIFFF'h -CQN2 RBPU IHTEOGO IHTEDG' - - TLRlP - R8IPFFllh INTCON3 INT'P - MilE - INTIF

j•

(6)

[6)

[6)

[6)

Explain all Barrel Shifter operations with suitable examples of each.b)

Q.7 Interface 16x2 LCD to LPC2148 microcontroller. Write a C program to display a message"Dua me yaad rakhna ..." on LCD continuously. [12]

************* END ***********-*

**********************************************************************************

Believe you can and you are halfway there ...

All The Best

2/3 3/3

. ,,'