--- In "Eddie Dawydiuk" <> wrote:
> Hi Chris,
>
> > Here is the output I get from executing the posted code:
> >
> > Calibration Values =
> > [ 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 ]
> > Board has been calibrated by Technologic Systems...
> > Channel 0: 2.500V
> > Channel 1: 2.500V
> > Channel 2: 2.500V
> > Channel 3: 2.500V
> > Channel 4: 2.500V
> >
> > This output is shown everytime. The code says that if the sample is
> > below a certain amount, to add 0x10000 to the sample, which explains
> > the 2.5V reading from samples of 0V.
>
> Sorry I should have reviewed that code before posting it, the ADC wasn't
> being initialized... The fact that your calibration values are
reading all
> zero's is very odd. I would expect them to be 0xFFFF (if your board
hasn't
> been calibrated) or some valid calibration values(0x0 isn't a valid
> calibration value). Anyways, get the updated code then if you still see
> 0x0 for all of your calibration values then comment out the following
> lines
>
> if(buffer[i] != 0xFF)
> virgin = FALSE;
>
> //Eddie
Files with the "updated" code still dated 26 April ... seems no changes.
Also, condition :
if(virgin == TRUE) //use calibrated value
....
seem to have logic or comments swopped ?
Tony
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|