This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TPIC8101 and advance mode

Other Parts Discussed in Thread: TPIC8101

Hi,

    I am currently prototyping a project utilising the TPIC8101.

However, I cannot seem to place the IC into "advanced SPI mode".

This is confirmed by all commands being echoed back the same as they are sent (to be expected in "default SPI mode")

I send the following commands:
#, Request, Response, Description

1, 0b.0111.0001, 0b.0111.0001, // set to "advanced SPI mode"

2, 0b.0100.1100, 0b.0100.1100, // set oscillator to 16 MHz

3, 0b.1110.0000, 0b.1110.0000, // set first channel.

Is there example code on how to get this to work? I am interfacing with another two different SPI ICs on the same circuit, and have no problems with those chips, either sending commands or receiving data.

Some further information:

* /TEST is not connected.

* OUT is not connected.

* INT/HOLD is left low (testing only).

* /CS is placed low before each SPI command, and placed high after each SPI 8-bit command.

* SPI is set to Fosc/64 (where Fosc=16 MHz)

* SPI data from uC is sent on rising edge of SCK, and clock idle state is low. ("SPI mode 0,0")

  • David,

    I am sorry that it took so long to get back to you, I was finally able to sit down and bench test the device today. I am able to enter advanced SPI mode by sending the 0x71 over SDI. I am attaching a screen shot of the /CS, SDI, SDO and SCLK of the transaction that I took. I believe that I can further assist you if you take a oscilloscope capture of you trying to set your device into Advanced SPI Mode. 

    I powered on the device and sent the command above. I do agree with you, in that it appears your device is not entering Advanced SPI mode. Since in advanced SPI mode the SDO lags the SDI by a full command, try writing 0x2A twice and seeing if you receive 0x01 back on SDO.

    Let me know how this works for you,

    John

  • My bad. it does work!

    I have to remember for next time - if it doesn't work, use the logic analyzer.

    On first power up:

    1) send 0x71, receive 0x71

    2) send 0x2A, receive 0x8E

    3) send 0x2A, receive 0x01

    I made a few mistakes in my code:

    1) if statement to check if in advance/default mode did not specifically check if one or the other. it was just "if (...) { ... } else { ... }"

    2) my other debug serial statements printed what I sent, but not what I received.

    3) In advance SPI mode, transmit on falling edge is needed (microchip PIC: CKE=0, CKP=0)

    Thanks John!

  • David,

    Great! I am glad you got it to work. Let me know if you need anything else.

    John