Serial Communication Application
Archiver
Posts: 46,084
I need help on the following application.
I need to monitor a serial stream where the start of the stream is @@
+ 121 bytes of data and the end 4 bytes.
What I need to do is monitor the 100th byte of data. bases on the
100th byte I need to do something. Can you please post an example of
the code that I would need when using a stamp II
Thank you
Mauro
I need to monitor a serial stream where the start of the stream is @@
+ 121 bytes of data and the end 4 bytes.
What I need to do is monitor the 100th byte of data. bases on the
100th byte I need to do something. Can you please post an example of
the code that I would need when using a stamp II
Thank you
Mauro
Comments
You could try something like this:
InterestingByte var byte
SERIN 0,16468,[noparse][[/noparse]WAIT("@@"), SKIP 99, InterestingByte]
The SERIN command above will wait for the start of your serial data stream
and after a further 99 bytes will store the value of the next (hundredth)
data byte in the variable InterestingByte.
Best regards,
Russell Warburton
email: russell@w...
website: http://www.warburtech.com
telephone: +44 (0)7814 044 754
Original Message
From: "mdbware2000" <mdbware@h...>
To: <basicstamps@yahoogroups.com>
Sent: Saturday, November 01, 2003 8:03 PM
Subject: [noparse][[/noparse]basicstamps] Serial Communication Application
> I need help on the following application.
> I need to monitor a serial stream where the start of the stream is @@
> + 121 bytes of data and the end 4 bytes.
> What I need to do is monitor the 100th byte of data. bases on the
> 100th byte I need to do something. Can you please post an example of
> the code that I would need when using a stamp II
>
>
> Thank you
>
> Mauro
>
>
> 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/
>
>
>
II for this purpose. It is no problem at 2400 baud, but it would be
at full out 9600 or more.
-- Tracy
>Hi Mauro,
>
>You could try something like this:
>
>InterestingByte var byte
>
>SERIN 0,16468,[noparse][[/noparse]WAIT("@@"), SKIP 99, InterestingByte]
>
>The SERIN command above will wait for the start of your serial data stream
>and after a further 99 bytes will store the value of the next (hundredth)
>data byte in the variable InterestingByte.
>
>Best regards,
>
>Russell Warburton
>email: russell@w...
>website: http://www.warburtech.com
>telephone: +44 (0)7814 044 754
>
Original Message
>From: "mdbware2000" <mdbware@h...>
>To: <basicstamps@yahoogroups.com>
>Sent: Saturday, November 01, 2003 8:03 PM
>Subject: [noparse][[/noparse]basicstamps] Serial Communication Application
>
>
>> I need help on the following application.
>> I need to monitor a serial stream where the start of the stream is @@
>> + 121 bytes of data and the end 4 bytes.
>> What I need to do is monitor the 100th byte of data. bases on the
>> 100th byte I need to do something. Can you please post an example of
>> the code that I would need when using a stamp II
>>
>>
>> Thank you
>>
>> Mauro
>>
>>
>> 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/
>>
>>
>>
>
>
>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/
The baud rate will be 9600.
I am ok in using a stamp II
Thank you
Mauro
--- In basicstamps@yahoogroups.com, Tracy Allen <tracy@e...> wrote:
> What is the baud rate? That makes a difference for using the
Stamp
> II for this purpose. It is no problem at 2400 baud, but it would
be
> at full out 9600 or more.
>
> -- Tracy
>
> >Hi Mauro,
> >
> >You could try something like this:
> >
> >InterestingByte var byte
> >
> >SERIN 0,16468,[noparse][[/noparse]WAIT("@@"), SKIP 99, InterestingByte]
> >
> >The SERIN command above will wait for the start of your serial
data stream
> >and after a further 99 bytes will store the value of the next
(hundredth)
> >data byte in the variable InterestingByte.
> >
> >Best regards,
> >
> >Russell Warburton
> >email: russell@w...
> >website: http://www.warburtech.com
> >telephone: +44 (0)7814 044 754
> >
Original Message
> >From: "mdbware2000" <mdbware@h...>
> >To: <basicstamps@yahoogroups.com>
> >Sent: Saturday, November 01, 2003 8:03 PM
> >Subject: [noparse][[/noparse]basicstamps] Serial Communication Application
> >
> >
> >> I need help on the following application.
> >> I need to monitor a serial stream where the start of the stream
is @@
> >> + 121 bytes of data and the end 4 bytes.
> >> What I need to do is monitor the 100th byte of data. bases on
the
> >> 100th byte I need to do something. Can you please post an
example of
> >> the code that I would need when using a stamp II
> >>
> >>
> >> Thank you
> >>
> >> Mauro
> >>
> >>
> >> 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/
> >>
> >>
> >>
> >
> >
> >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/
The baud rate will be 9600.
I am ok in using a stamp II
Thank you
Mauro
--- In basicstamps@yahoogroups.com, Tracy Allen <tracy@e...> wrote:
> What is the baud rate? That makes a difference for using the
Stamp
> II for this purpose. It is no problem at 2400 baud, but it would
be
> at full out 9600 or more.
>
> -- Tracy
>
> >Hi Mauro,
> >
> >You could try something like this:
> >
> >InterestingByte var byte
> >
> >SERIN 0,16468,[noparse][[/noparse]WAIT("@@"), SKIP 99, InterestingByte]
> >
> >The SERIN command above will wait for the start of your serial
data stream
> >and after a further 99 bytes will store the value of the next
(hundredth)
> >data byte in the variable InterestingByte.
> >
> >Best regards,
> >
> >Russell Warburton
> >email: russell@w...
> >website: http://www.warburtech.com
> >telephone: +44 (0)7814 044 754
> >
Original Message
> >From: "mdbware2000" <mdbware@h...>
> >To: <basicstamps@yahoogroups.com>
> >Sent: Saturday, November 01, 2003 8:03 PM
> >Subject: [noparse][[/noparse]basicstamps] Serial Communication Application
> >
> >
> >> I need help on the following application.
> >> I need to monitor a serial stream where the start of the stream
is @@
> >> + 121 bytes of data and the end 4 bytes.
> >> What I need to do is monitor the 100th byte of data. bases on
the
> >> 100th byte I need to do something. Can you please post an
example of
> >> the code that I would need when using a stamp II
> >>
> >>
> >> Thank you
> >>
> >> Mauro
> >>
> >>
> >> 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/
> >>
> >>
> >>
> >
> >
> >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/
your BS2 at 9600 baud, don't be too surprised. The code is good,
it's just that the BS2 might have trouble keeping up. If you have
any control over the transmission at the other end, the situation can
be improved by setting it for 2 stop bits, or for 1 millisecond or
more of pacing, or for a lower baud rate.
If not, you might get better results with a Stamp 2sx or 2p, or, by
using an external RS232 chip with a large enough buffer.
-- Tracy
>Thank you for the reply.
>
>The baud rate will be 9600.
>I am ok in using a stamp II
>
>Thank you
>
>Mauro
>
>--- In basicstamps@yahoogroups.com, Tracy Allen <tracy@e...> wrote:
>> What is the baud rate? That makes a difference for using the
>Stamp
>> II for this purpose. It is no problem at 2400 baud, but it would
>be
>> at full out 9600 or more.
>>
>> -- Tracy
>>
>> >Hi Mauro,
>> >
>> >You could try something like this:
>> >
>> >InterestingByte var byte
>> >
>> >SERIN 0,16468,[noparse][[/noparse]WAIT("@@"), SKIP 99, InterestingByte]
>> >
>> >The SERIN command above will wait for the start of your serial
>data stream
>> >and after a further 99 bytes will store the value of the next
>(hundredth)
>> >data byte in the variable InterestingByte.
>> >
>> >Best regards,
>> >
>> >Russell Warburton
>> >email: russell@w...
>> >website: http://www.warburtech.com
>> >telephone: +44 (0)7814 044 754
>> >
Original Message
>> >From: "mdbware2000" <mdbware@h...>
>> >To: <basicstamps@yahoogroups.com>
>> >Sent: Saturday, November 01, 2003 8:03 PM
>> >Subject: [noparse][[/noparse]basicstamps] Serial Communication Application
>> >
>> >
>> >> I need help on the following application.
>> >> I need to monitor a serial stream where the start of the stream
>is @@
>> >> + 121 bytes of data and the end 4 bytes.
>> >> What I need to do is monitor the 100th byte of data. bases on
>the
>> >> 100th byte I need to do something. Can you please post an
>example of
>> >> the code that I would need when using a stamp II
>> >>
>> >>
>> >> Thank you
>> >>
>> >> Mauro
>> >>
>> >>
>> >> 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/
>> >>
>> >>
>> >>
>> >
>> >
>> >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/
>
>
>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/