To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.handyboardOpen lugnet.robotics.handyboard in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / Handy Board / 2706
2705  |  2707
Subject: 
Re: Serial routines
Newsgroups: 
lugnet.robotics.handyboard
Date: 
Thu, 4 Sep 1997 19:46:05 GMT
Original-From: 
Richard Drushel <DRUSHEL@APK.NETnomorespam>
Viewed: 
1160 times
  
[Jodi Seaborn] spake unto the ether:

Has anyone used Richard Drushel's math and serial libraries with a real
serial port?  The HB seems to miss about every other character when I use
any of the higher level functions.

Hi Jodi, the serial input routines (i.e., from some other source
to the Handy Board) do work, it's just that the I/O is polled, not
interrupt-driven.  Thus, unless the device sending characters sends them
at a slow rate, you will get serial port overruns and dropped characters.
The serial ports operate at a bitrate of 9600 bps, but you can't send
characters in a burst.

This is reaching back into the old days of BBSing, but back when
not every BBS supported an error-checking file transfer protocol like
XMODEM or ZMODEM, and the BBS host computer might not have had interrupt-
driven serial I/O, it was common to use straight ASCII transfers with a
feature called "character pacing" in order to prevent data overruns.
Basically this meant sending characters (at the connect bitrate) with a
definite waiting interval between characters.  This allowed the receiving
computer enough time to poll its serial port, grab the character, and
process it without losing characters.

If you can implement "character pacing" on the device sending
characters to your Handy Board, you can fine-tune the inter-character
interval for maximum transfer rate without dropped characters.

Of course, the best solution would be for me to write an .icb
module in 6811 assembler to implement interrupt-driven, ring-buffered
serial I/O.  I don't have the time to do it right now; anybody want to
take a crack at it?  My conio.c high-level library could still be
used as-is, as long as serial_getchar() was modified to retrieve the
character from the ring buffer and not directly from the serial port.

*Rich*
--
Richard F. Drushel, Ph.D.            | "Aplysia californica" is your taxonomic
Department of Biology, Slug Division | nomenclature.  /  A slug, by any other
Case Western Reserve University      | name, is still a slug by nature.
Cleveland, Ohio  44106-7080  U.S.A.  |     -- apologies to Data, "Ode to Spot"



Message is in Reply To:
  Serial routines
 
Has anyone used Richard Drushel's math and serial libraries with a real serial port? The HB seems to miss about every other character when I use any of the higher level functions. Thanks, Jodi Graf (27 years ago, 4-Sep-97, to lugnet.robotics.handyboard)

4 Messages in This Thread:


Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR