Is there a way I can use the Aardvark I2C/SPI Host Adapter to program a microwire device? Here is a summary of device requirements:
For example, the write command has 29 clock cycles on the device being programmed. What complicates the programming is if the device does not detect the expected number of clocks, the operation is terminated. It looks like I cannot just pad the command with 0s.
What do you recommend?
Response from Technical Support:Thanks for your question! Essentially, the Aardvark I2C/SPI Host Adapter interfaces with a microwire device in the same manner as a regular SPI device. The only difference is the labeling of the pins. We will start is a summary of how the Aardvark adapter works, then follow through with two recommendations.
In summary, the Aardvark adapter can transfer up to 8 bits data without td delay. However, there will be a td delay when transferring 16 bits (or more) of data.
The delay between each byte of data sent is due to the characteristics of the Aardvark adapter. For more information, please refer to section SPI Signaling Characteristics of the Aardvark I2C/SPI Host Adapter User Manual
Here is a basic example of writing two 8-bit bytes AB CD in the transaction log of the Control Center Serial Software, and then submit send: assert SS, send AB CD, de-assert SS.
In this case, there will be gaps in the middle, but it is still a single transaction with the slave select (SS) asserted at the beginning and de-asserted at the end. There will be a delay between each byte of data sent because of the signaling characteristics of the Aardvark adapter.
You may be able to use padding, but it would occur before the first transmitted bit:
The caveat is this could work if the device is not affected by the 9 µs setup time between bytes. If that timing is an issue, then we have another recommendation.
For your application, to send multiple bits in a single transaction, we recommend using the Promira Serial Platform. This device can be licensed with SPI Level 1 / SPI Level 2 / SPI Level 3 Application(s) as needed for your requirements.
The default is 32 bits per word. However, the word lengths can be configured by using the Promira Software API I2C/SPI Active to fit program in word lengths other than multiples of 8. This way, words would be transmitted without the 9 µs inter-byte delay of the Aardvark adapter.
The API supports multiple operating systems and programming languages. In addition, example programs are provided that can be used as-is or modified as needed. For more information, please refer to the section API Documentation of the Promira Serial Platform I2C/SPI Active User Manual.
We hope this answers your question. Additional resources that you may find helpful include the following:
If you want more information, feel free to contact us with your questions, or request a demo that applies to your application.