Tuesday, October 23, 2012

Serial Communication via USB to Serial Adapter using Mac

I finally got the serial connectivity to work on my mac. I used to work with Docklight on Windows. It is a simulation tool for serial communication protocols via RS232, RS485/422.

For the past few days, I was trying to achieve the serial communication using RS485. I finally got it working using the CoolTerm software which is a simple serial port terminal application.


First you need to add the serial port on your mac. An easy way to add a serial port to your Mac is to buy a USB-to-Serial Adaptor. These adaptors are quite cheap and work. 

A common chip used in USB-to-Serial Adaptors is the PL-2303. Drivers for Windows, Linux and Mac OS X are available. My advice is to get a PL-2303 based adaptor. If the manufacturer of your USB-to-Serial Adaptor provides drivers for OS X the installation should be really straightforward. Otherwise you will have to slightly modify another driver. 
I took a driver from profilic.com, which offers a nice graphical installer. 

You can get the driver from 
"http://plugable.com/drivers/prolific/". 
Download the driver for mac  "PL2303 MacOSX10.6 dmg v.1.4.0.zip".

After installing this driver software download the CoolTerm software for the serial port terminal application. You can download it from http://download.cnet.com/CoolTerm/3000-2383_4-10915190.html. 

After Installing this software you need to set the port, baudrate, stop bits and parity.
You set it in Connection->options->Serial Port


Click the Connect button to connect to the device. When connected, you can send the command using connection->send String->choose Ascii or hex and click send button. 


If you get an error such as "port not configured", disconnect the USB and reconnect.
YAY!! You should now be able to establish the serial communication via USB to Serial Adapter:-)



No comments:

Post a Comment