# Timed /synchronized GPIO pins for external device control

**URL:** <https://discourse.myriadrf.org/t/timed-synchronized-gpio-pins-for-external-device-control/7518>\
**Category:** LimeSDR\
**Created:** [7 February 2022 23:51 UTC](https://discourse.myriadrf.org/t/timed-synchronized-gpio-pins-for-external-device-control/7518 "2022-02-07T23:51:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nevetts](https://avatars.discourse-cdn.com/v4/letter/n/7bcc69/32.png) [@nevetts](https://discourse.myriadrf.org/u/nevetts)\
**Post date:** [7 February 2022 23:51 UTC](https://discourse.myriadrf.org/t/timed-synchronized-gpio-pins-for-external-device-control/7518/1 "2022-02-07T23:51:37Z")

</div>

I am looking for a way to trigger / actuate some external RF switches, amplifiers etc with the GPIO pins on the LimeSDR USB. I need this to be well synchronized with the RF streams.

There are some older posts about this, but I can’t find anything recent or with a clear solution. Is this a feature the Lime has? Or will ever have?

> [@Synchronize two LimeSDR](https://discourse.myriadrf.org/t/synchronize-two-limesdr/1714/71):
>
> My solution is not pretty. I bought a cable that has the right connector for the GPIOs on both ends and cut it in half. There are things like this; [https://www.adafruit.com/product/2094](https://www.adafruit.com/product/2094) that might make it prettier. I have some vague recollection of spotting a cable with a 10 pin 0.05" connector at one end and an 0.1" 10 pin connector at the other, but even that wasn’t going to be great.

> <https://github.com/myriadrf/LimeSuite/issues/149>
>
> Just wanted to ask if such enhancement (reading/writing GPIO at specific hardwar…e time, preferably accessable via SoapySDR API) would be possibile? It would be very helpful e.g. when implementing half duplex systems - I know at which hardware time I want to transmit and receive, but would like to set GPIO controlling RF switch at these moments.

> [@Harmonic operation](https://discourse.myriadrf.org/t/harmonic-operation/849/6):
>
> Also with a lot of radio amateur use there will be a single antenna, with TX and RX on the same frequency and the need for PTT switching. I believe that a popular API for apps with this on Windows is ExtIO. Sounds like we need to schedule the work required to support both these use cases, plus perhaps other non-TX/RX switching uses. Given there are multiple GPIOs, some could be used for switching in/out external filters and amplifiers etc. also. So some simple mechanism for just toggling GPIOs …

---

<div class="post-metadata">

**Author:** ![cmichal](https://avatars.discourse-cdn.com/v4/letter/c/8e7dd6/32.png) [@cmichal](https://discourse.myriadrf.org/u/cmichal)\
**Post date:** [8 February 2022 00:11 UTC](https://discourse.myriadrf.org/t/timed-synchronized-gpio-pins-for-external-device-control/7518/2 "2022-02-08T00:11:25Z")

</div>

This has been done. See: doi:10.1063/1.5127746

---

<div class="post-metadata">

**Author:** ![andrin](https://avatars.discourse-cdn.com/v4/letter/a/8e7dd6/32.png) [@andrin](https://discourse.myriadrf.org/u/andrin)\
**Post date:** [10 February 2022 07:27 UTC](https://discourse.myriadrf.org/t/timed-synchronized-gpio-pins-for-external-device-control/7518/3 "2022-02-10T07:27:07Z")

</div>

I just put some recent gatewares here, including also GPIO extension for 16 bit TX samples in the WFM player and some description how to update the gateware:  
[https://sourceforge.net/projects/limr/files/20220209\_newer\_gatewares/](https://sourceforge.net/projects/limr/files/20220209_newer_gatewares/)

The newest 2.24 gatewares are not tested, since I am ‘stuck’ with an older operating system. Given the sparsity of changes, however, I would be surprised if it doesn’t work out-of-the-box.

I currently most often run the lime in pure TX mode, providing continuous-wave microwaves with modulation and modulation reference frequency for synchronous detection by an external lockin amplifier, hence the WFM extension that allows to run that without continuous jamming on the USB interface.

Dreaming loud:  
If someone here would be willing to implement packet synchronization to the WFM player - most likely in rd\_tx\_fifo.vhd - please get in touch. Could allow to add sequencing capabilities to the WFM player, like for an AWG, that is beneficial for repetitive TX patterns. Eventually even playback of a waveform upon a trigger as done by cmichal, but then purely via hardware without having to roundtrip to the API.

---

<div class="post-metadata">

**Author:** ![andrewback](https://avatars.discourse-cdn.com/v4/letter/a/22d042/32.png) [@andrewback](https://discourse.myriadrf.org/u/andrewback)\
**Post date:** [10 February 2022 13:57 UTC](https://discourse.myriadrf.org/t/timed-synchronized-gpio-pins-for-external-device-control/7518/4 "2022-02-10T13:57:07Z")

</div>

> [@andrin](#):
>
> I just put some recent gatewares here, including also GPIO extension for 16 bit TX samples in the WFM player and some description how to update the gateware:

If we were to create a MyriadRF GitHub repo for community contributed alternate gatewares, would this be of interesting/useful? That way they’d be more easily found.

---

<div class="post-metadata">

**Author:** ![andrin](https://avatars.discourse-cdn.com/v4/letter/a/8e7dd6/32.png) [@andrin](https://discourse.myriadrf.org/u/andrin)\
**Post date:** [14 February 2022 09:25 UTC](https://discourse.myriadrf.org/t/timed-synchronized-gpio-pins-for-external-device-control/7518/5 "2022-02-14T09:25:24Z")

</div>

This could indeed be interesting. Often, however, alternate gatewares also require an alternate interface and ideally a description how to use them etc etc. It thus also makes sense to keep the gatewares together with the specific project they are tied to.

To make the variety of projects easier to find - and not only projects that involve gateware changes, some sort of compact overview could also be helpful. I think of a table that lists all the projects, some short description, and links for further resources. Admittedly, such a table is easier to imagine than to create, edit and maintain… It’s also worth to point out that the current ‘dynamical’ solution works quite well, e.g. the rather active discussions in this forum
