I2C SPI USB CAN eSPI Cable Testing View All Quick Start Guides User Manuals Software Downloads Knowledge Base Videos Case Studies App Notes White Papers Sales Support About Us
Products Blog Sales Support Contact Search
How Can the Promira Serial Platform's GPIO be Used as Data Lines for non-SPI Devices?
Rena Ayeras

Question from the Customer:

We’re considering purchasing the Promira Serial Platform with SPI Active - Level 1 Application. We like the USB connectivity, Labview support, and adjustable voltage features - now we have some questions about GPIO.

  • Can we use GPIOs on Promira as data lines?
  • Our application is not SPI; we are looking for one CLK output and 5 or 6 Data outputs synchronized by the CLK.
  • With SPI Active - Level 1, one transaction is 1Mbits per output data line
Response from Technical Support:

Thanks for your questions! Using the Promira Software API, you can manually generate a clock. A separate clock is not provided for GPIO. To manually set the clock simply use the Promira Software API command ps_queue_gpio_set(): toggle the pin with 0 and 1 to create clock pulses. The speed of the clock depends upon the end user system's execution speed.  Here is an example of generating a clock with a 50% duty cycle:

  1. ps_queue_gpio_set(queue, STATE0)
  2. ps_queue_delay_ms(queue, on_time_in_ms)
  3. ps_queue_gpio_set(queue, STATE1)
  4. ps_queue_delay_ms(queue, off_time_in_ms)

Repeating that series of time will generate the clock pulses. For a  50% duty cycle, on_time_in_ms = off_time_in_ms.

The STATE0 and STATE1 parameters are set in terms of bitmasks of the available GPIOs. With Promira  configured with SPI level 1, you can use up to 6 GPIOs [pin 1, 3, 9, 14, 15, 17] (or 2 GPIOs [pin 1, 3] when SPI is configured in your code simultaneously)

Please note, there are speed limitations. The switching speed of GPIO pins depends on the time of the line-by-line execution of your script. The overhead of the Operating System may add to the delay. There is also a latency caused by the Ethernet/USB link between the computer and the Promira platform.

The bitrates set for SPI/I2C has no effect on the GPIO pin switching.

We hope this answers your question. Additional resources that you may find helpful include the following:

If you have questions about our 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. You can also request a demo designed to specifically address your needs.

Request a Demo