rifotu / Serial-Port-Programming-on-Linux

Programming the Serial port on Linux in C using termios API

Home Page:http://xanthium.in/Serial-Port-Programming-on-Linux

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Programming the Serial port on a Linux System using C and termios API

This repo contains code for transmitting and receiving characters (Strings) serially between an x86 Linux PC and a Microcontroller (MSP430G2553 on Launchpad).

Screenshot of the serial port programming code running on Linux

Full code explanation along with screenshots can be found here on the xanthium website

The Microcontroller and PC are connected in null modem configuration using 3 signals (TX,RX and Ground).

The code uses termios API's to intialize the PC serial port and transmit a character to the microcontroller board.

  • The PC side code is written in C using termios API
  • and can be compiled using GCC .

The Code will Work With Standard RS232 Serial ports or any USB to Serial Converter.

More info about the USB to Serial/RS232/RS485 Converter used in the above tutorial can be found here

The Microcontroller side code is written in Embedded C and can be Compiled using Code Composer Studio for MSP430.

The Hardware used is MSP430G2553 on Launch pad development board.

About

Programming the Serial port on Linux in C using termios API

http://xanthium.in/Serial-Port-Programming-on-Linux

License:MIT License


Languages

Language:C 100.0%