strange SERIN behaviour
I am running a simple bs2sx program to display 80 leds.
For this I receive 10 bytes via pin2.
The mainloop in the attached program is
main:
·· SERIN RX2\TX2,CMDBAUD,CMDTO,main,[noparse][[/noparse]STR _ledarray\10] 'read 10 bytes into _ledarray
·· 'SERIN RX2,CMDBAUD,CMDTO,main,[noparse][[/noparse]STR _ledarray\10] 'read 10 bytes into _ledarray
·· for temp=0 to 9 'display _ledarray bytes if serial data received
·· debug hex2 _ledarray(temp),13
·· next
·· GOTO main
When I use·the serin with handshake, then·I receive all 0xFF all the time, but the RX is not connected.
When I use the serin without handshake,·then·I receive no data, as it should, because RX is not connected.
I do need the handshake to inform the source device that it may send the 10 bytes.
Funny thing is, I used the same program on an identical board just a few weeks ago
without any problem. Could it be a faulty bs2sx?
Can I work around this by using a manual handshake
high TX 'allow transmission of 10 bytes
SERIN RX2,CMDBAUD,CMDTO,main,[noparse][[/noparse]STR _ledarray\10] 'read 10 bytes into _ledarray
low TX 'disallow transmission of 10 bytes
or is there than a change of missing data?
regards peter
For this I receive 10 bytes via pin2.
The mainloop in the attached program is
main:
·· SERIN RX2\TX2,CMDBAUD,CMDTO,main,[noparse][[/noparse]STR _ledarray\10] 'read 10 bytes into _ledarray
·· 'SERIN RX2,CMDBAUD,CMDTO,main,[noparse][[/noparse]STR _ledarray\10] 'read 10 bytes into _ledarray
·· for temp=0 to 9 'display _ledarray bytes if serial data received
·· debug hex2 _ledarray(temp),13
·· next
·· GOTO main
When I use·the serin with handshake, then·I receive all 0xFF all the time, but the RX is not connected.
When I use the serin without handshake,·then·I receive no data, as it should, because RX is not connected.
I do need the handshake to inform the source device that it may send the 10 bytes.
Funny thing is, I used the same program on an identical board just a few weeks ago
without any problem. Could it be a faulty bs2sx?
Can I work around this by using a manual handshake
high TX 'allow transmission of 10 bytes
SERIN RX2,CMDBAUD,CMDTO,main,[noparse][[/noparse]STR _ledarray\10] 'read 10 bytes into _ledarray
low TX 'disallow transmission of 10 bytes
or is there than a change of missing data?
regards peter
Comments
If RX is not connected, it may be hard to say what you should be seeing since that pin is not dedicated.
-Martin
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Martin Hebel
StampPlot - Graphical Data Acquisition and Control
AppBee -·2.4GHz Wireless Adapters & transceivers·for the BASIC Stamp & Other controllers·
runs on an identical board. The board is also fine because it
receives data flawlessly when not using the handshake.
When I select the handshake mode, I receive 0xFF alll the time,
even when not sending data.
But I just figured out what the problem was.
The rx wire was not connected to the device and probably picked
up some noise. That still does not explain why I didn't get
the 0xFF when not using handshake.
It is no more issue now, because it appears to operate fine now.
Thanks anyway for responding.
regards peter
I hesitate to mention this to somebody like Peter, since if anybody knows Parallax in depth, he does. But still.