Visit the LQ Articles and Editorials section
Go Back > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.


LinkBack Search this Thread
Old 03-15-2012, 12:16 PM   #1
LQ Newbie
Registered: Feb 2012
Posts: 8

Rep: Reputation: Disabled
Using serial device file to connect a lcd display

Linux has character device file representing serial port /dev/ttys*.I can simply open , read , write , close a serial port using system calls in my c programme.I am working on a board which has an intel atom processor.The board runs on fedora , it has 2 rs232 interface.
What I dont get is ,how to associate this serial port with the rs232 interface , I want to connect a lcd display to the rs232 and be able to write data to the display, using usb is last choice since I am building a portable medical kit ,I dont want it to be power hungry.
Any sample code, links of howto code such interface is welcome.

Thank you,
Old 03-15-2012, 02:28 PM   #2
Registered: Aug 2002
Posts: 11,545

Rep: Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677
The simple terms serial port and RS-232 interface reference the same thing. RS-232 is the standard that describes the electrical and physical hardware characteristics of the serial port.

Can you post a link to the board?
Old 03-15-2012, 11:56 PM   #3
LQ Newbie
Registered: Feb 2012
Posts: 8

Original Poster
Rep: Reputation: Disabled
So, in my /dev there are 4 character device files ttys0 ,1,2,3 .
You are telling me I can connect a lcd or some external device to rs232 and communicate with it using one of these file as an interface.
Am I correct or missing something?
This is the board link, has board spec and documentation.

Thank you,
Old 03-16-2012, 03:09 AM   #4
Registered: Aug 2002
Posts: 11,545

Rep: Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677
Yes, but there are only two physical ports so it would be ttyS0 or ttyS1.
Old 03-16-2012, 04:14 PM   #5
LQ 5k Club
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,390
Blog Entries: 2

Rep: Reputation: 900Reputation: 900Reputation: 900Reputation: 900Reputation: 900Reputation: 900Reputation: 900Reputation: 900
If you want to write C code to communicate serially with your LCD, you should consult the following very good references, which will provide you with some working code to get you started, and a lot of detail that you probably wouldn't have discovered on your own.

Serial Programming Howto
Serial Programming Guide for POSIX OS's

--- rod.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Is it possible to access an IrDA device as a serial device such as /dev/ttyUSB0? cricketlong Linux - Hardware 1 05-24-2011 03:11 PM
Serial input device using usb-serial connector slackiz Linux - Hardware 4 01-12-2009 05:04 AM
Connect from FC6 box to other device via serial/usb Hewson Linux - Hardware 5 03-13-2007 03:43 PM
Could not connect to Bluetooth device through the serial port dubrick_vit Linux - Hardware 0 01-16-2006 07:57 AM
LCD Display brianknu Linux - Hardware 3 06-18-2005 06:10 AM

All times are GMT -5. The time now is 01:24 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration