Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(25 pt) Assume that the following code is running on a PIC18F452 with an oscillator frequency of 4MHz. In the following table, write the instructions

image text in transcribedimage text in transcribed

(25 pt) Assume that the following code is running on a PIC18F452 with an oscillator frequency of 4MHz. In the following table, write the instructions being executed and the values taken by the Program Counter (PC) at each microsecond. Answer here Address in Program Memory? ORG Ox0000 NOP MOVFF OxABC, OxDEF GERI MOVLW b'00000110 MOVWF PORTD GOTO GERI END Instruction PC value (Hexadecimal) Time (us) 1 2 3 4 5 6 7 8 2 10 11 PIC18F452 INSTRUCTION SET 16-Bit lasbruction Word n Cycles Status Affected 4nni| MSL 15 1121 T 121 1121 11 121 12 1121 1 21 12 11 Anemonte. Desption Operandis RYTE-ORIENTED FILE REGISTER OPERATIONS ADDWF tau AJU WREG und ADOLFCL, a ADD WREG and Carly 67101 ANDAV 1. , a AND VREO with f CLRT 1.9 Clear cour 1, 1, 1 |Cremart CPFSEO Come with WRkp CPF&G Come / WU WREG SK CPFSLT La Campare two Wap DECF C4, Dacrament DECISZ 1,08 Cament, skpira DIC FSNZ f. d. a Desen! Kpu Nora INCP 1,1, Indramaat1 INCESZ Ad, samal Rp ir INFENZ f. d. a Ircinispir Nora ORWF 1. d. 2 cluse OR WREG Wint MOVE do Monet Mave (JCD) to it word ! (destination and ward HOVWF MASREE DO: MJLIGT Nutsaly WREG wah! NE fa Nuyal? ALCE da fasthrough Corry PLNCE 1.RowLetift Carry RRCF 1.4. a kora shthrough Cany RRNC de Roto No Curry! SETF SUBF 1.0.0 Saco Wed with bH sueWF 3. Subers WRE homi SUPV/FS 1,0, Sulst WREO Am will DONTON 1.d. Wannben TSTESZ Testfo XORWF 4. Eackalve OR VREO Wt. BIT-ORIENTED FILE REGJGTER OPERATIONS BCF 6. Ba Croat BSF 1.b, Bit Set BTISC 1.D, atit Vest Skip Balwar BTFSS 1, b. Test Skip STG 1.6. Togglet 1 0014 100 15 LEER IS, DG, Z OVN 1 0910 Doda Itu CD. 7.VN 1 COOL 010 sert 7 N 1 0110 10 !rer tref 2 1 00011100 ECCE ZN 112 or 0110 0CCA ir + tfff None 1 42 or 3; 0110 0109 It: None 112 or 3: 210 000 12t None 1 1 GICO oids ter 10:1 C, OC, 2, UN, N 12 cr310 11 16 tot free NO 12 cr3) 100 LAS t: #ENo ! 2010 2004 CA Per Cuc, 2. ON 12 cr3) 2014 11 ffff FFFE Nana + 12 cr3) 100 loda itit te More 301 Doda fort futIZN 1 9101 bodia cit: :: ZN 2 1103 car for : None 1721 EF CC rer: 1 12,0 1114 FC: 1:12 None 0000 cola Etfi F!FNone ! 0110110 110a ctt: , OC, Z, OV, gair ELE Iete CZ, N 0100 Oda Ette fuil Z.N 1 COL goda FILE Itte C.ZN 1 0100 Goda cir: rete ZN : 1 5110 100 EF! FEEC None 9101 Cdo fEEE CDC, 2, OV, N a101 11da -trt fert C.oc, Z, OV,N 11 2101 1 da ter 121COC, Z, ON CONTROL OPERATIONS OC fronth Csery EIN Branch Neting LENC n Brunca 1 No Calry JANN Branch Noh Negali ENOV Branch No Overlow ENT a Branch Nol Zero lev n Branch Overflow BRA 11 Ranch Lincondcnalty SZ 11 Dranch 7 Zero CALL TI, Cel subcutell woru 2nd weed CURVIDT ick Watchdog Time! DAWY Deci RVREG 500 C Coachessist word 2nd med NOP No Operasion INOP No Operation POD Raptop of our slack TOS) ! PUSH Push of resursack (TOS HCAL n Relative all RESET Software device RESET RETFIE 5 Resun honen plensble ! RE K Rerum tih Isralin VIRES RETURN $ Renumiran Suturmatina ISLEEP Gunilo Sudby 404 1110 0010 None 11100110 zi 2110 0022 BN Nene 21:01 Da Nene 21:0 CLD ! ws inn a None 113 GOD: MIT mann None 21:9 TL Tiruin Putra None 1101 Onno arrin None 21a co00 TILTE None 31>) 143: kk 143: kkkk kkck, None 1121 kkk kkk kk 9000 90 DODA 5:00 Yo, PG 9000 6908 9:21 C 1110211! kkkk kkheer 1111 kkkk kkkkkkk OC 050 000 Go Norte 1111 SEK xy XXX No. 0-030 3000 0003 D110 Na 0500 0060 CO2 010 A 1 LOL FACT FILE Coco Coco 1211 1:11 A11 COO 0000 cou Ogos GIE SIEH FEICIEL code 1100 XkkX kk Nong 0000 0000 G001 0020 None Odsc0060 3000 001176, PO MOUFF 12 11 00cc 1111 kkkk ODOC 101: Kukk OCO 150: 1.0 1210 64 1191 000 ekte 0000 0000 DOOD 1110 e DUO 1202 DCD 130 kilde BC 1900 lei 000 0 13:0. lexe LITERAL OPERATIONS ADDLV k Add A WRES ANDHW k AND er with WREO ORI, k Inc.NO OR Niteral VREO LFSA rk Move Iteral 112 t) 2n word 2 to F5RX 1s: word XOVE K Monitoralis SR 3:0 1 NOVLW More Ieral WREG 1 MULLY k Multiply liwal wil WREO 1 RETLY k Rour wille VREO 2 SUAL R subtrans ViREG from ferui 1 XORIN ExclusiC OR Iteral WREG DATA REMORY PROGRAM MEMORY OPERATIONS TOLRC Table Read 2 Tetio Reuc W.drum TSLRD. Tatie Reac wth placement SURD Tetto Reec wih parcrema TSLIT Tebla Wata 12 151 TS Tetela in post-ncercat YALIVY Teble Wales prat-cecromani BWT+ Teble Wnilo with pre-indent kkkk CDCZ, OV, Zadkie ZN de 2, x None Xkle skk None ekk INCL. kkk Non 22 Nere du: c. 00, 2, OV, N Kek N 1 30:21 1 ada AEL cer: Nano 112 x 3) 150 C11 SEFE 450 None 1 5001 DA ECE ZN 1001 hits I 1000 bbb 12 or 3 1011 ha 112 or 3 1010 bu 1 03.11 bbw pot trat Ittt ter teer # None Ett None tttt Nane Art None eitt None TUER DOO coc. COCO CCBG COCO OOCD C090 COD ODCE CODO COCO COCO | cona CGCO OOCE 0900 ccco 0000 300 0000 0000 C500 cco Coca 100 Nora 1901 Nur's 1010 None 101: Non 1500 None 15.12 Nano IS 10 Hana 1.1: Nare d = 0 for result destination to be WREG itoister 0 - 1 for result destination to be file register (fr a = 0 to force Access Bank a = 1 for BSR ic select bunk i 9-billile register address 5 = 3-bit position of Dit in the register (f) (25 pt) Assume that the following code is running on a PIC18F452 with an oscillator frequency of 4MHz. In the following table, write the instructions being executed and the values taken by the Program Counter (PC) at each microsecond. Answer here Address in Program Memory? ORG Ox0000 NOP MOVFF OxABC, OxDEF GERI MOVLW b'00000110 MOVWF PORTD GOTO GERI END Instruction PC value (Hexadecimal) Time (us) 1 2 3 4 5 6 7 8 2 10 11 PIC18F452 INSTRUCTION SET 16-Bit lasbruction Word n Cycles Status Affected 4nni| MSL 15 1121 T 121 1121 11 121 12 1121 1 21 12 11 Anemonte. Desption Operandis RYTE-ORIENTED FILE REGISTER OPERATIONS ADDWF tau AJU WREG und ADOLFCL, a ADD WREG and Carly 67101 ANDAV 1. , a AND VREO with f CLRT 1.9 Clear cour 1, 1, 1 |Cremart CPFSEO Come with WRkp CPF&G Come / WU WREG SK CPFSLT La Campare two Wap DECF C4, Dacrament DECISZ 1,08 Cament, skpira DIC FSNZ f. d. a Desen! Kpu Nora INCP 1,1, Indramaat1 INCESZ Ad, samal Rp ir INFENZ f. d. a Ircinispir Nora ORWF 1. d. 2 cluse OR WREG Wint MOVE do Monet Mave (JCD) to it word ! (destination and ward HOVWF MASREE DO: MJLIGT Nutsaly WREG wah! NE fa Nuyal? ALCE da fasthrough Corry PLNCE 1.RowLetift Carry RRCF 1.4. a kora shthrough Cany RRNC de Roto No Curry! SETF SUBF 1.0.0 Saco Wed with bH sueWF 3. Subers WRE homi SUPV/FS 1,0, Sulst WREO Am will DONTON 1.d. Wannben TSTESZ Testfo XORWF 4. Eackalve OR VREO Wt. BIT-ORIENTED FILE REGJGTER OPERATIONS BCF 6. Ba Croat BSF 1.b, Bit Set BTISC 1.D, atit Vest Skip Balwar BTFSS 1, b. Test Skip STG 1.6. Togglet 1 0014 100 15 LEER IS, DG, Z OVN 1 0910 Doda Itu CD. 7.VN 1 COOL 010 sert 7 N 1 0110 10 !rer tref 2 1 00011100 ECCE ZN 112 or 0110 0CCA ir + tfff None 1 42 or 3; 0110 0109 It: None 112 or 3: 210 000 12t None 1 1 GICO oids ter 10:1 C, OC, 2, UN, N 12 cr310 11 16 tot free NO 12 cr3) 100 LAS t: #ENo ! 2010 2004 CA Per Cuc, 2. ON 12 cr3) 2014 11 ffff FFFE Nana + 12 cr3) 100 loda itit te More 301 Doda fort futIZN 1 9101 bodia cit: :: ZN 2 1103 car for : None 1721 EF CC rer: 1 12,0 1114 FC: 1:12 None 0000 cola Etfi F!FNone ! 0110110 110a ctt: , OC, Z, OV, gair ELE Iete CZ, N 0100 Oda Ette fuil Z.N 1 COL goda FILE Itte C.ZN 1 0100 Goda cir: rete ZN : 1 5110 100 EF! FEEC None 9101 Cdo fEEE CDC, 2, OV, N a101 11da -trt fert C.oc, Z, OV,N 11 2101 1 da ter 121COC, Z, ON CONTROL OPERATIONS OC fronth Csery EIN Branch Neting LENC n Brunca 1 No Calry JANN Branch Noh Negali ENOV Branch No Overlow ENT a Branch Nol Zero lev n Branch Overflow BRA 11 Ranch Lincondcnalty SZ 11 Dranch 7 Zero CALL TI, Cel subcutell woru 2nd weed CURVIDT ick Watchdog Time! DAWY Deci RVREG 500 C Coachessist word 2nd med NOP No Operasion INOP No Operation POD Raptop of our slack TOS) ! PUSH Push of resursack (TOS HCAL n Relative all RESET Software device RESET RETFIE 5 Resun honen plensble ! RE K Rerum tih Isralin VIRES RETURN $ Renumiran Suturmatina ISLEEP Gunilo Sudby 404 1110 0010 None 11100110 zi 2110 0022 BN Nene 21:01 Da Nene 21:0 CLD ! ws inn a None 113 GOD: MIT mann None 21:9 TL Tiruin Putra None 1101 Onno arrin None 21a co00 TILTE None 31>) 143: kk 143: kkkk kkck, None 1121 kkk kkk kk 9000 90 DODA 5:00 Yo, PG 9000 6908 9:21 C 1110211! kkkk kkheer 1111 kkkk kkkkkkk OC 050 000 Go Norte 1111 SEK xy XXX No. 0-030 3000 0003 D110 Na 0500 0060 CO2 010 A 1 LOL FACT FILE Coco Coco 1211 1:11 A11 COO 0000 cou Ogos GIE SIEH FEICIEL code 1100 XkkX kk Nong 0000 0000 G001 0020 None Odsc0060 3000 001176, PO MOUFF 12 11 00cc 1111 kkkk ODOC 101: Kukk OCO 150: 1.0 1210 64 1191 000 ekte 0000 0000 DOOD 1110 e DUO 1202 DCD 130 kilde BC 1900 lei 000 0 13:0. lexe LITERAL OPERATIONS ADDLV k Add A WRES ANDHW k AND er with WREO ORI, k Inc.NO OR Niteral VREO LFSA rk Move Iteral 112 t) 2n word 2 to F5RX 1s: word XOVE K Monitoralis SR 3:0 1 NOVLW More Ieral WREG 1 MULLY k Multiply liwal wil WREO 1 RETLY k Rour wille VREO 2 SUAL R subtrans ViREG from ferui 1 XORIN ExclusiC OR Iteral WREG DATA REMORY PROGRAM MEMORY OPERATIONS TOLRC Table Read 2 Tetio Reuc W.drum TSLRD. Tatie Reac wth placement SURD Tetto Reec wih parcrema TSLIT Tebla Wata 12 151 TS Tetela in post-ncercat YALIVY Teble Wales prat-cecromani BWT+ Teble Wnilo with pre-indent kkkk CDCZ, OV, Zadkie ZN de 2, x None Xkle skk None ekk INCL. kkk Non 22 Nere du: c. 00, 2, OV, N Kek N 1 30:21 1 ada AEL cer: Nano 112 x 3) 150 C11 SEFE 450 None 1 5001 DA ECE ZN 1001 hits I 1000 bbb 12 or 3 1011 ha 112 or 3 1010 bu 1 03.11 bbw pot trat Ittt ter teer # None Ett None tttt Nane Art None eitt None TUER DOO coc. COCO CCBG COCO OOCD C090 COD ODCE CODO COCO COCO | cona CGCO OOCE 0900 ccco 0000 300 0000 0000 C500 cco Coca 100 Nora 1901 Nur's 1010 None 101: Non 1500 None 15.12 Nano IS 10 Hana 1.1: Nare d = 0 for result destination to be WREG itoister 0 - 1 for result destination to be file register (fr a = 0 to force Access Bank a = 1 for BSR ic select bunk i 9-billile register address 5 = 3-bit position of Dit in the register (f)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Only Tax Audit Guide Youll Ever Need

Authors: Janet M. Sydlaske, Richard K. Millcroft

1st Edition

0471510769, 978-0471510765

More Books

Students also viewed these Accounting questions

Question

Find and evaluate the sum. a. b. c. 2k 2i + 1

Answered: 1 week ago

Question

What are the main phonation types, and how are they defined?

Answered: 1 week ago

Question

Why is environmental risk perception of high relevance in LMICs?

Answered: 1 week ago