AW: [basicstamps] Re: serial communication
Archiver
Posts: 46,084
Hi Helpers,
thanks very much, I thinbk I have to explain more clearly: the CMU cam is a
videocam that processes data by itself and gives out serial information
about the RGB deviation and so on. I am not cramming whole images into the
stamp.
I tried to use the bsx but the result is almost the same.
Some more misteries:
When I send a command, the cmu answers with "ACK". I never get this respond
when I read in the serial data. BUT when I use the stamp's WAIT command in
the serin command it passes on so there must be a ACK comming but I cannot
see it.
Another question: when I read serial data into an array, for example
INDATA VAR BYTE (10)
by using a command like
serin 2,baud,[noparse][[/noparse]str indata\4]
shouldn't I get four BYTE from the incoming stream?
Instead I get only 8 digits, so when the camera sends
23,211,8,45
I will recieve
23,2
Does this make sense to you?
Thanks for further help,
Uli
Urspr
thanks very much, I thinbk I have to explain more clearly: the CMU cam is a
videocam that processes data by itself and gives out serial information
about the RGB deviation and so on. I am not cramming whole images into the
stamp.
I tried to use the bsx but the result is almost the same.
Some more misteries:
When I send a command, the cmu answers with "ACK". I never get this respond
when I read in the serial data. BUT when I use the stamp's WAIT command in
the serin command it passes on so there must be a ACK comming but I cannot
see it.
Another question: when I read serial data into an array, for example
INDATA VAR BYTE (10)
by using a command like
serin 2,baud,[noparse][[/noparse]str indata\4]
shouldn't I get four BYTE from the incoming stream?
Instead I get only 8 digits, so when the camera sends
23,211,8,45
I will recieve
23,2
Does this make sense to you?
Thanks for further help,
Uli
Urspr
Comments
>Hi Helpers,
>
>thanks very much, I thinbk I have to explain more clearly: the CMU cam is a
>videocam that processes data by itself and gives out serial information
>about the RGB deviation and so on. I am not cramming whole images into the
>stamp.
>
>I tried to use the bsx but the result is almost the same.
>
>Some more misteries:
>
>When I send a command, the cmu answers with "ACK". I never get this respond
>when I read in the serial data. BUT when I use the stamp's WAIT command in
>the serin command it passes on so there must be a ACK comming but I cannot
>see it.
>
>Another question: when I read serial data into an array, for example
>
>INDATA VAR BYTE (10)
>
> by using a command like
>
>serin 2,baud,[noparse][[/noparse]str indata\4]
>
>shouldn't I get four BYTE from the incoming stream?
>Instead I get only 8 digits, so when the camera sends
>
>23,211,8,45
>
>I will recieve
>
>23,2
>
>Does this make sense to you?
Sure - You asked for four characters, and you got four - where's the surprise ?
This presumes the commas are embedded in the data. Is that the case ? You may
want to read the data in using the DEC3 modifier. I believe that the
appropriate one to use.
>Thanks for further help,
>
>Uli
Bruce
to send:
ASCII(23),ASCII(211),ASCII(8),ASCII(45) (string of 4 chars)
but it sends
"23,211,8,45" (a string of 11 chars)
thus the first 4 characters result in "23,2" which is what you get
did this help?
regards