Part Number: ADS1255
Hello Texas Staff
Sorry to bother you.
I am the entry level electrical engineer. I met the problem of coding the ADS1255 and cannot find the solution.
My test circuit is following your datasheet Figure.25 but with arduino control.
My connection is AIN0 to Signal Generator BNC Red (1kHZ,5V SinWave) AIN1 to Signal Generator BNC Black.
SCLK to CS is connected to Arduino SPI and Control. RESET is connected to Arduino to reset the ADC. VREFP is used DC power supply 2.5V
All any others are same as Figure display.
My problem is how to code this ADS1255. I have one code which is uploaded in the file (Arduino IDE). Please check it.
I check the Arduino IDE output. I got Sinwaves but if I changed the Sinwaves to Triangle or other waveform, it always came out SinWaves
And the amplitude of waveform is also not correct. I want to input Sinwaves and get the same waveform Sinwaves.
For coding problem----------
1) How to write register? is the following code is correct?
276 -SPI.transfer(0x50 | status_reg);
277 -SPI.transfer(0x00); // 2nd command byte, write one register only
2) In code, each delay is correctADS1255 Arduino Code.docx or need to make adjustment?
3) how to convert the Hex code to my real measuring voltage
if(adc_val > 0x7fffff){
adc_val = (16777215ul - adc_val) + 1; //do 2's complement
}
Serial.println(adc_val*PGAmulti_1,10);
Thanks very much

