View Single Post
  #2   Spotlight this post!  
Unread 03-02-2005, 11:47
Unsung FIRST Hero
Matt Leese Matt Leese is offline
Been-In-FIRST-Too-Long
FRC #1438 (The Aztechs)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1998
Location: Long Beach, CA
Posts: 937
Matt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond repute
Send a message via AIM to Matt Leese
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