Subject:
|
Re: Interrupt for serial data
|
Newsgroups:
|
lugnet.robotics.handyboard
|
Date:
|
Fri, 13 Feb 1998 23:21:24 GMT
|
Original-From:
|
Max Davies <MDAVIES@CAMsaynotospam.ORG>
|
Viewed:
|
1382 times
|
| |
| |
Fred G. Martin wrote:
> Jan-Sipke,
>
> You're really pretty far away from having this
> work. It's not just a
> matter of redirecting the serial interrupt; when
> you get there, you
> have to:
>
> * store incoming character in a buffer
> * advance the buffer pointer
> * check the buffer for overruns
>
> then you need a separate subroutine which
> fetches the character from
> the buffer (checking first if there is anything
> there), and decrements
> the buffer point.
>
> learning how to write interrupt code is probably
> the hardest part of
> assembly programming. my best advice to you is
> to simply write code
> on the PC side to slow down your transmit
> character rate until things
> work. and make sure on the HB side, you're in a
> tight loop receiving
> characters when communications are in progress.
Sipke obviously realizes that more work is needed,
and justs want to get to step 1 first by
recognizing the interrupt. That is exactly what I
would do too.
I've been thinking about writing an
interrupt-driven serial receive routine too, but
haven't had the time for it yet. Such a method
would be magnitudes better than the 'tight-loop'
reception method which I find always gives me
trouble once my program gets complicated enough to
not run as fast as I would like.
On the other hand, maybe there's a comprimise
approach: Try writing 'C' code that you run as a
seperate high priority process to poll for serial
input and buffer it, and add a support routine
that your normal code can call to pull characters
out of that buffer.
/Max
|
|
Message has 1 Reply: | | public apology
|
| Yes -- I didn't think very hard and in retrospect it's fairly evident that Jan-Sipke's code is just the starting step. Sorry for being such a blunderhead. (Jan-Sipke and I have been exchanging some private messages and I think he's closing in on a (...) (27 years ago, 14-Feb-98, to lugnet.robotics.handyboard)
|
Message is in Reply To:
| | Re: Interrupt for serial data
|
| Jan-Sipke, You're really pretty far away from having this work. It's not just a matter of redirecting the serial interrupt; when you get there, you have to: * store incoming character in a buffer * advance the buffer pointer * check the buffer for (...) (27 years ago, 13-Feb-98, to lugnet.robotics.handyboard)
|
4 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|