Hi All,
I've been away for years, and never did anything with PB in the area I now need.
I need to mock-up some datalogging/comms apps with a remote microcontroller via USB.
A number of folks have used VB as their language of choice, and are so recommending it.
I'm pretty sure PB has a decent capability to do this, but thought I'd post to make sure.
Any comments are appreciated.
PB and microcontroller comms w/USB
Re: PB and microcontroller comms w/USB
Depends if you want to interact with the microcontroller as a "real" USB peripheral, which will show up as a new device, or if communication over a virtual COM port is suitable for you.
The first is more difficult and I'm not sure if anyone has implemented it in PureBasic...
The second one is surprisingly simple using PB's SerialPort library. I have used this with success twice, once for a school project using a Texas Instruments processor and a FTDI "UART over USB" chip, and again for a home project using a $30 Arduino (I think it also uses a chip by FTDI). Both show up as simple COM ports in Windows after installing a tiny driver.
Depending on your sampling rate, this might be fine for data acquisition. I did notice data loss at rates above maybe 100k baud, but I didn't investigate it much. Not sure if it was fault of the controller, the driver, my PC, or just desynchronization.
The first is more difficult and I'm not sure if anyone has implemented it in PureBasic...
The second one is surprisingly simple using PB's SerialPort library. I have used this with success twice, once for a school project using a Texas Instruments processor and a FTDI "UART over USB" chip, and again for a home project using a $30 Arduino (I think it also uses a chip by FTDI). Both show up as simple COM ports in Windows after installing a tiny driver.
Depending on your sampling rate, this might be fine for data acquisition. I did notice data loss at rates above maybe 100k baud, but I didn't investigate it much. Not sure if it was fault of the controller, the driver, my PC, or just desynchronization.
Re: PB and microcontroller comms w/USB
User_Russian has developped a library for HID
http://www.purebasic.fr/english/viewtop ... ry#p337928
but never tried it (comments in russian)
http://www.purebasic.fr/english/viewtop ... ry#p337928
but never tried it (comments in russian)
PureBasic: Surprisingly simple, diabolically powerful
Re: PB and microcontroller comms w/USB
Thanks guys, sounds like I am in luck! 
