Other Parts Discussed in Thread: ADS131E08
Hello,
I am having a problem with the ADS131E04. Internal oscillator on the device is not working. CLKSEL pin is connected to 3.3 V and CLK to GND. Device does not respond at all. If I use an external 2 Mhz clock from some other MCU, device responds. In that case I am able to write and read the registers but the ADC values are wrong (read with RDATA 0x12). If I use internal reference, raw ADC values are around 16777000 and if I use external reference values are just random numbers being constantly changed.
My startup sequence is as follows:
- CLKSEL = 0 (external clock)
- PWDN=RESET=1
- Wait for VCAP
- Issue Reset Pulse
- Configure registers:
masterBuffer.txBuffer[0] = 0x41;
masterBuffer.txBuffer[1] = 0x09; // write 10 registers
masterBuffer.txBuffer[2] = 0x96; // cfg 1
masterBuffer.txBuffer[3] = 0xE0; // cfg 2
masterBuffer.txBuffer[4] = 0xC0; // cfg 3 (internal reference)
masterBuffer.txBuffer[5] = 0x00; // fault
masterBuffer.txBuffer[6] = 0x10; // ch1
masterBuffer.txBuffer[7] = 0x10; // ch2
masterBuffer.txBuffer[8] = 0x10; // ch3
masterBuffer.txBuffer[9] = 0x10; // ch4
masterBuffer.txBuffer[10] = 0x87; // ch5 not used
masterBuffer.txBuffer[11] = 0x87; // ch6 not used
masterBuffer.txBuffer[12] = 0x54; // gpio
masterBuffer.txBuffer[13] = 0x00;
masterBuffer.txBuffer[14] = 0xF0;
- Send Start command (0x08) and SET START PIN to 1
- Read all 216 bits with RDATA and parse the data :
// Response starts from masterBuffer.rxBuffer[1]
uint32_t sts = ((uint32_t)masterBuffer.rxBuffer[1] << 16) | ((uint32_t)masterBuffer.rxBuffer[2] << 8) | ((uint32_t)masterBuffer.rxBuffer[3]);
printf("Status: %X\n", sts);
int ch1 = ((uint32_t)masterBuffer.rxBuffer[4] << 16) | ((uint32_t)masterBuffer.rxBuffer[5] << 8) | ((uint32_t)masterBuffer.rxBuffer[6]);
printf("Ch1: %d\n", ch1);
int ch2 = ((uint32_t)masterBuffer.rxBuffer[7] << 16) | ((uint32_t)masterBuffer.rxBuffer[8] << 8) | ((uint32_t)masterBuffer.rxBuffer[9]);
printf("Ch2: %d\n", ch2);
........
If I want to use internal clock, in the sequence above I only change CLKSEL to 1 and after that, no response from the device. Am I doing it right or wrong? What could be the problem?
Here is the part of schematic:
Thank you in advance.