Shop OBEX P1 Docs P2 Docs Learn Events
don't understand — Parallax Forums

don't understand

yzcheyzche Posts: 35
edited 2004-08-13 16:55 in BASIC Stamp
I am trying to use SERIN and SEROUT command with 2 BS2 by using wire. SERIN receive input but I did not sent anything.

following code is modified code from RF manual(I don't use RF in this case).
'---Set up Variables---Value VAR Byte 'Holds data value being transmitted'---Set up Constants---Rx CON 13 'Receive I/O pin numberTx CON 15 'Transmit I/O pin numberTxFlow CON 14 'Transmit flow control I/O pin numberN9600 CON $4054 'Baud mode value for 9600 baud, 8,N,1'
Main Routine'Receive dataReceiverMain: SERIN Rx\TxFlow,N9600,[noparse][[/noparse]Value] 'Receive one byte DEBUG "Receiving: ",DEC3 Value,CRGOTO ReceiverMain 'Then start over again'
end
Everytime a metal object(ie. screw driver) touches pin 13, the BS2 will showReceiving: 254Receiving: 255Receiving: 255Receiving: 255Receiving: 000Receiving: 011Receiving: 255Receiving: 001Receiving: 005Receiving: 255Receiving: 255Receiving: 255Receiving: 009Receiving: 000Receiving: 254Receiving: 111Receiving: 095Receiving: 254Receiving: 254

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-08-13 16:55
    Remove the metal object from your circuit....

    You can find samples using flow control in the Help file; look under SERIN and SEROUT.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
Sign In or Register to comment.