Dear community,
I am having real trouble trying to switch from the sinc5 filter to the wideband filter on the AD7768-8. Firstly I want to confirm that the code below works perfectly when using the sinc5 filter (CHANNEL_MODE_B_ADDR ((uint8_t)0X02); the value of 0b00001000;), so it is unlikely a coding issue but rather an instruction/protocol issue.
- I can confirm that I am writing to the channel mode register correctly as I am reading back the correct values.
- I am writing to: CHANNEL_MODE_B_ADDR ((uint8_t)0X02); the value of 0b00000000;
- This should set the filter to the wideband filter and the decimation to be x32 according to the datasheet. I can confirm that reading this register back does indeed give me 0b00000000.
- I can also confirm that I am using the right channel mode (channel mode B). i.e. register 0x03 is set to 0b11111111.
- I am writing to: CHANNEL_MODE_B_ADDR ((uint8_t)0X02); the value of 0b00000000;
- In terms of the electrical connections
- SYNC_OUT is directly connected to SYNC_IN.
- The START pin is connected to the micro (PSoC 6) and sends a 'start' signal after setting the register (above):
- Cy_GPIO_Pin_FastInit(ADC_START_PORT, ADC_START_PIN, CY_GPIO_DM_STRONG, 1, HSIOM_SEL_GPIO); // this drives it out: HSIOM_SEL_GPIO
Cy_SysLib_Delay(5);
Cy_GPIO_Write(ADC_START_PORT, ADC_START_PIN, 0);
Cy_SysLib_Delay(5);
Cy_GPIO_Write(ADC_START_PORT, ADC_START_PIN, 1); - I can confirm that I can see this signal on the scope and is being send correctly to the ADC
- Cy_GPIO_Pin_FastInit(ADC_START_PORT, ADC_START_PIN, CY_GPIO_DM_STRONG, 1, HSIOM_SEL_GPIO); // this drives it out: HSIOM_SEL_GPIO
- I have also tried to 'sync' the filter change using the SPI method using the following code
-
// First reset the ADC
ctrl_buffer.binaryValue = DATA_CTRL_SYNC_0;
tx_buffer[0] = (ctrl_buffer.address << 8) | ctrl_buffer.binaryValue;
adc_spi_writeburst(&tx_buffer[0], 1);
Cy_SysLib_DelayUs(5000);ctrl_buffer.binaryValue = DATA_CTRL_SYNC_1;
tx_buffer[0] = (ctrl_buffer.address << 8) | ctrl_buffer.binaryValue;
adc_spi_writeburst(&tx_buffer[0], 1); - where:
- #define DATA_CTRL_ADDR ((uint8_t)0x06); // DATA CONTROL: SOFT RESET, SYNC, AND SINGLE SHOT CONTROL REGISTER
- #define DATA_CTRL_SYNC_0 0b00000000; // First send this for SYNC
#define DATA_CTRL_SYNC_1 0b10000000; // Then send this for SYNC
-
Unfortunately, I do not get any data out on the DOUT0 and DOUT1 pins when doing this while I get the data clocking out perfectly when the sinc5 filter is selected. Any advice would be much appreciated.