4

Does anybody know of a company that sells a USB cable for a normal non-IoT windows 10 PC that can converts a USB to all of the following buses on 40 pin Raspberry pi like header? Example: USB->GPIO,I2C,SPI,UART, etc..

The closest thing I can find is a:

Digital Discovery Logic Analyser from digilentinc.com

This works to convert PC USB into GPIO/I2C/SPI etc... except I was looking for something smaller with less wires...having only a 40 pin header or less...similar raspberry pi 40-pin Header except being driven from a USB connected to a PC instead... Has anybody seen this type of product for sale that can convert from PC-USB to 40-pin header with all the listed buses?

Also, I want to be able to program this USB convert device through Windows UWP using the "Windows.Devices" Api instead of proprietary driver DLL API... haven't really found that yet... Example:

// C# Program GPIO connected to USB dongle of regular PC...
using Windows.Devices.GPIO;
...
private void InitGPIO()
{
    var gpio_ctrl = GpioController.GetDefault();
    // Check GPIO state
    if (gpio_ctrl == null)
    {
        this.pin = null;
        this.status.Text = "ERROR: No GPIO controller found!";
        return;
    }
    // Setup the GPIO pin
    this.pin = gpio_ctrl.OpenPin(LED_PIN);
    // Check to see that pin is Ok
    if (pin == null)
    {
        this.status.Text = "ERROR: Can't get pin!";
        return;
    }
    this.pin.SetDriveMode(GpioPinDriveMode.Output);
    this.pinValue = GpioPinValue.Low; // turn off
    this.pin.Write(this.pinValue);
    this.status.Text = "Good to go!";
}

I know I can do something similar with Windows IoT core running on a raspberry pi, however, i wanted to use my regular laptop instead.

Bimo
  • 5,987
  • 2
  • 39
  • 61

2 Answers2

2

The breakout board below is similar however, I'm not sure if the same as Rasperry PI header, since this FTDI docs says it has only a single Serial Channel configurable to any protocol (i2c,spi,etc). In comparision, Raspberry Pi gives you multiple serial channels with only the data and clock signals and gpio as well. However, its at least partly similar to raspberry pi header.

Adafruit FT232H Breakout

What can the FT232H chip do? This chip from FTDI is similar to their USB to serial converter chips but adds a 'multi-protocol synchronous serial engine' which allows it to speak many common protocols like SPI, I2C, serial UART, JTAG, and more! There's even a handful of digital GPIO pins that you can read and write to do things like flash LEDs, read switches or buttons, and more. The FT232H breakout is like adding a little swiss army knife for serial protocols to your computer!

Has USB drivers for Windows, Mac, Linux.

Adafruit FT232H Breakout Documentation

FT-232H Datasheet

Bimo
  • 5,987
  • 2
  • 39
  • 61
2

From a Windows PC, you can access to all of sensors and GPIO, I2C, SPI...etc...of any Arduino or raspberry pi board if you write a "Serial Port Server" and load it onto an Arduino or Raspberry-Pi board, and then send serial port Read/Write commands to this board using a C# program...

For example, Arduino boards are powered off of your PC's USB and this USB also serves to attach a Serial Port at the same that you can connect from a C# program. You simple upload your Arduino sketch to the board then start up a C# program to connect to the Arduino serial port. Its not quite as nice as using the IoT API under Windows.Devices, but it will give you access to all the same devices through a serial port. (the main problem with it is that serial ports are an anonymous port that doesn't have a unique DeviceID...leading to confusion if more than one serial port is connect to your system.)

Note, there's a good example of how to do this in the book, "JavaFX 9 by Example, 3rd edition". (However, there's no reason why you couldn't use C#/WPF and the .NET serial port API instead)

You could also do something similar settings up a Server port with Ethernet, WiFi, and Bluetooth ports from an IoT card connected to the PC controlling the card as a client.

Just for Completeness, there's also the FPGA solution as well. Create some Verilog or VHDL that includes a UART serial port and all the other peripherals that you need such as I2C, SPI, etc... connect them all together on a bus, add some custom logic around the UART to make it act like a address/data bus that can be written from the Windows PC over the Serial Port.

Bimo
  • 5,987
  • 2
  • 39
  • 61