Hi Page,

I'm not sure where you got the 3.3V info from, but this section in the
manual shows the pins:

https://uhd.readthedocs.io/en/latest/page_usrp_b200.html#b200_switches

>From here, this is the pinout:  1=GPIO_0, 2=GPIO_1, 3=GPIO_2, 4=GPIO_3,
5=GPIO_4, 6=GPIO_5, 7=GPIO_6, 8=GPIO_7, 9=GND, 10=GND

Make sure you share a ground pin with your Pi Zero.

If you're just reading pins, follow the manual for set_gpio_attr() (
https://uhd.readthedocs.io/en/latest/classuhd_1_1usrp_1_1multi__usrp.html#a57f25d118d20311aca261e6dd252625e)
to do the following:

   - Set desired pins CTRL to 0 (GPIO mode)
   - Set DDR to 0 (input)
   - Call get_gpio_attr() on the READBACK attribute. You will get all 8
   pins back, not just the ones you set to input (the others will be whatever
   their state is).

You're right that the manual page for the GPIO API does not spell out B210
specifically, but everything there also applies to B210:
https://uhd.readthedocs.io/en/latest/page_gpio_api.html

Start slowly, without SPI, and read back known pin values. Then, poll the
GPIO bank more quickly to get your bit-banging functionality.

While this does not specifically talk about reading GPIOs, it maybe also be
useful: https://youtu.be/ppD06ZETnek?si=EYGKvF5jfKG9RiGv

--M



On Thu, Feb 12, 2026 at 7:43 PM page heller <[email protected]> wrote:

> I am struggling with the GPIO on the Ettus B210 (J504). I am connecting it
> to a Raspberry Pi Zero acting as the Master for SPI communications, sending
> the chip select and clock to the B210. The loopback test on the Pi is
> successful. The NI-provided Python example code on the B210 side appears to
> 'get' (read) the pins on J504. Disconnected I see the chip select signal go
> low and back high, but when I connect it to J504, the software to 'get' the
> pin doesn't change (same code, but in a for-loop). I'm using pin 1 as the
> chip select, 3 for clock, 6 for MOSI. I'm not using MISO.
>
> Some references on line suggest that pin 1 is an output on J504 of 3.3V
> power, but, I don't think so. It most certainly is not 3.3V and appears to
> be just like the other pins.
>
> I need some help. I've invested about ten hours trying a number of
> different methods and code examples. I've tried getting SPI to work, but
> the documentation is so poor, I can only guess on the actual
> implementation. When that didn't work, I went to bit-banging; also with no
> success. I'm just sending datetime from the pi to the B210 to synch them
> (doesn't have to be exact, just within hundreds of microseconds). So, I'm
> only sending a handful of bytes once, so bit-banging is just fine for this
> application. But, I can't get either the SPI nor the bit-banging to work.
> If I can't see the pin change when I use the example 'get' python code,
> then nothing will work.
>
> I'd love to talk with someone who has transferred data over the B210 GPIO.
> (Am I supposed to call this the NI 2109 now?) Thanks. -page
> _______________________________________________
> USRP-users mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
>
_______________________________________________
USRP-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to