Unformatted text preview: this using the bit_count
recv_ch = recv_ch |(bit<<bit_count);
//If all data bits have been received then set the recv flag
recv_flag = 1; }
} Question 2: Timer Accuracy (10 pts) A laser that works similar to your Lab 7 Ping sensor is used to measure the distance to the Moon from Earth. The laser is fired at a mirror placed on the Moon, and a sensor attached to the laser detects when the reflection arrives back to the laser. As shown below. This is similar to an actual method used for measuring the Earth- Moon distance, see: http://en.wikipedia.org/wiki/Lunar_Laser_Ranging_experiment Name: Lab Section: When the laser is activated, TIMER1’s Input Capture pin is set to a 1. When the sensor detects the reflection, this pin is set to 0. A program has been written that uses Input Capture to compute the distance...
View Full Document
- Spring '09