• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

USB Assumptions

Status
Not open for further replies.

SleeplessDad

New Member
Hi Everyone.

I have been servicing scientific instruments for about 16-17 years now but I have never created a significant circuit.

I have not posted here for a few years. I have tinkered with various devices such as BeagleBone, Rpi, Arduino and many more but I have never really stuck with it.

When I was trying to use the devices mentioned above, I always felt like I was giving up things I like and forced to deal with constraints that don't matter. All I really want to do is to program in weird languages normally found on desktops only and create circuits that will be controlled from a desktop computer. Portability mean nothing to me.

So here is what I need help with:

1) Am I correct in the assumption that if I use a USB bridge chip such as FTDI based ones, I could write to a serial port and control circuits through SPI or other protocols?

2)Is it safe to say that using this approach I would be able to create USB devices that had no “on board” intelligence and were wholly dependent on the desktop computer's program.

3)Is it also safe to say that as long as the user is a member of the dial out group on Linux, that all I would have to do is write serial port control programs from userland and would never have to touch the kernel.

Thanks-Patrick
 

ronsimpson

Well-Known Member
Most Helpful Member
There are many different types of FTDI chips.
The ones used on this forum are USB to serial.
I have only used them under Windows. FTDI has drives that make the device look like another serial port. So just write to "com4".
On the other end, connect to the serial port of a micro controller.
I have used several large FTDI parts that also have parallel ports. The part I have most experiance with has SPI, UART, Parallel ports. All controlled by the PC. Pretty simple. The biggest problem is that the design notes have errors. Last project did not have a micro controller. Just FTDI USB IC.
 

SleeplessDad

New Member
Hi Ron

Thanks for posting. The thing is, if I use microcontrollers I have to use a subset of languages(usually C) and since it's just going to be tied to a desktop, I was hoping to only write on the desktop.

Thanks again
 

ronsimpson

Well-Known Member
Most Helpful Member
That is what I was trying to say. From the PC end you can make any wire go high or low. You can send serial data. Make a wire input or output. Read if high or low. There is no need for a micro.
 

Blueteeth

Well-Known Member
I have made many projects that used the FTDI chips, and more recently, skipped those using microchip/AVR devices with USB capability.

There are libraries out there that can be tricky to use but *some* are quite simple. Meaning you can create a new project in your IDE, load in the USB library (used to create a USB-serial bridge, so the PC see's it as a serial port, the micro just see's the data as a 'block of ram') and can make life easier. You can have your own very simple protocol consisting of only a few bytes, or much more complicated, just like any serial application. Although programming the PC for serial port use can get a little hairy especially if you use .NET.

Using USB directly, as in a HID device is a little different, but in some ways easier, especially for higher data transfers, which probably aren't really needed for microcontroller applications (where you're not transferring gigs of data).

The serial port is still going strong, I suspect for the reason you stated - don't have to touch the kernel. PC just reads/writes to/from a virtual serial port.
 
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top