View Full Version : serial comunication rs232
05-10-2008, 12:19 AM
Hello this is the first time for me on this forum, i have a little problem and i'm looking for someone that can help me...I'm new whit the propeller chip and i don't know how to interface my propeller board whit pc trought rs232 serial protocol.ˇˇShould i use a circuit adapter? and if it's true can i use a max232 chip? and then does exist a libraryes that can i use?
thank you all and sorry for my bad english
05-10-2008, 12:54 AM
There's a schematic here (www.parallax.com/tabid/254/Default.aspx (http://www.parallax.com/tabid/254/Default.aspx)) that shows an RS232 to Propeller adapter using a few transistors. If you are not using this for programming, you can leave out the transistor connected to the reset pin. You could also use a MAX3232 which is a 3.3V version of the MAX232. The Propeller is a 3.3V device and can be damaged if connected directly to a MAX232.
Included with the Propeller Tool is an object (library) called "FullDuplexSerial" which implements a buffered Full Duplex Serial channel up to about 230KBaud. There's no flow control, but the buffers can be made larger than the default 16 bytes and that usually avoids the need for flow control.
There's also a slower "Simple_Serial" object in the Propeller Object Exchange (obex.parallax.com/ (http://obex.parallax.com/)) that's written completely in Spin and could be easily modified to provide flow control.
05-14-2008, 08:27 PM
For the FULL_DUPLEX_SERIAL, I need to increase the RX Buffer to say 100 bytes, TX buffer is fine.
I can see in the SPIN portion the buffer I need to change, but being new to ASM, I am wondering are there some changes needed in the ASM to support my increased RX buffer size.ˇ I believe there would need to be a counter of some sort where it would need to be changed.
Any help would be appreciated -
05-14-2008, 08:49 PM
Just get "FullDuplexSerialExtended.SPIN"... It lets you pick a buffer length in power of 2 up to 256
05-14-2008, 09:19 PM
Ok sounds good, but I cant seem to find "FULLDUPLEXSERIALEXTENDED.SPIN" on the Propeller Object Exchange?ˇ Can you point me where to find it?
05-15-2008, 01:16 AM
Hmm...ˇ Here's the one I have: