Question: PIC Microcontroller and Embedded Systems: Using Assembly and C for PIC 1 8 Instructions: Please help to Write ONE Write, Assemble and build ONE complete

PIC Microcontroller and Embedded Systems: Using Assembly and C for PIC18
Instructions:
Please help to Write ONE Write, Assemble and build ONE complete assembly program using the MPLAB IDE software based on the PIC18F458
architecture to perform the following tasks: complete assembly program to perform the following tasks:
a. Set up and initialize the table pointer to point to an array of data stored in program memory, starting with the label The Data. The dataset contains a total of D'256' elements, consisting of 8-bit numbers represented in hexadecimal format.
b. Create a program to count all negative values in TheData that are divisible by 4. Store the result in TOT_EL4 at memory address 0x100.
c. Write an assembly source code for the assigned task and use the MPLAB assembler to generate the source code (ASM) file, listing (LST) file, and object code (HEX) file. Your program should start at address 0x450. Include sufficient comments to ensure your program is easy to understand
Requirements:
1) Your main program must start at address 0x000450. Make sure you include sufficient comments to make your program readable and understandable.
2) For debugging purpose, in your assembly program, define a data section at the program memory AFTER your main program. The data section should be named TheData and consists of a dataset of D256 hexadecimal numbers. Please use the dataset below:
0x45,0x45,0x30,0x31,0x30,0x35,0x35,0x33
0x33,0x49,0x4B,0x59,0x3A,0x66,0x4E,0x6B
0x56,0x69,0x6B,0x6E,0x65,0x73,0x77,0x61
0x72,0x61,0x6E,0x20,0x52,0x61,0x6A,0x61
0x6E,0x74,0x6C,0x5A,0x66,0x2E,0x2F,0x2E
0x74,0x79,0x20,0x60,0x28,0x63,0x48,0x21
0x70,0x30,0x43,0x5F,0x3F,0x41,0x30,0x78
0x24,0x61,0x6B,0x68,0x2E,0x34,0x61,0x3E
0x1A,0xB9,0xB3,0x5C,0x95,0x5F,0x5D,0xAB
0xB7,0x93,0xFC,0x36,0xB2,0x10,0x27,0x00
0x17,0x2B,0x00,0x90,0xF9,0x88,0xF0,0xEA
0x78,0x39,0xAD,0x9A,0x87,0x67,0x7E,0x9B
0x56,0x69,0x6B,0x6E,0x65,0x73,0x77,0x61
0x72,0xA9,0x48,0x4F,0x01,0xF6,0x67,0xEB
0xDF,0x6A,0x79,0x87,0xC6,0xAD,0xE4,0x94
0xDB,0x90,0x89,0xC9,0x23,0x8B,0xFE,0x1D
0x6B,0xBA,0x83,0x7F,0x90,0xC9,0x79,0xAE
0xDC,0xF8,0x71,0x2A,0x44,0x57,0xB7,0x0B
0x5A,0xF0,0x2C,0x5C,0xFD,0x03,0xDD,0x4B
0x91,0x0B,0x53,0x2C,0xC7,0x19,0x1E,0x35
0x7D,0x96,0x48,0xE8,0xEC,0x61,0xEB,0x4B
0x3E,0x3C,0xFB,0x70,0x0C,0xAA,0xF0,0x11
0x72,0x61,0x6E,0x20,0x52,0x61,0x6A,0x61
0x6E,0x24,0x4C,0x43,0x64,0x38,0x4E,0x6B
0x2E,0x4A,0x5A,0x70,0x30,0x6D,0x29,0x25
0x25,0x71,0x77,0x4C,0x73,0x6C,0x47,0x78
0x29,0x3B,0x2F,0x60,0x33,0x59,0x25,0x23
0x83,0xFB,0x34,0xE3,0xE7,0x26,0xD3,0xDD
0x26,0xA6,0x44,0xE1,0x00,0x55,0xCF,0x1B
0x95,0xAE,0x52,0x5C,0xA0,0x37,0x00,0xD5
0x00,0xE9,0xA9,0xB6,0x2B,0xAA,0xE0,0x05
0x63,0x8D,0x0D,0xD8,0x91,0xC5,0x36,0x39
3) Assemble and build your assembly program using the MPLAB IDE based on the
PIC18F458 architecture. Debug your program and show that it is functionally correct.
Please help to provide the following:
a. Flow-chart of your program (you can use draw.io)
b. The full assembly program
d. The screenshot entire full MPLAB Output Window clearly showing the result of the build
Process
e. The screenshot contents of the program memory (displayed as Symbolic) for main program
Starting at address 0x000450
f. The screenshot contents of the program memory (displayed as Opcode Hex) for TheData
Data section
g. The screenshot final contents of data memory block of BANK 1
h. The final contents of watch window with the following registers: WREG,
STATUS, TABLAT, TBLPTR, and FSRx.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!