Part Number: ADS1178
Dear all,
I did an aprentice project in my company and have some trouble with getting data out of my ads1178. I use the SPI interface in TDM Fixed position and an Arduino MEGA2560 to bitbang the spi interface. Vref is 2.5 V and Vcc is 5 V. I use all channels and clock the ADC at 250 kHz as I do not need a high data rate.
The Problem is as following. I Measure 2.49 V at the differential inputs. As per my Understanding, the ADC should be capable of measuring up to 5 V at its differential pins. The Scope shows a bit value of around 1120DEC with an differential input Voltage of 2.45 V. That would leave no Headroom for a higher Voltage than, say, 2.5 V. My Arduino interface also gives me the bitmask my Scope is showing so I assume its working as intended so I am missing something.
Arduino Code
The following code does the bitbanging:
void DataRead()
{
for (int n = 0; n < 128; n++)//Runs loop 128 times to catch 128 bit
{
digitalWrite(52, HIGH);//Set SCKL to high
delayMicroseconds(25); //Wait 25uS
digitalWrite(52, LOW);//Set SCKL to low, data is shifted out afterwards by ADC
//delayMicroseconds(5); //Wait 5 uS
DataBits[n] = digitalRead(50); //Read Dout pin of ADC and write in to an bool array
delayMicroseconds(15);//Wait til SCKL is put high again
}
I then calculate the voltage from the DEC vals to Voltages as per:
Voltage = DecVal * LSB; // Conversation to Voltage with LSB= 2.5 V / 2^15
Voltage = Uref-Voltage;// Setting the Value in Relation to Uref, Uref=2.5 V
And those are not making any sense. I expect a DEC Value of around 16 kDEC (Half input Range of 5 V total with 2.5 V input with 32 kDEC range) but I am getting more around 1100DEC, on the Scope as well as in Code. I am running out of Ideas and would like to ask if someone has Experience with this ADC one could share or sees an mistake I may have made in my Schematic/Code. I think I misunderstood something but I cant put my finger on it for the life of me.
Schematic of ADC:
I hope they are readable, thanks in Advance for taking Time on this!
