All times are UTC-06:00




Post new topic  Reply to topic  [ 1 post ] 
Author Message
 Post subject: RTS/CTS on serial port
PostPosted: Mon Nov 12, 2007 12:15 pm 
Offline

Joined: Sun Nov 11, 2007 10:40 pm
Posts: 6
Hello,
I am trying to read the status of the RTS pin on the serial port. I am using the following code snippet:

main() {
int fd, sercmd, serstat;

sercmd = TIOCM_RTS;
fd = open("/dev/ttyPSC0", O_RDONLY); // Open the serial port.


// Read the RTS pin status.
ioctl(fd, TIOCMGET, &serstat);
if (serstat & TIOCM_RTS)
printf("RTS pin is set.\n");
else
printf("RTS pin is reset.\n");

Using a similar code that sets the RTS signal, I can correctly read if the pin is set or not. On the code it works nicely. But using a voltmeter between pins 5 (neg) and 7 (RTS) I cannot measure any voltage, regardless of the pin status (set or reset). What am I missing?
Thanks
Cesar


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 1 post ] 

All times are UTC-06:00


Who is online

Users browsing this forum: No registered users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
PowerDeveloper.org: Copyright © 2004-2012, Genesi USA, Inc. The Power Architecture and Power.org wordmarks and the Power and Power.org logos and related marks are trademarks and service marks licensed by Power.org.
All other names and trademarks used are property of their respective owners. Privacy Policy
Powered by phpBB® Forum Software © phpBB Group