LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 07-19-2006, 04:48 AM   #1
knobby67
Member
 
Registered: Mar 2006
Posts: 461

Rep: Reputation: 31
byte collisions through rs232 comms


Hello I hope someone can advise with this. I writing data out of the rs232 port to a peripheral board. On debugging I've found that I've got problems due to the data getting scrambled, due I think to bytes colliding (in the UHART), I know this as if I do a sleep(1) between bytes it works okay. Is there a command which will make my data wait before each write call?

I'm using fairly low data rates 9600,no parity,1 stop bit, no handshake. This is what the comms to the board need to be.

I'm using a write function to write to the port. Thanks
 
Old 07-19-2006, 10:30 PM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,500

Rep: Reputation: 285Reputation: 285Reputation: 285
The problem is the "no handshake" configuration. Without hardware (or at least software) handshake, the UART cannot signal that it's not ready to accept data. Your only option is to delay between character transmissions (about 1ms should do it at 9600bps).
 
  


Reply


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
USB>RS232 versus PCMCIA>RS232 jayhel Linux - Laptop and Netbook 2 08-04-2005 06:09 PM
User/Kernel Space Comms under Redhat 9.0 snigglyfox Programming 3 09-07-2004 05:24 AM
backup byte-for-byte axion0917 Linux - Software 2 12-11-2003 05:01 PM
3Com Etherlink III - No Comms on RH9 Pikie-Me Linux - Networking 13 10-05-2003 08:40 PM
symbols for networking and comms equipment antken General 1 10-29-2002 07:45 AM


All times are GMT -5. The time now is 11:21 AM.

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