Author Topic: Convenient USB --> GPIO module?  (Read 8457 times)

0 Members and 1 Guest are viewing this topic.

Offline donotdespisethesnake

  • Super Contributor
  • ***
  • Posts: 1093
  • Country: gb
  • Embedded stuff
Re: Convenient USB --> GPIO module?
« Reply #25 on: May 27, 2018, 07:29:14 pm »
all STM32 parts with USB already have a USB bootloader in ROM.

Not true...F103 doesn't.
Bob
"All you said is just a bunch of opinions."
 
The following users thanked this post: Nominal Animal

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6239
  • Country: fi
    • My home page and email address
Re: Convenient USB --> GPIO module?
« Reply #26 on: May 28, 2018, 12:20:51 am »
Let's recap re STM32F103:
why mess with v-usb and atmega when stm32f103 dev boards with native usb are available on aliexpress for $2?
Because you need ST-Link or a 3.3V UART adaptor to program it, or to burn the bootloader for USB programming.

Why would you use a UART to develop on an STM32? Most people just throw down the $5 for an ST-Link to get full Serial-Wire debugging. If you were intending on "trivially" burning this bootloader just so you can use it with Arduino, then that is just silly.
Well, that puts the development cost for a single ST32F103, that was supposed to be just $2, to $7. (And ST32F013 does not have a bootloader in ROM, so you do need an ST-Link or 3.3V UART to program it.)

Pro micro clones are < $5, and DigiSpark clones (ATtiny85) $1.67, on eBay. For the DigiSpark, you don't even need a cable, just stick it into an USB port, and you can program it.

Granted, DigiSpark USB (VUSB) is purely software-based, and I don't completely trust it (the timing part, in particular; no crystal).  In my testing, it seems to work just fine for HID stuff.  Both the Teensies and the Pro Micro clones have been absolutely rock solid wrt. USB comms in my testing on several machines, even at near the theoretical maximum transfer rates (a bit over megabyte per second when using bulk transfers).  Teensies also have a very friendly and vibrant forum at PJRC.com where the developer (Paul Stoffregen) frequents.

The title of the thread, and topic at hand, is convenient USB GPIO module. You don't need hardware debugging for that kind of trivial firmware; at least I never have. And needing a separate module to program the device is not exactly the most convenient; especially if something goes wrong. That is the reason I didn't recommend STM32F103's myself, even though I am interested in them (for comparison and exploration purposes if nothing else).
 

Offline digsys

  • Supporter
  • ****
  • Posts: 2209
  • Country: au
    • DIGSYS
Re: Convenient USB --> GPIO module?
« Reply #27 on: May 28, 2018, 01:09:25 am »
Been using these for years .. simple HID , US$63 .. off the shelf ... plug in and go - sensoriumembedded.com/products.htm
- and this small program to send keystrokes direct into programs - https://joytokey.net/en/

Edit: definitely interested in the Treejumper though !! :-)
« Last Edit: May 28, 2018, 01:14:08 am by digsys »
Hello <tap> <tap> .. is this thing on?
 

Offline donotdespisethesnake

  • Super Contributor
  • ***
  • Posts: 1093
  • Country: gb
  • Embedded stuff
Re: Convenient USB --> GPIO module?
« Reply #28 on: May 28, 2018, 06:04:20 am »
Let's recap re STM32F103:


You missed Maple Mini... which is F103 and negates everything you said. But anyway requiring an extra cable for programming is the barest level of inconvenience.
Bob
"All you said is just a bunch of opinions."
 

Offline cdev

  • Super Contributor
  • ***
  • !
  • Posts: 7350
  • Country: 00
Re: Convenient USB --> GPIO module?
« Reply #29 on: August 28, 2021, 11:50:35 pm »
I just wanted to add in the WCH-341A, seems similar to the FT232H in some ways. Firmata and an USB friendly arduino also works well for interfacing with external HW at very low cost.
"What the large print giveth, the small print taketh away."
 

Online bingo600

  • Super Contributor
  • ***
  • Posts: 1987
  • Country: dk
Re: Convenient USB --> GPIO module?
« Reply #30 on: August 29, 2021, 05:27:24 am »
The STM32F401/411 - "Blackpill" has an USB DFU loader - built in , and is supported by the Official STM "Arduino core"
Could be an alternative to Teensy or "Bluepill"

/Bingo
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12852
Re: Convenient USB --> GPIO module?
« Reply #31 on: August 29, 2021, 05:55:37 am »
The pigpio Python module allows full remote control of the GPIO of a Raspberry Pi running the pigpiod daemon, from Python code on your PC, over TCP/IP.  It supports general bit-banging, high quality PWM and Futaba servo pulse generation, hardware I2C, SPI and UART, pattern generation and arbitrary scripting for low latency stuff.  Depending on your choice of Pi, the physical interface can be USB RNDIS (ethernet gadget), wired ethernet or WiFi.   Apparently there's also a Linux C remote access library (libpigpiod_if2), that may be usable cross-platform, but I haven't used that myself.
 

Offline fchk

  • Regular Contributor
  • *
  • Posts: 243
  • Country: de
Re: Convenient USB --> GPIO module?
« Reply #32 on: August 30, 2021, 06:54:03 am »
So, I'm getting tired of always installing the weird "zadig" drivers for the FT232H. (Otherwise, Adafruit has done a great job with the Python library to drive this chip).

What's out there that lets me control a few, lets say 4 to 8, simple GPIO pins from a Windows host? Something without weird drivers that I (and my clients!) have to install manually and that I can access from Python.

Microchip MCP2200 and MCP2221A.

These are preprogrammed PICs sold as USB-UART/8GPIO and USB-UART/4GPIO/I2C bridges. They use CDC-ACM for the UART part and HID for the rest. You don't need any proprietary kernel drivers. You will get away with only SETUPAPI.DLL and HID.DLL calls in Windows and /dev/hidraw in Linux.

fchk
 


Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 3341
  • Country: nl
Re: Convenient USB --> GPIO module?
« Reply #34 on: September 02, 2021, 02:32:33 am »
Is this thread still alive after 3 years...

I've been tinkering a bit with STM32, and without much trouble I got the  serial sathosimn project going.
It's open source from github, and it makes the three USART's of the STM32F103 available via CDC on it's USB port.

I compiled the thing, flashed it in a Blue Pill (When they were still original) and added some loopback wires on a breadboard and it all seemed to work with different terminal sessions talking to the three CDC ports. I found it quite impressive, and then my attention wavered to other subjects again.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf