Is it possible to SEROUT simultaneously from 4 pins?
holely
Posts: 9
Hi again,
I'm doing a project for race management system, and I need to send out signals to 4 different BS2 simultaneously to start timing for each of the 4 cars. So is it possible to do as mentioned above? If so, what is the syntax?
Thanks!
I'm doing a project for race management system, and I need to send out signals to 4 different BS2 simultaneously to start timing for each of the 4 cars. So is it possible to do as mentioned above? If so, what is the syntax?
Thanks!
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas, TX· USA
Bus the stamps together: does it mean connecting them on one common communication line, say all the pins 1? If so how to talk to each individually?
· SEROUT TX, Baud, [noparse][[/noparse]addr, cmd]
When you want to talk to all, set addr to 0; when you want to talk to an individual, set to that individual address. Inside the slave(s):
· SERIN RX, Baud, [noparse][[/noparse]addr, cmd]
· IF (addr = 0) OR (addr = MyAddr) THEN
··· ' work with cmd
· ENDIF
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas, TX· USA
Thanks!
If so, its really weird. I clicked on Memory Map in PBASIC and it seems that like BS2, it has onli 2K Bytes EEPROM. The same program takes up the same percentage of EEPROM size.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas, TX· USA
This is NOT a 'call subroutine' type interface -- but there are code work-arounds that let you emulate that kind of interface using this mechanism. Quite elegant really. Search for "Slots" or "Program Slots" for more information.
On one BS2 I have this line:
SEROUT 1\0, 16780, [noparse][[/noparse]181]
And on another BS2sx I have this line:
SERIN 1, 17405, [noparse][[/noparse]com]
where com is a variable byte.
So does it make any difference if I put "\0" behind the "SERIN 1" command?
I try to rephrase: without that "\0" on the SERIN but keeping the "\0" in the SEROUT, does the flow control process still take place?
If the SERIN zero pin has the proper state by default, then the transfer can take place.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas, TX· USA
You don't really need flow control. The BS2 will sit in the SERIN command forever (if you don't give it a timeout parameter) waiting to recieve the data. I suggest you remove it from your SEROUT as well, if it's not working for you.