1
\$\begingroup\$

I try to establish a communication with the TM4C123GXL and the AD9826. For the communication I use the SPI interface of the TM4C123GXL. The SSI Rx and Tx are connected via a 3 kOhm resistor.

The AD9826 requires the following timings. Serial Read Operation Timing AD9826

With the SPI peripheral from TM4C123GXL I generated the following timings, where blue = clock, turquoise = data and purple = sload

Tektronix DPO3034 Screenshot

Unfortunately I do not get a response from the AD9826 or rather it is wrong. I try to read the content of the configuration register which has the address 0x000. So by adding the address bit it would be 0x1000000. The response which I expect would be 11111000 - which is the default value for the configuration register.

So this raises the following questions to me.

  1. Does the AD9826 need a continuous clock? (This would be a problem, as the TM4C123GXL SPI peripheral cannot provide it).
  2. Is this three wire "SPI" a SPI kind of communication? (For me it looks like the MICROWIRE frame format)
  3. Any idea what I am doing wrong?
  4. Is the read bit high or low? I assumed that it is high from the picture below. There is no further indication in the datasheet. enter image description here
\$\endgroup\$

2 Answers 2

1
\$\begingroup\$

There is a mixup in the addressing of read and write operations.

The first bit is the R/Wb bit and it is low so you are doing a serial write operation to address 100 in binary. For a read operation the R/Wb bit would be high.

\$\endgroup\$
3
  • \$\begingroup\$ Thanks, unfortunately it still does not work. Is it by convention that the write bit is usually one and the read bit is usually zero? I extended my question regarding the write and read bit. \$\endgroup\$
    – Johannes
    Oct 6, 2021 at 10:49
  • \$\begingroup\$ @Johannes According to what convention? There is no convention. The chip datasheet just says this chip works like this. Read is high, write low. \$\endgroup\$
    – Justme
    Oct 6, 2021 at 11:04
  • \$\begingroup\$ you're right. I shifted the bit and it looks good now. thx \$\endgroup\$
    – Johannes
    Oct 6, 2021 at 11:44
1
\$\begingroup\$

Justme is right. The first bit of the data signal must be shifted to the left, so that it aligns with the first clock pulse.

After some investigations I can answer the following.

  1. Does the AD9826 need a continuous clock? (This would be a problem, as the TM4C123GXL SPI peripheral cannot provide it).

Serial clock can be turned off if no read or write operation is done. (see Analog Devices Engineering Zone)

  1. Is this three wire "SPI" a SPI kind of communication? (For me it looks like the MICROWIRE frame format)

For the TM4C123GXL the Motorola Freescale Frame Format must be used (see initialization code below)

        SSI2_CR1_R &= ~SSI_CR1_SSE;
        SSI2_CC_R = 0; // using system main clock
        SSI2_CR0_R |= (scaler<<SSI_CR0_SCR_S); 
        SSI2_CPSR_R |= clkDivider;
        SSI2_CR0_R |=  SSI_CR0_FRF_MOTO; // Motorola Freescale Frame Format
        SSI2_CR0_R |= SSI_CR0_DSS_16; // 16 Bit data
        SSI2_CR1_R |= SSI_CR1_SSE;
  1. Any idea what I am doing wrong?

    Apart from setting the bit on the wrong position, I selected the wrong frame format.

  2. Is the read bit high or low? I assumed that it is high from the picture below. There is no further indication in the datasheet.

    Read bit is high.

In addition I can share the following outcomes.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.