Society of Robots - Robot Forum
Software => Software => Topic started by: Robotboy86 on July 09, 2007, 12:46:16 PM
-
I am looking to use the BasicAtom Pro24 as a sub system for a more advanced robot, its basic job will to be taking in input from 4-6 sensors and making motors adjusting of some sort. The other thing I was looking at for this, is communication to the main CPU. I was planning to do this via Serial, but there are problems:
1. The basic stamp has to sit and wait for a communication.
2. While waiting, it does nothing else. This would result in robotic failure :(
So I was browsing other basic options. and saw the basic atom pro 24m..
it claims to have a buffered serial communication system..
which would basically allow it to recieve serial data while not listening, correct?
Could someone explain what it means by buffered?
-
robotboy, most microcontrollers with hardware serial communications (like pic, avr, and stamps) have a buffer that recieves a character and holds it on memory while you decide what to do with it.
I don't know with basic stamps, but with "normal" microcontrollers, there are interrupts that trigger when a serial commmunication is detected and also they have special registers for that, so in your code you ask "Is there data in the buffer?" and it will return either a 0 or 1.
Look in the PBASIC reference if there is an interruption for serial communications or at least a command that will let you check if there is data available.
-
Thats what I had thought, but I read about the basic stamps that they had nothing like that, so I was unsure.
Appreciate the response,
Cheers
-
Just send your serial data continuously so the robot wont have to wait?
Or have your robot use the last serial command until it recieves a new one.