RS485 Programming

Pinterest icon

RS485 Communication using D2XX library and USB2SERIAL

In this tutorial we will use the D2XX library from FTDI to program the USB2SERIAL board to communicate with a microcontroller board through RS485 protocol.D2XX library is a proprietary library from FTDI to access the additional features of FT232 USB to Serial converter chip.Please note that D2XX library will work only with chips manufactured by FTDI like FT232 or FT245.If you are interested in using other languages like C# or Python for

RS485 Communication using MAX485 and MSP430 Launchpad

In the previous tutorial we discussed how to implement a serial connection between MSP430 launchpad (MSP430G2553 ) and a PC .Serial(TTL) or RS232 protocol is fine if you are planning to communicate over short distances of a few meters,when you increase the range to a few 100 meters RS232 protocol will become inadequate.For long distance wired communication you have to use a different protocol called RS485 which can communicate over a kilometer.In this tutorial we will interface a MSP430 launchpad containing MSP430G2553 with a RS485 decoder chip from Maxim (MAX 485).

MSP430G2553 interfaced with MAX485 circuit diagram

Serial and RS485 Programming Tutorials

serial port programming tutorials in C,Csharp,Python on windows,Linux

Serial Port Programming

This is a collection of articles on programming the serial port of a x86 PC using C,CSharp (C#) and Python.The tutorials covers programming the serial port using native API's like Win32 API on Windows or termios/ioctl() API on Linux. The tutorial also explains how to program the serial port using C# on .NET framework (Windows) . For Cross platform applications you can use the open source Python module PySerial for writing code on Windows and Linux.Since PySerial is available for Mac OSX ,the code provided here can run on Macs too(I have not tested it ).A short description about building an RS485 network is also provided.

The code presented in the tutorials are written using opensource or freely downloadable softwares like GCC,Microsoft Visual Studio Express Edition,Active Python,SharpDevelop etc.The codes are tested on a Windows 7  and a Ubuntu/Linux Mint PC.In the case of Python,seperate code is provided for Python2.7 and Python 3.x to accomadate the differences.

Remotely Controlling DC motors through RS485 Protocol using MSP430 Launchpad Booster Pack

ors being controlled by MSP430 from PC through RS485 link

In this tutorial we are going to control two DC brushed motors remotely using RS485 protocol.The Motors are connected to the PC through a twisted pair RS485 cable and the software running on the PC controls the two motors.

The Software is written in both C sharp (C#) and Python so that they can be run on multiple systems like Windows,Linux etc.

The two DC motors are controlled using MSP430 Launchpad and Robot Shield (L293D + MAX485) and the RS485 twisted pair cable is connected to the PC USB port using USB2SERIAL (USB to RS485 converter).

Subscribe to RSS - RS485 Programming