Electronic – How to communicate between micro-controller and PC without the use of RS232/USB Adapter

communicationnxpusb device

I use an NXP micro-controller, P89V51RD2, and use a RS232 to USB converter to program it. I'd like to communicate with the computer to send data but without using the RS232 adapter and convert serial data from micro-controller to USB compatible form without the RS232 element.

Current stituation :

uC(serial) –> MAX232 –> RS232/USB adapter –> PC(USB)

Required stituation:

uC(serial) –> [some small circuit] –> PC(USB)

What can I do so that the new circuit is small enough to be burned on a PCB with the controller and directly interfaced with a USB?

Best Answer

You seem to want to interface to an USB port, so you will need some form of USB interface.

  1. The easiest route is an off-the-shelve usb-serial converter, then a max232 or the like, then the UART of your microcontroller. You apparently want to step beyond this.

  2. A next step is to use an usb-serial converter chip, without the extra stage of going to RS232 levels (and back). The FT232RL is often used for this purpose, there are others. These chips interface directly between USB and the UART pins of your microcontroler. The FT232RL is a small SMD chip, it uses little PCB area but is somewhat more difficult to use than a DIP chip. If you don't want to do you own PCb there are various break-cout PCBs, and the manufacturer (FTDIchip) sells cables that have the chip built into the USB connector.

  3. A next step could be to use a microcontroller that has a USB interface on the chip. For instance various PICs, AVRs and ARM chips have this feature. But this means that your micocontroller application will have to use the USB hardware. of the chip. This is doable (often with the aid of libraries provided by the chip manufacturer, or from thirds parties), but considerably more difficult than using a UART.

  4. For the real die-hards there are libraries that implement USB on an AVR without using AVR USB hardware. The resulting device is probably NOT acceptable as an official USB device, but they seem to be working.

A problem with 3 and 4 (and sometimes even with 1) is that you need an USBstack on the host side, and in my experience all host stacks except for the ones FTDI offer suck (the ones for prolific-based usb-serial converters seem to suck less than most others).