Hi All,
I am testing ADS1241 chip and would like to simply write to its registers and read the register back to confirm . I am using the following code based on RREG description on page 19 of the data sheet. The data timing shows a 4nS delay time between write and read register command. I'm not getting 0 back instead of 33 from the register. I would appreciate your feedback.
Thanks,
Hamid
int MUX0REG; spi.write(0x51); // write to MUX regiter spi.write(0x00); // number of regs - 1 spi.write(0x33); // Ain0 (write 0 so we can read ch0 back) spi.write(0x11); // read mux register back spi.write(0x00); // number of regs - 1 wait(0.004); MUX0REG = spi.write(0x00); // number of reg - 1 pc.printf("\r\nmux0reg = %x \r\n", MUX0REG);