as the basic transmit issue
jimltlee
Posts: 6
I am trying to check the·function of·wireless component by Stamp (BS2)
I am thinking to summit the signal out by 1 pin and read the signal from·another pin,if·the·output=input
it means the connection is correct...··· so , I use the descption below,·but the data·I got is·always '0000'
and,even I connect the CON 14 &CON 15 by the wire, the result is the same failure, I have no idea what
is the problem.
[noparse][[/noparse]code]
· createdata········ VAR·· Byte
· finaldata········ ·· VAR·· Byte
· CLK·· CON 2
·
· RANDOM createdata
· SHIFTOUT 14,CLK,MSBPRE,[noparse][[/noparse]createdata\4]
··SHIFTIN 15,CLK,MSBPRE,[noparse][[/noparse]finaldata\4]
··DEBUG CR, CR, "the data we sent is " ,BIN4 createdata
· DEBUG CR,CR,"the data we got is ",BIN4 finaldata ,CR,CR
· PAUSE 500
RETURN
I am thinking to summit the signal out by 1 pin and read the signal from·another pin,if·the·output=input
it means the connection is correct...··· so , I use the descption below,·but the data·I got is·always '0000'
and,even I connect the CON 14 &CON 15 by the wire, the result is the same failure, I have no idea what
is the problem.
[noparse][[/noparse]code]
· createdata········ VAR·· Byte
· finaldata········ ·· VAR·· Byte
· CLK·· CON 2
·
· RANDOM createdata
· SHIFTOUT 14,CLK,MSBPRE,[noparse][[/noparse]createdata\4]
··SHIFTIN 15,CLK,MSBPRE,[noparse][[/noparse]finaldata\4]
··DEBUG CR, CR, "the data we sent is " ,BIN4 createdata
· DEBUG CR,CR,"the data we got is ",BIN4 finaldata ,CR,CR
· PAUSE 500
RETURN
Comments
The SHIFTOUT is COMPLETE before the SHIFTIN is even fetched for execution, so there is no data to receive. You would need to use a transmitting microprocessor, and a receiving microprocessor to accomplish what you're trying to do.
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔