How Do I Set Up the Promira Serial Platform to Run an Async Queue or a Sync Queue to write and read to an SPI Device?
Question from the Customer:
I'm trying to use the Promira Serial Platform to write and read to SPI devices: one with an async queue, and another with a sync queue. Can you provide examples to do this?
Response from Technical Support:
Thanks for your question! The Promira Software API I2C/SPI Active is just the software you are looking for to run an async queue or a sync queue with the Promira platform. The Promira API supports multiple OS (Windows, Linux, and Mac), multiple languages (C, Python, Visual Basic, and C#) and the customizable setup will help you with your write/read goals. Following are some queuing examples that are provided with the Promira API as well as a few other functions you may find helpful.
Figure 1: Promira Serial Platform
Listed below are the queuing examples that are provided with the Promira API. Examples for other functions are also provided.
API Examples for Async Queue:
- lights_queue: Flash LEDs attached to a Philips PCA9554D I/O port expander as found on the Activity Board.
- spi_eeprom_queue: Read from or write to an SPI serial EEPROM, such as the Atmel AT25080A found on the Activity Board.
API Examples for Sync Queue:
- detect: Detect Promira platforms attached to the system.
- lights: Flash LEDs attached to a Philips PCA9554D I/O port expander, which is on the Activity Board.
- i2c_eeprom: Read from or write to an I2C serial EEPROM, such as the Atmel AT24C02, which is on the Activity Board.
- spi_eeprom: Read from or write to an SPI serial EEPROM, such as the Atmel AT25080A, which is on the Activity Board.
- i2c_file & i2c_slave: Demonstrate the I2C slave functionality of the Promira platform. This example requires two Promira platforms.
- Run i2c_slave with the first Promira platform to wait for a new slave transmission.
- In another shell, run aai2c_file to transmit a binary file with the second Promira platform.
- spi_file & spi_slave: Demonstrate the SPI slave functionality of the Promira platform. This example requires two Promira platforms.
- Run spi_slave with the first Promira platform to wait for a new slave transmission.
- In another shell, run aaspi_file to transmit a binary file with the second Promira platform.
- gpio: Perform some simple GPIO tests with a single Promira platform. The results can be verified using an oscilloscope or a multimeter.
You can click and download these API examples here.
For additional information about API, please refer to section 5 of the Promira Serial Platform User Manual. For additional information about queuing data and commands, please refer to section 5.5.3.
Additional resources that you may find helpful include the following:
We hope this answers your question. If you have other questions about our host adapters or other Total Phase products, feel free to email us at sales@totalphase.com, or if you already own one of our devices and have a technical question, please submit a request for technical support.