Subject:
|
Re: Serial line interrupt
|
Newsgroups:
|
lugnet.robotics.handyboard
|
Date:
|
Mon, 6 Jul 1998 19:02:05 GMT
|
Original-From:
|
Timothy B. Gold <{goldt@et.byu.edu}AntiSpam{}>
|
Viewed:
|
1108 times
|
| |
| |
> Sending data from the PC to the Handy Board is another story. The serial
> routines on http://www.ai.mit.edu/people/rsargent/ic/serialio.html work
> fine if
> the PC isn't sending very fast. The current 'solution' is to put the PC in a
> short loop after it has sent a character to slow it down. But that's not a
> very
> elegant solution.
>
> Is there a way to use the same technique on the handy Board as on the PC
> (using
> an interrupt handler)? If so, has anyone used that approach and is willing to
> share this code?
I had the same problem a few weeks ago, ended up writing an interrupt
handler for the Handy Board which will buffer up the incoming serial
information so that none of it is lost. I guess the Handy Board
normally just polls the serial port (I think with the system
interrupt?), so if data is coming in too fast some of it gets lost.
Anyway, the code seems to work just fine. The actual buffer size is
flexible -- you just have to edit the code in a couple of places. I
have done much experimenting to see how big the buffer actually needs to
be to prevent any data loss. One side effect, which may or may not be a
problem depending on what you're doing: once the interrupt handler is
active, you can no longer use interractive C to interface with the
handyboard. So it's a good idea to write your code in such a way that
you have a way to disable the serial interrupt handler from the
handyboard itself, otherwise you'll have to redownload the pcode to be
able to get it to talk to interactive C.
I want to touch up the code a little before I put it out on the
mailing list (clean it up a little and put a few more comments in
explaing what's going on). Give me a day or so and I'll have it posted
here to the mailing list.
Tim Gold
goldt@et.byu.edu
BYU Robotics Lab
|
|
Message is in Reply To:
| | Serial line interrupt
|
| Hello all, I'm currently trying to communicate between the Handy Board and a PC (i486) using the existing serial line between the two. Sending data from the handy Board to the PC is no problem. An interrupt handler puts all incoming serial data into (...) (26 years ago, 6-Jul-98, to lugnet.robotics.handyboard)
|
3 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|