|
Re: Some things i'm trying to understand on Kevin's Accelerometer Code
The ADC input comes in the form of a high byte and a low byte. In order to copy that over to an integer, you have to copy them separately. The first part has the ADC high byte copied over and then left shifted by 8 bits. This means that the value of the ADC high byte is in the high byte portion of the adc_result variable. Then, the ADC low byte is added in so that both values are there.
Matt
|