AnsweredAssumed Answered

AD9914: Chip ignores SPI

Question asked by RedstoneTTL on Jan 12, 2017
Latest reply on Mar 28, 2017 by RedstoneTTL

HI

 

When trying to communicate with my AD9914 the chip seem to ignore my clock (SCLK, MPIO1) and data (SDIO, MPIO2). These two are the only lines connected. An oscilloscope makes the data visible, the microcontroller (atxmega) works. CS, EXTPDCTL-BUF, RESET-BUF and DRHOLD-BUF are set to gnd by jumper. P203, P204 and P205 are set to disable. IOCFG-pins are set to 1000 for serial communication

 

I tried to send Adress 0x07 and 32 bits of data with the code down below. I could not  verfiy their arrival. Is there any possibility from hardware side?

When sending the adress 0x07 an the MSB  for a read instruction nothing comes back. It seems like the slave (the Ad9914) doesn't exist at this point.

 

Can you see any problem with this configuration? Did i miss something important?

 


TWIF.MASTER.ADDR = TwiSlave; // Send address
while(!(TWIF.MASTER.STATUS & TWI_MASTER_WIF_bm)); // Wait for TWI to be idle again

uint8_t i = 0;
do { // Send one byte to TWI slave -->Send TWI data
TWIF.MASTER.DATA = twi_data[i]; // Send byte
while(!(TWIF.MASTER.STATUS & TWI_MASTER_WIF_bm)); // Wait for TWI to be idle again
i++; } while (i<TWIM_WRITE_BUFFER_SIZE);

Outcomes