An 8051 must be used to control the speed of an electric motor through PWM. The lowest speed setting requires a PWM output with a duty cycle of 20% and the highest setting requires a duty cycle of 80%, output on P1.0. The frequency of the PWM signal must be 10 kHz. The change of speed is indicated by a message received on the serial port, where a “+” increases the speed, and an “-” decreases the speed. Make sure that your duty cycle remains within these limits. Echo the current duty cycle percentage back to the serial terminal. Your program must implement Interrupt service routines. Write the necessary program in Assembly-language for the above functionality using the Keil simulation environment for an 8051AH fitted with a 12MHz XTAL.
An 8051 must be used to control the speed of an electric motor through PWM. The lowest speed
setting requires a PWM output with a duty cycle of 20% and the highest setting requires a duty cycle
of 80%, output on P1.0. The frequency of the PWM signal must be 10 kHz. The change of speed is
indicated by a message received on the serial port, where a “+” increases the speed, and an “-”
decreases the speed. Make sure that your duty cycle remains within these limits. Echo the current duty
cycle percentage back to the serial terminal. Your program must implement Interrupt service routines.
Write the necessary program in Assembly-language for the above functionality using the Keil
simulation environment for an 8051AH fitted with a 12MHz XTAL.
Step by step
Solved in 2 steps