Dear Hall,
Christopher Hall (1528318) My adc working fine, but i have problems writing in the register yet still I'm able to get the converted data. Please check my previous comment. I got 3 questions to be addressed. Kindly help me with the same. waveshare adc
Question 1: The values which I'm writing in the status, adcon, drate registers doesn't match with the values which I read after 100ms in the same registers.
But the values which I write in the MUX register matches and I've verified it by varying dynamically. Kindly help me with the problem.
Question 2: The drate value defaults to 0xF0(since drate value is not updating when I write on it) which is 30ksps and I've verified that value with my drdy signal in an oscilloscope.
The problem is when I give an input as sinusoidal signal of frequency 1Hz(time period = 1sec) I get only 2.8k samples for a sec.
My assumption is that if I set as 30ksps then for a sine wave with time period of 1sec should get 30k samples, but when I read the samples I get only 2.8k samples. I've set my spi clock frequency is 2MHz. Please correct me if I wrong.
What should I do to achieve at least a minimum of 10k samples ?
Question 3: How to use RDATAC command? If possible share a snippet of your code that involves rdatac command. Should I check for the drdy signal to go now or will update automatically?