This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Test ADS1258 GPIOs

Other Parts Discussed in Thread: ADS1258

hi,

I'm on testing an ADS1258.Because i'm not not sure whether the hardware works well and unfamiliar with the operation procedure,i want to make a simple operation on ADS1258 GPIOs.After power-on reset,i do nothing but send two 16-bit data --0x6700 and 0x68FF to ADS1258 sequentially.Why is 0x6700 and 0x68FF.According to the command format,i do the following setting on upper 8 bits(command byte),C2:C0-011(write register commnand),MUL-0(single register acess),A2:A0-7(GPIOC)/8(GPIOD).The lower eight bits constitute the data bytes,setting all GPIOs in output mode and high level.I issued the command and data,but found no changes in the GPIO state.Is my idear above resonable?Is there something important i should pay special attention to while writing driver program?

Regards,

Adam

  • Hi Adam, 

    It may be easier if I list out the steps of how I would power on the ADC and set the GPIO pins high. 

    -First, I would need to send the register write command and enable multiple register access. Make sure that you set the ADC to first write to the GPIOC register. Do all of this by writing command 0x77

    -Now the ADC is set to increment through multiple registers starting at the GPIOC register and count up to the GPIOD register. I would not write 0x00 to set the GPIOC register to have all GPIO pins set as outputs. 

    -Next, the ADC will increment to the GPIOD register. Here, I would write 0xFF setting all of the GPIO pins high. Once this is complete, you can bring /CS high indicating you are complete with writing to the ADC registers.

    It is important to make sure that you have /CS held low the entire time you are writing these commands. Make sure you are reading/writing on the correct edge of SCLK. In the ADS1258, the rising edge is the critical edge that the data latches in. So make sure the input data bits are changing on the falling edge so they can be read on the rising edge. Also, make sure that /RESET and /PWDN are being held high. 

    Regards,

    Tony Calabria

  • Hi,Tony

    Thanks for  your detailed reply.

    I do benefit from your tips.But i'm a little confused about one point --" I would not write 0x00 to set the GPIOC register to have all GPIO pins set as outputs".As i know ,GPIO works in the default input mode after power on.After issuing a write register command like 0x77,should one data byte following 0x77 be sent so that the internal address pointer could count up to GPIOD automatically.I quote one sentence from datasheet --"The ADS1258 automatically increments the register address for each register data byte subsequently read or written." 

    Another,I use an external 32.768k crystal oscillator as the master clock source,then i'm wondering what the fclk value equals,16MHz?

    Regards,

    Adam

  • Hi Adam, 

    If you look at the command byte on page 34 of the data sheet, the byte is broken up into three sections:

    Bits [7:5] control the command

    Bits [4] control the multiple register access 

    Bits [3:0] control the register

    Therefore, writing 0x77 to the ADC triggers three thing; Register write command, Multiple Register Access enabled, and to start at register address 07h (GPIOC). The succeeding eight bits will set the GPIOC register. The ADS1258 will automatically increment the register address so the next eight bits will set the GPIOD register. 

    To answer your second question - using a 32.768k crystal oscillator will create a fclk frequency of 15.729 MHz using an internal PLL circuit. 

    Regards,

    Tony Calabria 

  • hi,Tony

    thanks for your reply.

    Just now i sent  0x77,0x00,0xFF sequentially to ADS1258,I succeeded in setting all GPIOs high.Next,i continuously sent 0x68 and 0x00,intending to set all GPIOs low by setting GPIOD register as ox00,but the result showed that i failed.Then,i cut off the power supply,and powered the board on again,to reset ADS1258. I found all the GPIO pins were on low level.The command i sent before powering off took effect.In conclusion,I can set all GPIOs high easily,but can't set them low .  The data sent to GPIOD register to set GPIO pin low only excecuted after power-on reset.Could you please tell me what the potential problems are?

    Regards,

    Adam

  • Adam, 

    When you power off and back on the ADC, the registers return to their default states. The power on reset state of the GPIO pins is outputs set to low. It is not a case of the command you sent before powering the ADC off taking effect. 

    That aside, writing 0x68 and 0x00 should set the GPIOs low. It may be a case of the DIN signals changing on the wrong SCLK edge. Have you tried writing 0x78 and 0x00 to see if it sets them low. 

    -Tony 

  • hi,Tony

    Thanks for you tips.I modified my program code according to the given timing diagram and made a progress in my project.Another weird phenomenon puzzled me.I write 0x80 to GPIOD register to  set GPIO7 high,and monitored GPIO7 using an oscilloscope,finding that  GPIO7 was set high only for a short time and then back to low level.I just saw a positive pulse. In addition,i connected GPIO7 to the START pin directly without a pullup or pulldown resistor.What's the possible problems?

  • hi,Tony

    Thanks for you tips.I modified my program code according to the given timing diagram and made a progress in my project.Another weird phenomenon puzzled me.Initially,I write 0x80 to GPIOD register to  set GPIO7 high,and monitored GPIO7 using an oscilloscope,finding that  GPIO7 was set high only for a short time and then back to low level.I just saw a positive pulse. On hardware design,i connected GPIO7 to the START pin directly without a pullup or pulldown resistor.

    Next,i cut off the connection between GPIO7 and START pin,and connected START to DVDD manually ,and then tried  programing GPIO7 to high level,but i failed.Further more, i grounded START pin and write 0x80 to GPIOD register.I make it ! GPIO7 was set high successfully.It was the START signal  that impacted the stability of ADS1258. Could you tell me what the possible problems may be?

    Regards,

    Adam

  • Hi Adam, 

    On our EVM board design, we use the GPIO-0 pin to control the START signal without any issues. Take a look at your /RESET signal to make sure it is not going low at any point. If it goes low, it will reset all of the GPIO pins to their initial state of being inputs. You should be able to use the GPIO pins to control the START signal. 

    -Tony

  • hi,Tony

    I'd like to operate ADS1258 in Channel Data Read Direct format.As i know,ADC take this operation as direct data read after detecting three-bit 000 0r 111.

    Then i'm wondering whether data is shifted out immediately on the fourth of SCLK after issued 000 or 111?Wil it work if i send one 8-bit command whith upper 3 bits set to 000 or 111 ,and the rest arbitrary?

    What is the best transition to read data,the rising edge or falling edge?

    Could you give some tips while writing a driver code according to the timing diagram of Channel Data Read Direct (No Command)?

    Regards,

    Adam

  • Adam, 

    The Channel Data Read direct command is shown on page 29 of the data sheet. Writing to the ADC to set it in the correct mode is similar to the procedure used to read back a register. Therefore, you can use the figure on page 30 of the data sheet to see how the converter will behave when the Channel Data Read command is written. You will need to send one 8 bit command with the upper 3 bits set to 000 or 111. Then, the next four bytes (one byte for STATUS byte and three for the 24 bits of converted data) will correspond to the converted data. 

    The rising edge is the critical edge of SCLK for this ADC. Therefore, you will want to set the polarity and phasing so that the clock idles low and the data changes on the falling edge of SCLK. The rising edge of SCLK is when the data is latched into the converter.  

    Post any further questions you have as you start writing the driver code and I will try to help you out.

    Regards,

    Tony Calabria