Need Elegant Buffered Serial Input
Archiver
Posts: 46,084
Hi Folks,
I've got a project which is a BS2SX acquiring serial data which is then used
to switch some relays on and off. Easy you might think! Hmmn!
I'm in need of an elegant (or cheap!!) way of buffering input characters to
my BS2SX. The buffer needs to be at least 2K bytes as the data is coming in
all the time - I don't want to miss any data. The stamp is busy for 70% of
the time doing other things.
My current solution is to use a an old Micromint RTC (an 8052 chip) as the
input buffer. I modified the Systronix BASIC serial port interrupt service
routines to make it become a 6K input serial buffer. I've linked the two
units together with primitive handshaking and it works fine.........BUT...
It's doubled the board footprint in my box, and it's expensive!!
Any ideas or urls would be appreciated!
Thanks,
Tony Wells
[noparse][[/noparse]Non-text portions of this message have been removed]
I've got a project which is a BS2SX acquiring serial data which is then used
to switch some relays on and off. Easy you might think! Hmmn!
I'm in need of an elegant (or cheap!!) way of buffering input characters to
my BS2SX. The buffer needs to be at least 2K bytes as the data is coming in
all the time - I don't want to miss any data. The stamp is busy for 70% of
the time doing other things.
My current solution is to use a an old Micromint RTC (an 8052 chip) as the
input buffer. I modified the Systronix BASIC serial port interrupt service
routines to make it become a 6K input serial buffer. I've linked the two
units together with primitive handshaking and it works fine.........BUT...
It's doubled the board footprint in my box, and it's expensive!!
Any ideas or urls would be appreciated!
Thanks,
Tony Wells
[noparse][[/noparse]Non-text portions of this message have been removed]
Comments
sales@r... writes:
> I've got a project which is a BS2SX acquiring serial data which is then used
> to switch some relays on and off. Easy you might think! Hmmn!
>
> I'm in need of an elegant (or cheap!!) way of buffering input characters to
> my BS2SX. The buffer needs to be at least 2K bytes as the data is coming in
> all the time - I don't want to miss any data. The stamp is busy for 70% of
> the time doing other things.
>
> My current solution is to use a an old Micromint RTC (an 8052 chip) as the
> input buffer. I modified the Systronix BASIC serial port interrupt service
> routines to make it become a 6K input serial buffer. I've linked the two
> units together with primitive handshaking and it works fine.........BUT...
>
Have you considered using flow control with SERIN? My January article for
Nuts & Volts magazine shows how to implement a working "co-processor" with
the BASIC Stamp. It uses SERIN with flow control and a timeout parameter.
If no command comes fromt he master, jumps out to a little task manager that
lets it do a piece of work before checking for the master command again.
This strategy is simple and will work in many applications.
-- Jon Williams
-- Parallax
[noparse][[/noparse]Non-text portions of this message have been removed]
from is a radio paging receiver spewing out 9600 bps continuously. It does
not have a buffer, handshaking to it is possible, but pointless as it does
not have a buffer. What is more, I don't want to miss the page intended for
my device because it costs money to send a page....
I've implemented handshaking between the RTC and the Stamp and gone further
by making the RTC an intelligent buffer in that it only listens for a subset
of the incoming pages that are coming in.
I thought of using two stamps, one continously listing and filtering, and
the other to do the relays - but if I do that the first stamp will stop
listening to the incoming stream whilst it is handshaking with the relay
stamp. Any chance that Parallax could implement a serial interrupt service
routine on the Stamp and uses external memory? :-)
Tony
> Have you considered using flow control with SERIN? My January article for
> Nuts & Volts magazine shows how to implement a working "co-processor" with
> the BASIC Stamp. It uses SERIN with flow control and a timeout parameter.
> If no command comes fromt he master, jumps out to a little task manager
that
> lets it do a piece of work before checking for the master command again.
>
> This strategy is simple and will work in many applications.
>
> -- Jon Williams
> -- Parallax
>
Original Message
From: <jonwms@a...>
To: <basicstamps@yahoogroups.com>
Sent: Monday, December 10, 2001 4:27 PM
Subject: Re: [noparse][[/noparse]basicstamps] Need Elegant Buffered Serial Input
> In a message dated 12/10/01 5:37:08 AM Central Standard Time,
> sales@r... writes:
>
>
> > I've got a project which is a BS2SX acquiring serial data which is then
used
> > to switch some relays on and off. Easy you might think! Hmmn!
> >
> > I'm in need of an elegant (or cheap!!) way of buffering input characters
to
> > my BS2SX. The buffer needs to be at least 2K bytes as the data is coming
in
> > all the time - I don't want to miss any data. The stamp is busy for 70%
of
> > the time doing other things.
> >
> > My current solution is to use a an old Micromint RTC (an 8052 chip) as
the
> > input buffer. I modified the Systronix BASIC serial port interrupt
service
> > routines to make it become a 6K input serial buffer. I've linked the two
> > units together with primitive handshaking and it works
fine.........BUT...
> >
>
> Have you considered using flow control with SERIN? My January article for
> Nuts & Volts magazine shows how to implement a working "co-processor" with
> the BASIC Stamp. It uses SERIN with flow control and a timeout parameter.
> If no command comes fromt he master, jumps out to a little task manager
that
> lets it do a piece of work before checking for the master command again.
>
> This strategy is simple and will work in many applications.
>
> -- Jon Williams
> -- Parallax
>
>
> [noparse][[/noparse]Non-text portions of this message have been removed]
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>