Question: Write an assembly program that controls LED brightness proportional to the slope of the accelerometer's Y - axis. Its X - axis must be parallel

Write an assembly program that controls LED brightness proportional to the slope of the accelerometer's Y-axis. Its X-axis must be parallel to the Earth surface (+/- reasonable tolerance). If the X-axis is not parallel to the surface, the LED brightness must not be modified. Thus, horizontal board position (with the blue light on it facing up) corresponds to the minimum LED brightness and its vertical position (with the USB connector facing down) corresponds to the maximum LED brightness. Implement periodic accelerometer reading every approx. 100 msec provided by TIMER0 timer and use LETIMER to control LED brightness. Make sure to handle TIMER0 event in NVIC.

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!