EE 312: Microprocessors and Microcontrollers Assignment IV Instructions: 1. You can submit your assignments either by a soft or hard copy. 2. Students submitting soft copies should eMail the PDF files to suresh@iitj.ac.in with the subject line ee312 assignment IV submission. 3. Students submitting hard copies should post in the box (in my office). 4. Submissions after the due date will not be accepted. 5. Please note that plagiarism is a serious academic offence and do not even attempt to copy from others. 6. Tabulate your programs with proper comments for each of the instructions. Please be clear in your comments for each of the instructions. You may refer to the text book for sample programs.
EE312: Assignment IV
Indian Institute of Technology Jodhpur, Rajasthan
Department of Electrical Engineering Assignment - IV Due date: 02-DEC-2015, 12:00 noon (soft copy) 02-DEC-2015, 12:00 noon (hard copy) 1. Write an assembly language program (for PIC18F452 microcontroller) to a. Sort N number of bytes specified in the program using DB directive and b. Store the sorted numbers in the bank number 02 of data memory.
2. Write an assembly microcontroller) to
language
program
(for
PIC18F452
a. Sample the analog signal connected to the channel AN0.
b. Store the first 10 digitized samples in the bank number 02 of data memory. c. Generate a Pulse Width Modulated (PWM) waveform with the sampled data. Assume the input analog frequency as 4 kHz and to be sampled at Nyquist rate. Also assume the MPU clock frequency as 40 MHz. You are allowed to use an external clock connected to TOSC1 for sampling analog data.