Attached is some BASIC Stamp 2 test code with techniques that do a good job of filtering the noise.· Leave the receiver connected to the Debug Terminal to view the activity.
The RF receivers were designed for increased range, and now when they are not phase locked with a transmitter, they relay noise to the BASIC Stamp.· So, it has become the BASIC Stamp's job to filter the noise.·
I have some other code that allows the BASIC Stamp to periodically poll for messages so that it can attend to other tasks.· That code needs a few adjustments.· Depending on how things go, I'll have that posted, either later today or tomorrow.
Andy Lindsay said...
I have some other code that allows the BASIC Stamp to periodically poll for messages so that it can attend to other tasks.· That code needs a few adjustments.· Depending on how things go, I'll have that posted, either later today or tomorrow.
Well, instead of "tomorrow", it turned out to be "the day after tomorrow".· Sorry for the delay.·
Attached is the example code that allows the BASIC Stamp to attend to other tasks and prevents it from getting stuck on the SERIN command due to receiver noise.· As with the previous example code, keep the receiver connected to the Debug Terminal to view its performance.
The start pulses in the transmit program last 60 ms, while the receive program takes a 20 ms break, plus another 20 for the debug message, plus an RCTIME threshold of 8 ms.· This is actually cutting it kind of close; I'd rather see a 2 to 1 pulse duration to·"other tasks"·time ratio.· Even so, it seems to be working perfectly, with 4000 messages sent, zero messages missed or corrupted, and roughly 48000 breaks for other tasks successfully performed by the receiving BASIC Stamp 2.
Also, if your application sends and receives a continuous stream of messages with very short breaks (like 10 ms or less), the receiver will remain phase locked with the transmitter, and the noise shouldn't be a problem.· In that case, the example code that comes with the product documentation will suffice.
Thanks for the reply,
I will look into the code, although i am not familiar with the STAMP code. I am using a simple C program to send data via RS-232 port through a RS-232 to TTL signal converter chip to the transmitter so i do not know if I can replicate your solution in my code. Could you explain what exactly is causing the interference. Thanks
Amish
Comments
Attached is some BASIC Stamp 2 test code with techniques that do a good job of filtering the noise.· Leave the receiver connected to the Debug Terminal to view the activity.
The RF receivers were designed for increased range, and now when they are not phase locked with a transmitter, they relay noise to the BASIC Stamp.· So, it has become the BASIC Stamp's job to filter the noise.·
I have some other code that allows the BASIC Stamp to periodically poll for messages so that it can attend to other tasks.· That code needs a few adjustments.· Depending on how things go, I'll have that posted, either later today or tomorrow.
Regards, Andy
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Andy Lindsay
Education Department
Parallax, Inc.
Attached is the example code that allows the BASIC Stamp to attend to other tasks and prevents it from getting stuck on the SERIN command due to receiver noise.· As with the previous example code, keep the receiver connected to the Debug Terminal to view its performance.
The start pulses in the transmit program last 60 ms, while the receive program takes a 20 ms break, plus another 20 for the debug message, plus an RCTIME threshold of 8 ms.· This is actually cutting it kind of close; I'd rather see a 2 to 1 pulse duration to·"other tasks"·time ratio.· Even so, it seems to be working perfectly, with 4000 messages sent, zero messages missed or corrupted, and roughly 48000 breaks for other tasks successfully performed by the receiving BASIC Stamp 2.
Also, if your application sends and receives a continuous stream of messages with very short breaks (like 10 ms or less), the receiver will remain phase locked with the transmitter, and the noise shouldn't be a problem.· In that case, the example code that comes with the product documentation will suffice.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Andy Lindsay
Education Department
Parallax, Inc.
I will look into the code, although i am not familiar with the STAMP code. I am using a simple C program to send data via RS-232 port through a RS-232 to TTL signal converter chip to the transmitter so i do not know if I can replicate your solution in my code. Could you explain what exactly is causing the interference. Thanks
Amish