Communication Propeller - Basic Stamp
Hi guys,
I need to communicate Propeller with Basic Stamp 2pe.
I was thinking about using 2 wires, one for data in and one for data out, but it didn't work. I also tried to put a 22k resistor in the pin of the BS2pe that I was using for receive data from the propeller, but it also didn't work.
I searched about it here in the forum, but I didn't find anything. I only found some threads about communication between 2 props or 2 BS.
Can anybody help me with it?
Thanks in advance!
Daniel Reis
I need to communicate Propeller with Basic Stamp 2pe.
I was thinking about using 2 wires, one for data in and one for data out, but it didn't work. I also tried to put a 22k resistor in the pin of the BS2pe that I was using for receive data from the propeller, but it also didn't work.
I searched about it here in the forum, but I didn't find anything. I only found some threads about communication between 2 props or 2 BS.
Can anybody help me with it?
Thanks in advance!
Daniel Reis
Comments
I tried to connect both without resistors, and in a common ground as you said, Jonny, but it didn't work.
I used the BS2_Functions OBJ from OBEX, and tried to use the following line, to make a test:
BS.serout_dec(tx, number, baudRate, polarity, bits)
I used 9600 baudRate, polarity inverted (0), 8 bits
In Basic Stamp, I used:
SERIN rx, baud, timeout, fail, [DEC rec]
baud = 16468, that is 9600, 8-bit, no parity, inverted
And when I try to run this, Basic Stamp can't receive anything from propeller.
Is there anything wrong with my code?
It should work ok.
-Martin
If you would post both codes used, It would make this a lot easier.
'
Its hard to tell witch is at fault if any, being one sided.
'
What is the BS2's full code?
'
This is very easy to do, You just need both Micro's on the same page!
I tested both sending data from propeller to basic stamp and from BS to propeller, and everything worked fine.
Thanks everyone for the help!
I just didn't understand why the communication from propeller to BS uses polarity inverted and from BS to propeller uses it non-inverted. What's the reason?
Propeller:
BS:
Now, from BS to propeller:
Propeller:
BS:
I connected TX pin of propeller(0) in RX of BS(0) and RX of propeller(1) in TX of BS(1), without resistors or anything else. I'm also using the same ground for BS and propeller