Shop OBEX P1 Docs P2 Docs Learn Events
basic stamp communication with flow control — Parallax Forums

basic stamp communication with flow control

pathikgohil85pathikgohil85 Posts: 21
edited 2011-11-29 09:28 in BASIC Stamp
Hello Folks,

I have achieved success and established communication setup with two basic stamps. Where my slave sends data and master receives it. I want to introduce flow control in my current master and slave code. Please help me with that.

i tried with all the flow control pin @ 1. I am not getting any result.

Master Side

FOR CTR=0 TO 24
SERIN 3\4,240,700,LOOP, [DEC I(CTR)]
NEXT

'SERIN 3,240,700,LOOP,[DEC I(0),DEC I(1),DEC I(2)]


MESGOUT:
PAUSE 25
SEROUT 16\4, 240, ["MASTER "]
SEROUT 16\4,240, [DEC I(0)," ",DEC I(1)," ",DEC I(2)," "]
SEROUT 16\4,240, [DEC I(3)," ",DEC I(4)," ",DEC I(5)," ",DEC I(6)," ",DEC I(7)," ",DEC I(8)," ",DEC I(9)," "]
SEROUT 16\4,240, [DEC I(10)," ",DEC I(11)," ",DEC I(12)," ",DEC I(13)," ",DEC I(14)," ",DEC I(15)," ",DEC I(16)," ",DEC I(17)," ",DEC I(18)," ",DEC I(19)," "]
SEROUT 16\4,240, [DEC I(20)," ",DEC I(21)," ",DEC I(22)," ",DEC I(23)," ",DEC I(24)," "]



Slave side
FOR CTR=0 TO 24
SEROUT 14\15,240, [DEC I(CTR)," "]
NEXT

SEROUT 14\15,240, [13,13]
MESGOUT:
PAUSE 1000


I appreciate your prompt response

Best regards
Pathik Gohil

Comments

  • stamptrolstamptrol Posts: 1,731
    edited 2011-11-29 09:28
    The best reference for flow control is in the Editor helpfile under the SERIN entry. Sample code is given, although you'll see that the declaration for SO/FC are reversed in the sample programs. Fix that, and the code works, I believe.

    Cheers,
Sign In or Register to comment.