PDA

View Full Version : Communication propeller <-> BS2



Hoffa
01-11-2008, 03:17 AM
Hi

I want my Propeller to communicate with my BS2. Someone who have an "helloworld"-example in both directions?

/hoffa

Hoffa
01-12-2008, 08:22 PM
Someone who know how to connect them to make it work?

deSilva
01-12-2008, 08:34 PM
Sorry I have no BS2 knowledge at all.

If you need a full-duplex line you should connect the transmit pin of the BS2 (I think there must be something like that) using a 10k resistor with any Propeller Pin (maybe with the exception of 28,29,30.31) and the receive pin of the BS2 with any other Pin of the Propeller. If you are a paranoic like me - or you tend to mix up lines - you may use a 1k resistor here, too.

Then you decide for a bit rate (say 2400, to not overextend the BS2




OBJ ser : "SimpleSerial"
PUB main
ser.start(1, 2, 2400)
REPEAT
ser.tx(ser.rx)


It will not work perfectly... Thats for you to find out why...

Hoffa
01-13-2008, 08:09 PM
Do I have to connect the grounds on BS2 and propeller?

deSilva
01-13-2008, 09:04 PM
Hmpf... yes http://forums.parallax.com/images/smilies/smile.gif Thank you!

BTW: First parameter of ser.start is RCV (the 10k resistor line, to protect against the 5V from the BS2)
Second parameter is XMIT (outputting 3V only, but it will work for the BS2 Stamp)

Note that in many cases the lines will get "inverted" by external logic (MAX 232, transistors,...)
As we neither do this with the Propeller nor with the Stamp we can just use the standard settings.
(MINUS*MINUS = PLUS)

Post Edited (deSilva) : 1/13/2008 1:15:17 PM GMT

Leon
01-13-2008, 09:42 PM
Hoffa said...
Do I have to connect the grounds on BS2 and propeller?
Yes!

Leon


▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle