Organize and Share your Electronics the way you want. Sign-Up for a free account now. It takes only 30 seconds!

Basic USB Communication RS-232 Emulation Method

Basic USB Communication RS-232 Emulation Method

With the continuous decrease in the use of COM Port devices and COM Ports itselt, the need to migrate to the USB has become increasingly important. Just take a look at the laptop PCs nowadays, it is a miracle if you can even find just 1 COM Port on it.
But the good news is… we have got a simple (very simple in fact) way of migrating from the old RS232 to USB, that is via RS232 Emulation method. This method alone has got quite a number of ways to implement, e.g. using USB Convertor ICs, like the FTDI232BM (this is UART-USB conversion), the Philips PDIUSBD11 (this is I2C conversion to USB) and many more. Sometime last year, Microchip released the USB 2.0 compatible microcontrollers, i.e. PIC18F4550, 18F2550 and etc. Presented here, is the example of using the CDC firmware provided by Microchip to emulate a COM Port when the device is connected to the USB Port.

When the device is connected to the computer, a Virtual COM Port (VCP) will be created. This is shown at the Device Manager Window under Ports(COM & LPT). In this case, COM5 was created when the PIC18F4550 was attached to the USB Port. It may be interesting to note that if you plug in your PIC in different USB ports, the VCP created will be different.

Here, I modified the CDC firmware provided by Microchip and wrote a Visual Basic programme to communicate with the device. An important thing to note when using the firmware and this schematics is that… to PLACE REMARKS ON THE FOLLOWING 2 LINES AT USBCFG.H like this…

//#define USE_SELF_POWER_SENSE_IO //#define USE_USB_BUS_SENSE_IO

if not the when you attach the PIC to the USB Port, it will disconnect itself immediately soon after.

Visit Here for more.

 

More Articles to Read

App note: Testing inductors at application frequencies
App note: Testing inductors at application frequencies
App note: Working voltage ratings applied to inductors
App note: Working voltage ratings applied to inductors
1968 Princeton Reverb Repairs
1968 Princeton Reverb Repairs
Skill Sunday: Power Over Ethernet for Arduino
Skill Sunday: Power Over Ethernet for Arduino
More on Color TFT Displays ~ The Big Ones — 240 X 320
More on Color TFT Displays ~ The Big Ones — 240 X 320
Vertical Pole Climbing Robot
Vertical Pole Climbing Robot
ESP8266 Weather Station Projects
ESP8266 Weather Station Projects
Single tube Lethal Nixie clock
Single tube Lethal Nixie clock
How to make a simple 1 watt audio amplifier (LM386 based)
How to make a simple 1 watt audio amplifier (LM386 based)
Flashing Binaries to DRA7xx Factory Boards Using Device Firmware Upgrade
Flashing Binaries to DRA7xx Factory Boards Using Device Firmware Upgrade

Top




Shares