Question: Consider a ceiling fan fitted with a temperature sensor and an Intel 8051 microcontroller. Once switched on, the fans speed can vary from level 1

Consider a ceiling fan fitted with a temperature sensor and an Intel 8051 microcontroller. Once switched on, the fans speed can vary from level 1 to level 5, with level 1 being the slowest and level 5 being the fastest. The level of fan speed depends upon the room temperature. If the temperature is between 10 to 14, the fan runs on level 1, if the temperature between 15 to 19, the fan runs on level 2. Likewise, for n = 1,2,3,4,5, if the temperature is between 5(n+1) to 5(n+2)1, the fan runs on level n. Write a program to decide the level of the fan speed given the room temperature. The room temperature is stored in register R0. The level of the fan is stored in register R1. Set the default value of R1 as 5. The program must be written in assembly language.

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 Databases Questions!