Hi, I have noticed when using the ADS8638 that the first couple of reads of the ADC return "junk" data, after that it seems OK.
The command I am sending is 0x0810, which is a manual mode read for channel 1 (register address 4)
The signals look OK on the scope, please see attached.
The return data is at first zero (the bottom trace on the scope), after that the return data is sensible (return code of oxff2 which is about right for that ADC input which is connected to 5V)
The ADC is controlled from a microcontroller over the SPI bus. The microcontroller code is a continuous loop, continually sending the same command every ~ 2 seconds.
Here is the code snippet:
AdcData1 = Ads8638TxRx(ADS8368_SELECT_CHANNEL_1);
sprintf( buffer, "ADC ADDRESS = %x hex\tADC DATA = %x hex\n", (AdcData1 & 0xf000), (AdcData1 & 0x0fff) );
HAL_UART_Transmit(&huart3, (uint8_t *)buffer, strlen(buffer), 0xFFFF);
Here is the serial port debug output:
ADC ADDRESS = 0 hex ADC DATA = 0 hex
ADC ADDRESS = 0 hex ADC DATA = 0 hex
ADC ADDRESS = 1000 hex ADC DATA = ff1 hex
ADC ADDRESS = 1000 hex ADC DATA = ff2 hex
ADC ADDRESS = 1000 hex ADC DATA = ff3 hex
Any ideas of things to check please?
thanks, Nick