Hello Everyone
I designed a board that gets 24 Bit ADC data from external ADC using SPI communication. SSIClk runs on 8MHz and my MCU sends 4 MHz clock from PWM pin to ADC clock pin input and output data of external ADC is 3.4 kbps. I use Freescale SPI Mod(1,1) four wire communication.
I sample 50Hz pure sin wave. After proper communication, I can get 24-bit ADC data. MSB bit is signed bit in 24-bit frame. But sometimes I get wrong data or I missing data. I keep ADC data in one test buffer to observe my sine wave. As you can see in below picture, ADC data suddenly drops to minus value and continue with it.
Y-axis is RMS value of 50 Hz pure sine wave. It is only per some scale of raw 24 bit ADC data.
I checked my Chip Select signal which initiates and teminates communication between ADC on oscilloscope. It is as expected.
I get ADC data with interrupt. I also checked it. It is as expected too. I dont know where I'm going wrong.
Any help will great for me.
Thanks in advance