-   Linux - Embedded & Single-board computer (
-   -   Using serial device file to connect a lcd display (

sharan013 03-15-2012 12:16 PM

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,

michaelk 03-15-2012 02:28 PM

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?

sharan013 03-15-2012 11:56 PM

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,

michaelk 03-16-2012 03:09 AM

Yes, but there are only two physical ports so it would be ttyS0 or ttyS1.

theNbomr 03-16-2012 04:14 PM

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.

All times are GMT -5. The time now is 12:07 AM.