This Repo contains code for communicating with an x86 PC from a microcontroller Board (MSP430 Launchpad) using RS485 Protocol.
The codes are written in C for both Windows and Linux Platforms.
Detailed explanation of the codes along with the Hardware can be found here.
###Source Code
-
Windows
-
You can find the Windows Sourcecode for RS485 communication under the Win32 Folder.
-
The code uses Win32 API to open a connection and communicates with the USB to RS485 Converter to transmit and Receive the Data send from the Microcontroller (here MSP430 Launchpad).
-
The code can be compiled using Opensource GCC or Microsoft Visual Studio.
-
Code is tested on Windows XP,Windows 7
-
-
-
Linux
-
You can find the Linux Sourcecode for RS485 communication under the Linux Folder.
-
The Code uses termios API and ioctl calls to open a connection and communicates with the USB to RS485 Converter to transmit and Receive the Data send from the Microcontroller (here MSP430 Launchpad).
-
The code can be compiled using Opensource GCC on any Linux System.
-
Code is tested on Linux 3.x Kernel on Ubuntu,Linux Mint and Lubuntu
-
-
-
References
-
To Know more about Win32 API for Serial Communication, Check this Tutorial.
-
To Know more about termios API (Linux), Check this Tutorial.
-
To Know more about ioct calls on Linux,Check this Tutorial.
-
To Know more about USB to RS485 Converter,Check this Tutorial.
-
###Full Tutorial