Hello,
I am interfacing with an ADS1248 ADC using an Arduino Mega 2560 via LINX (the current LabView interface for Arduino). The chip is currently mounted on a TSSOP 24 breakout board and peripherals to the chip (capacitors, resistors ect) are breadboarded.
I have established that I can read and write registers. I do however suffer a leading 0 after every register result read back and have to read a second byte to retrieve the last bit. This, however is due to the LINX firmware being buggy and only having SPI mode 0 functional (reading on the rising edge rather than falling).
In reference to the attached schematic, here are register values I have set:
MUX0: Burnout current off, Positive: AIN3, Negative: AIN2
VBIAS: Off for all pins
MUX1: Internal oscillator, Internal reference always on, REF0 Pair selected, External REF0 measurement
SYS0: PGA:128 SPS:5
IDAC0: only DOUT function, 1000uA
IDAC1: First current source: IEXC1, second current source: Disconnected
GPIOCFG: All are AIN
The remaining registers have their default values.
My pseudo-code for reading data is as follows:
1) Start brought high
2) SPI opened and wakeup command given
3) 16 ms delay for start up
4) Stop reading data continuously (SDATAC)
5) Read Data (RDATA)
6) wait for conversion to complete
7) send 32 SCLKs (four NOP commands) -> four instead of the usual three as I have the previously mentioned bit shift of one - so the final bit of the third byte is contained as the first bit of the Fourth byte
The result is now either 0 or 0xFFFFF.
I would be very grateful if you could assist me in locating the issue.
Jack