• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Data Converters » Precision Data Converters » Precision Data Converters Forum » ADS8328 DATA READING PROBLEM
Share
Precision Data Converters
  • Forum
  • Files
  • E2E Wiki
Options
  • Subscribe via RSS
Check out
The Signal blog
  • $core_v2_blog.Current.Name

    Handy Gadgets and Resistor Divider Calculations

    Posted 5 days ago
    by Bruce Trump
    Handy gadgets make our engineering life easier—the little...
  • $core_v2_blog.Current.Name

    Chopper Op Amps—are they really noisy?

    Posted 13 days ago
    by Bruce Trump
    Chopper op amps offer very low offset voltage and dramatically...
  • $core_v2_blog.Current.Name

    Bypass Capacitors… yes, but why?

    Posted 26 days ago
    by Bruce Trump
    Everyone knows that op amps should have power supply bypass capacitors...

Forums

ADS8328 DATA READING PROBLEM

This question is answered
RAM LODH
Posted by RAM LODH
on Apr 03 2012 02:22 AM
Prodigy140 points

i have modified my  GET_ADC_DATA function now iam getting value  for single channel , channel zero ,how to read adc value for second channel, Please help here is my code

1)I have enabled TAG bit ,i never get TAG BIT=1 , I always get TAGBIT=0;

2)I configure cfr with bit pattern but when i read  CFR register it not gives same pattern as write. ,I always get D0=0  system reset .

3)my adc data for CH0 is not proportional to the input applied .

I AM ATTACHING SCOPE SCREENS IN DIFFERENT POST BECAUSE IAM ANBLE TO ATTACH IN SAME POST. 

 CFR DATA WRITE AND READ 

  WRITE CFR   BITS AFTER   
  BITS READ CFR  
D15 COMMAND3   1 0  
D14 COMMAND2   1 0  
D13 COMMAND1   1 0  
D12 COMMAND0   0 1  
D11 Channel mode AUTO         1 0 MANNUAL
D10 CONVERSION CLK SCLK      INTERNAL 0 0 INTERNAL
D9 TRIGGER SELECT AUTO 0 0 AUTO
D8 DON’T CARE 0 0 1 1
D7 EOC/INT POLARITY ACTIVE LOW   1 1 ACTIVE  LOW
D6 EOC/IN SELECT EOC                  1 1 EOC
D5 CHAIN MODE DISABLE 1 1 DISABLE
D4 AUTO NAP DISABLE 1 1 DISABLE
D3 NAP PWR DOWN DISABLE  1 1 DISABLE
D2 DEEP PWR DOWN DISABLE 1 1 ENABLE
D1 TAG BIT ENABLE 1 1 ENABLE
D0 RESET NORMAL 1 0 SYSTEM RESET
0XE8FF 0X11FE

my code

void ads8328_ini(void) //CONFIGURE  CFR
{
seventeenth_clk=0 ;
GPIO_WriteBit(SPI_CLK_PORT, SPI_CLK_PIN,(BitAction)0);
GPIO_WriteBit(ADC_STRT_PORT,ADC_STRT_PIN,(BitAction) 0);

GPIO_WriteBit(SPI_NSS_PORT,SPI_NSS_PIN,(BitAction) 0);
ADC_CONFIG =0xE8FF ;

WRITE_ADC8328(ADC_CONFIG) ; //WRITE CFR
SPI1_Buffer_Rx[4]=GET_DATA_INT ;
GPIO_WriteBit(SPI_NSS_PORT,SPI_NSS_PIN,(BitAction) 1) ;
/////////////////////////////////////////////////////////////////////////////////////
delay_us(10);
GPIO_WriteBit(SPI_NSS_PORT,SPI_NSS_PIN,(BitAction) 0) ;
WRITE_ADC8328(READ_CFR) ; //READ CFR
SPI1_Buffer_Rx[5]=GET_DATA_INT ;

GPIO_WriteBit(SPI_NSS_PORT,SPI_NSS_PIN,(BitAction) 1) ;
delay_us(10);
// select_ch0();

}

//////////////////////////////////////////////////////////////////////////////
void adc_read_ch_auto(void)
{
seventeenth_clk=1 ;
GPIO_WriteBit(ADC_STRT_PORT,ADC_STRT_PIN,(BitAction) 1) ; //start 1

GPIO_WriteBit(SPI_NSS_PORT,SPI_NSS_PIN,(BitAction) 1) ; //nss1

temp_bit=1 ;
//while(temp_bit==1) //check EOC pin status
temp_bit = GPIO_ReadInputDataBit(ADC_EOC_PORT, ADC_EOC_PIN) ;

delay_us(1);//20ns

GPIO_WriteBit(SPI_NSS_PORT,SPI_NSS_PIN,(BitAction) 0) ; //nss0


WRITE_ADC8328(READ_DATA) ; //READ CH0 DATA
if(TAG_BIT == 0) //TAG BIT=0 ;
{
SPI1_Buffer_Rx[0] = GET_DATA_INT ;
}

else if(TAG_BIT == 1) //TAG BIT=1 ; //READ CH1 DATA
{
SPI1_Buffer_Rx[1] = GET_DATA_INT ;
}


ADS8328 CHANNEL2 READING PROBLEM
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • RAM LODH
    Posted by RAM LODH
    on Apr 03 2012 02:25 AM
    Prodigy140 points

    ADS8328 CHANNEL2 READING PROBLEM
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • RAM LODH
    Posted by RAM LODH
    on Apr 03 2012 02:26 AM
    Prodigy140 points

    ADS8328 CHANNEL2 READING PROBLEM
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • RAM LODH
    Posted by RAM LODH
    on Apr 03 2012 02:30 AM
    Prodigy140 points

    ADS8328 CHANNEL2 READING PROBLEM
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • RAM LODH
    Posted by RAM LODH
    on Apr 03 2012 02:36 AM
    Prodigy140 points

    ADS8328 CHANNEL2 READING PROBLEM
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Tom Hendrick
    Posted by Tom Hendrick
    on Apr 04 2012 14:10 PM
    Verified Answer
    Verified by Tom Hendrick
    Guru86190 points

    Hi Ram,

    You are not reading the CFR properly.  MOSI and MISO are both valid on the falling SCLK edge and it seems as though you are using the rising clock edge to try and read back the CFR - your read is correct if you shift everything (0x11FE >>1 is 0x08FF).  Your SCLK speed is roughly 40kHz, so the SDO from the ADS8328 is going to look like it should be read on the rising clock, but if you zoom in very close, you will see that you have at least td(SCLKF-SDOINVALID) time to read the output data.  At full speed on the SCLK, the output data will look like it has the same clock phase relationship as the input data has.

    When configured for Auto Trigger, you have to be able to read data from the ADS8328 at its maximum speed (500KSPS).  By your scope_5 picture, it seems as though you are reading at ~1.4kSPS - that is why your EOC looks somewhat erratic - you are actually reading in-between sample/conversion cycles.   If you cannot speed up your processor to the point where you can sustain 500KSPS, you'll have to use the part in Manual Trigger mode.

     

    Regards,

    Tom

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use