General > General Technical Chat
What are you using to interface with microcontrollers?
bk81:
I recently tried a couple hobby projects that needed a computer interface. This is the first time I have tried such a thing since RS232 ports were common. Interfacing to computers has become vastly more complicated now that the only thing available are USB C ports!
One project used a PIC24F and the Microchip supplied USB CDC interface. The other had a USB interface to a PIC32MZ using the Microchip supplied Harmony bulk endpoint framework. On the client side for both I used USB4Java and Java 1.8. Going to a newer Java release would have required recompiling USB4Java.
Everything worked eventually, but I feel like there might have been a much better solution. Different microcontrollers, different tool chains, better USB libraries, whatever. USB4Java has also been abandoned and hasn't been recompiled for Apple silicon.
Is there an easier solution that runs on OS X and allows a few MB/s to be transferred and processed on the host side?
kripton2035:
each time it's possible, I use an ethernet or wifi interface. it is the simpliest even if not available to any microcontroller.
usually esp8266 or esp32 are my goto devices.
Smokey:
One advantage of the UART<->USB chip is that as long as the board stays powered up, the CDC virtual serial port on the computer will stay connected even if the uC resets.
It's sort of a pain, especially during development/programming cycles, that the computer CDC port disconnects/reconnects every time with native uC USB CDC.
Peabody:
The standard wired communications option in the Arduino world is a USB-to-UART adapter using the FT232RL:
https://www.ebay.com/itm/256072581134
It requires a driver at the computer end, but in Windows it shows up as a COM port. Don't know about Apple. The adapter can also provide power to the microcontroller, and has a jumper to set 3.3V or 5V. These work quite well, but baud rates are limited to about 115,200 I think.
nctnico:
I use USB-CDC together with a command line interpreter which can also be used to implement SCPI style control. On the PC side I let the software scan all COM ports until it finds the device it intends to control so the user doesn't need to bother filling in the right COM port. If the connection is lost, then the software retries until the port is there again.
Navigation
[0] Message Index
[#] Next page
Go to full version