Serin problem
pusink
Posts: 68
I have 2 code, 1st - PC_comm, I use this code to control BS2sx via PC and 2nd - RFID, i use this code to get ID number from RFID reader and send to PC. how to write this two code inside 1 chip....??
Comments
There are some compromises which have to be considered.
1. The Stamp can only deal with one task at a time, and it has no serial communication buffer. Suppose the priority job is to watch for input from the RFID. The Stamp can easily capture this data then immediately send it to the PC (which does have a comm buffer).
2. Should the Stamp be waiting at an appropriate SERIN command when the PC sends its string, all will be well. But, the Stamp's priority is the RFID so it is likely the Stamp will miss the PC's message.
3. It may be possible for the Stamp to have two loops, one watching the RFID and the second watching the PC. By alternating back and forth at some time period, say 0.5 seconds, the system may be able to perform both tasks. It may also be possible for either the PC or RFID to send multiple copies of the strings on each transmission so that the Stamp has more time to be at the appropriate SERIN.
Cheers,
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tom Sisk
http://www.siskconsult.com
·