Serial Interface
Archiver
Posts: 46,084
Hello all,
After asking some questions few days ago about serial connection I have
already over come most of my problems with Max232 chip. The only occurred
problem is that when I receive massages with the BS2 like that:
SERIN Rpin, BMode,40000,NoConnection,[noparse][[/noparse]STR SerString\7]
when baud rate is set to 84 I get the characters that I expect not exactly
in the write position, Example:
The massage coming in is "CONNECT"
I Get in memory the next thing -> |D|A|C|O|N|N|E|C|T|
The letters D and A in the place of SerString(0) and SerString(1) where not
expected at all. It seems they always there when I am using serin.
I tried to change the rate to lower baud (2400) but the problem still
exists. Another occurred thing is when I print this string to debug window:
DEBUG STR SerString,CR
I get only the right characters from the third place in the array and on
like you would expect.
Is anyone bumped into this problem ? Am I doing something wrong ?
My Home Telephone Number is: +972-3-6021184
My Fax Number is: +972-9-9587360
My Home Telephone Number is: +972-56-546756
Azriel Roy
After asking some questions few days ago about serial connection I have
already over come most of my problems with Max232 chip. The only occurred
problem is that when I receive massages with the BS2 like that:
SERIN Rpin, BMode,40000,NoConnection,[noparse][[/noparse]STR SerString\7]
when baud rate is set to 84 I get the characters that I expect not exactly
in the write position, Example:
The massage coming in is "CONNECT"
I Get in memory the next thing -> |D|A|C|O|N|N|E|C|T|
The letters D and A in the place of SerString(0) and SerString(1) where not
expected at all. It seems they always there when I am using serin.
I tried to change the rate to lower baud (2400) but the problem still
exists. Another occurred thing is when I print this string to debug window:
DEBUG STR SerString,CR
I get only the right characters from the third place in the array and on
like you would expect.
Is anyone bumped into this problem ? Am I doing something wrong ?
My Home Telephone Number is: +972-3-6021184
My Fax Number is: +972-9-9587360
My Home Telephone Number is: +972-56-546756
Azriel Roy
Comments
returns and line feeds...
Check the value f the two characters, if they are ASCII 10 or 13 decimal (I
think, could be $10 and $13), then this is the case.
Steve
Original Message
From: "Roy Azriel" <royaz@z...>
To: <basicstamps@yahoogroups.com>
Sent: Tuesday, July 22, 2003 2:30 PM
Subject: [noparse][[/noparse]basicstamps] Serial Interface
> Hello all,
> After asking some questions few days ago about serial connection I have
> already over come most of my problems with Max232 chip. The only occurred
> problem is that when I receive massages with the BS2 like that:
>
> SERIN Rpin, BMode,40000,NoConnection,[noparse][[/noparse]STR SerString\7]
>
> when baud rate is set to 84 I get the characters that I expect not exactly
> in the write position, Example:
> The massage coming in is "CONNECT"
> I Get in memory the next thing -> |D|A|C|O|N|N|E|C|T|
> The letters D and A in the place of SerString(0) and SerString(1) where
not
> expected at all. It seems they always there when I am using serin.
> I tried to change the rate to lower baud (2400) but the problem still
> exists. Another occurred thing is when I print this string to debug
window:
> DEBUG STR SerString,CR
> I get only the right characters from the third place in the array and on
> like you would expect.
>
> Is anyone bumped into this problem ? Am I doing something wrong ?
>
>
> My Home Telephone Number is: +972-3-6021184
> My Fax Number is: +972-9-9587360
> My Home Telephone Number is: +972-56-546756
> Azriel Roy
>
>
>
> 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/
>
You should know if you send ctrl-A (CHR(10))
and ctrl-D (CHR(13)) to the DEBUG window,
you'll get a line-feed for one, and a 'start of
line' for the other.
I assume the app that is putting out the
'CONNECT' string is:
printf ('\nCONNECT');
On a PC, the '\n' will give you the
Ctrl-A + Ctrl-D combination.
If you really want to know what's in a
string, do:
for i = 1 to 9
DEBUG DEC SerString(I)
NEXT
--- In basicstamps@yahoogroups.com, "Steve Ziuchkovski"
<zman97211@y...> wrote:
> Quite possibly the two characters you're receiving first are
carriage
> returns and line feeds...
>
> Check the value f the two characters, if they are ASCII 10 or 13
decimal (I
> think, could be $10 and $13), then this is the case.
>
> Steve
>
>
Original Message
> From: "Roy Azriel" <royaz@z...>
> To: <basicstamps@yahoogroups.com>
> Sent: Tuesday, July 22, 2003 2:30 PM
> Subject: [noparse][[/noparse]basicstamps] Serial Interface
>
>
> > Hello all,
> > After asking some questions few days ago about serial connection
I have
> > already over come most of my problems with Max232 chip. The only
occurred
> > problem is that when I receive massages with the BS2 like that:
> >
> > SERIN Rpin, BMode,40000,NoConnection,[noparse][[/noparse]STR SerString\7]
> >
> > when baud rate is set to 84 I get the characters that I expect
not exactly
> > in the write position, Example:
> > The massage coming in is "CONNECT"
> > I Get in memory the next thing -> |D|A|C|O|N|N|E|C|T|
> > The letters D and A in the place of SerString(0) and SerString(1)
where
> not
> > expected at all. It seems they always there when I am using serin.
> > I tried to change the rate to lower baud (2400) but the problem
still
> > exists. Another occurred thing is when I print this string to
debug
> window:
> > DEBUG STR SerString,CR
> > I get only the right characters from the third place in the array
and on
> > like you would expect.
> >
> > Is anyone bumped into this problem ? Am I doing something wrong ?
> >
> >
> > My Home Telephone Number is: +972-3-6021184
> > My Fax Number is: +972-9-9587360
> > My Home Telephone Number is: +972-56-546756
> > Azriel Roy
> >
> >
> >
> > 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/
> >