ts-7000
[Top] [All Lists]

[ts-7000] ADC problem, working on ts-7395 with Cirrus EP9302

To:
Subject: [ts-7000] ADC problem, working on ts-7395 with Cirrus EP9302
From: "sangelion" <>
Date: Tue, 19 Jan 2010 23:33:14 -0000
I try to compile the ts-7250 program and does not get the exact value as the 
power supply value.. 

Power supply ---> SBC
0.0V ---> 1.567V
1.0V ---> 2.158V
2.0V ---> 2.745V
3.3V ---> 3.430V               

Why the full scale need to add with 0x10000?
What is the value 2.5? and is't 3.3 is the Vref?
Why is 0x10000, 0x7000, 0x9E58 and 0xC350 functions?


read_7xxx_adc(adc_result);

        if(virgin == TRUE)
                printf("No calibration values found...\n");
        else
                printf("Board has been calibrated by Technologic Systems...\n");


        //Convert to voltage
        for(i = 0; i < 5; i++)
        {
                avg = 0;
                
                full_scale = (((((double)(stored_cal[i][1] + 0x10000) 
                        - stored_cal[i][0]) / 2.5 ) * 3.3 )); 

                for(j = 0; j < 10; j++)
                        avg = adc_result[i][j] + avg;

                avg = avg / 10;
                        
                if(avg < 0x7000)
                        avg = avg + 0x10000;

                if(virgin == TRUE)  //use approximation
                {
                        avg = avg - 0x9E58;
                        val = ((double)avg * 3.3) / 0xC350;
                }
                else                //use calibration values
                {
                        avg = avg - stored_cal[i][0];
                        val = ((double)avg * 3.3) / full_scale;
                }
        
                printf("Channel %d: %3.3fV\n", i, val);
        }



------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

<Prev in Thread] Current Thread [Next in Thread>
  • [ts-7000] ADC problem, working on ts-7395 with Cirrus EP9302, sangelion <=
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU