Serin and Serout commands
Tricky Nekro
Posts: 218
I've resently bought a second BS2 and I want to put it with work with my first one, using the serin-serout command and some shift-registors. A·pair of·74HC595 and 74HC165(you have helped me for this too, and I'm very thankful)·could be used for binary status like IR and bumper and the the serout-serin command can be used for swiching them (reading bumpers.... reading IR and so on...) But what about if I want to make a seach unit between base connection??? A needed number of wires could be connected automatically to the search unit by the base when a entering a magnetic, for exable, field.
The data trasmitted would be displayed by an serial LCD, and the could be about battery status at least!!!(By a NE555)
Now the thing, I want most, from you guys is documentation about these commands and of course any help is appriciated much.
Thankfully, Provas, Greece!!!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
-Rule your Destiny-
--Be Good. Be Bad. Be Provas--
The data trasmitted would be displayed by an serial LCD, and the could be about battery status at least!!!(By a NE555)
Now the thing, I want most, from you guys is documentation about these commands and of course any help is appriciated much.
Thankfully, Provas, Greece!!!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
-Rule your Destiny-
--Be Good. Be Bad. Be Provas--
Comments
It sounds to me like you need a copy of the Parallax PBASIC Stamp Manual, which can be downloaded for free from this location:
http://www.parallax.com/html_pages/downloads/basicstamps/documentation_basic_stamp.asp
My thoughts on locating a base unit are pretty simple. Presuming the robot will wander outside of just one room, or beyond just one small area, you will most likely need two technologies, one of which will be RF (wireless/radio frequency) since you will need to communicate around corners, or through walls, etc. Once you get in the same room, ultrasonics, I/R and other methods can be used to locate and align with the base unit.
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
The whole idea is to enable the communication between the base and the search unit once connected. It would be a 1-wire connection or whatever is possible and easy to make...The base could be used also as a recharge pad...but this doesn't matter. The idea is the connection, how to make and how to programm it to work.
Thankfully for your replies, Provas, Greece
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
-Rule your Destiny-
--Be Good. Be Bad. Be Provas--
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
The baudmode of the receiving unit must be at least equal to the the baudmode of the transmiting unit?
Also,·how we store and use status Data (%....)
I settled an exable:
BS2(E):
DO
SEROUT·1\0, 16780, [noparse]/noparse]"Battery Status", [color=blue]DEC2[/color] status, [color=purple]CR[/color
PAUSE·1000
LOOP
BS2(R):
Status VAR Word
DO
SERIN 1\0, 16780, [noparse][[/noparse]Status]
DEBUG Status
PAUSE 1000
LOOP
Of course this sample isn't right but how can i make it work???
Respectfully, Provas
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
-Rule your Destiny-
--Be Good. Be Bad. Be Provas--
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
DONT REST UNTIL YOU BEAT THE BEST
Basically, baud rate and bit rate are the same thing.
Since it's 'asynchronous', the reciever will 'clock itself', in effect. So you can send data using only a single signal wire and ground. This makes it very nice to connect one BS2 to another. And because the BS2 can use the same pin for input and output (at different times in the program) you can 'talk' and 'listen' on the same wire.
So, you connect a TX and RX signal wire (and ground) between the 'base' and the 'search' unit. Then you program the base to do 'SEROUT' on the TX line, and the 'search' to do a SERIN on the TX line.
p.s. the other pin is the flow control pin...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
-Rule your Destiny-
--Be Good. Be Bad. Be Provas--