2
\$\begingroup\$

Formerly laptops had serial and parallel port and it was really easy to connect laptop to micro-controllers and FPGAs. But USB has its own protocol and its not as easy as parallel port to implement different connections.

There are some ways to convert USB to other protocols using micro-controller.

Is there any good way to go to have protocols easy using USB? Do Programmers make specific cable and USB converter to every single protocol?

\$\endgroup\$
7
\$\begingroup\$

If you look for a solution to interface your embedded controller to a computer with only USB ports, I can highly recommend an USB to RS232 bridge chip. I use the FT232 chip from FTDI in my embedded systems. FTDI not only provide the chip but also a driver for it. In your computer the chip will be detected as a good old COM port, just as the old ones with all the handshaking etc... In the controller end the chip outputs TTL RS232, SPI or I2C depending on your choice of chip.

If you are looking for parallel access, FTDI also have a USB to parallel chip.

The driver can be customized if you want too and is free. It works on Windows, MAC, Linux and Windows CE.

Now, if you only want to have a traditional 9-Pin COM port, there are several USB to RS232 converters out there.

\$\endgroup\$
2
\$\begingroup\$

Regarding the programming you are limited by what your vendor or a third party provider offers.

When you consider controlling, USB gives you great new possibilities. Just a quick example: Using a AT32UC3B controller and its built-in USB features I can connect that device to any Windows 8.1 device (both X86 and ARM such as the Surface RT) completely driverless. I make use of the HID protocol for which a USB class driver exists and which I can use easily. This offers things such as automatic error correction. Of course, you can also use Linux with its built-in HID class driver.

Please understand that Windows Store applications do not support Serial Ports anymore (which I consider to be a good thing).

\$\endgroup\$
  • \$\begingroup\$ Both Yes and No. They support the USB CDC when used as SerialPort type endpoint. Yet, for Windows Store apps there is no support for the classical FT232 serial port. On Windows 8.0/8.1 Desktop apps, nothing has changed, so the FT232 and similar will just work like before. Or to put it in other words: You cannot do a SerialPort sp = new SerialPort("COM4") in Windows Store apps. \$\endgroup\$ – Tom L. Dec 13 '13 at 12:24
0
\$\begingroup\$

Some ICs from Atmel an Microchip (PIC18F2550) has the USB ports native. So its just plug and play.

This site has some good examples to use ATtiny with the V USB that is a software-only implementation of a low-speed USB device for Atmel’s AVR® microcontrollers, making it possible to build USB hardware with almost any AVR® microcontroller, not requiring any additional chip.

And this one with PICs, using the HID (Human Interface Device).

\$\endgroup\$
  • 1
    \$\begingroup\$ Atmel has various USB enabled AVR microcontrollers, but ATtiny2313 isn't one of them. \$\endgroup\$ – jippie Dec 12 '13 at 18:02
  • \$\begingroup\$ @jippie You were right, fixed! \$\endgroup\$ – Butzke Dec 12 '13 at 18:09
0
\$\begingroup\$

For programming an FPGA via USB, I would highly recommend buying a knockoff JTAG cable from ebay. You can get a Xilinx compatible one for about $40. I have a couple of them myself, and they work great. You should be able to get Altera compatible cables as well.

In terms of communicating with an FPGA or microcontroller, there are a couple of possibilities. If all you need is really low bandwidth communication, a serial to USB chip such as the ones made by FTDI or Exar are quite good. However, you can't go all that fast with a serial port.

If you need a higher bandwidth, you should get a microcontroller with a built-in USB controller. For an FPGA, you can get USB PHY chips that take the USB signal and convert it to a parallel bus. With this sort of a setup, you can use all of the bandwidth that USB provides.

Another possibility is to use an FTDI FIFO chip. This looks sort of like a serial port, but the chip doesn't contain a UART, it just takes the data out on a parallel bus. This is far more efficient at utilizing the link bandwidth than a UART. This can be used with either an FPGA or a microcontroller.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.