don't understand
yzche
Posts: 35
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
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
You can find samples using flow control in the Help file; look under SERIN and SEROUT.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office