Question: a) Develop an assembly language program for 89c51 to do following (Marks 10) 1) Store any 8 values of one byte each anywhere in
a) Develop an assembly language program for 89c51 to do following (Marks 10) 1) Store any 8 values of one byte each anywhere in Scratch Pad area of RAM. You are bound to use loop to store values. 2) Find Mean of these 8 values (use shift operator for division) and send it to port P2 (formula for to find mean is given below) 3) Find the lowest number among the numbers saved in part (1), take its 2's complement and send it to P3 Enrollment Number: Formula for mean Li=1 Xi = n Where X is values, and n is total number of values Page 3 of 4 b) Develop a C language program for 89c51 to generate a square wave which has a frequency of 400Hz and 20% duty cycle on Pin1 of Port 1. You have to use timer 1 of 8051 to achieve this task. Assume that XTAL=11.0592 MHz is used. You have to provide the calculations you did to set values of registers related to timer. (Marks 5)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
