Shop OBEX P1 Docs P2 Docs Learn Events
serial comunication rs232 — Parallax Forums

serial comunication rs232

JohnnyfumiJohnnyfumi Posts: 14
edited 2008-05-14 17:16 in Propeller 1
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

Johnny

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-05-09 16:54
    There's a schematic here (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/) that's written completely in Spin and could be easily modified to provide flow control.
  • smlcaerussmlcaerus Posts: 18
    edited 2008-05-14 12:27
    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 -

    Thanks
    Shawn
    ·
  • RaymanRayman Posts: 14,233
    edited 2008-05-14 12:49
    Just get "FullDuplexSerialExtended.SPIN"... It lets you pick a buffer length in power of 2 up to 256
  • smlcaerussmlcaerus Posts: 18
    edited 2008-05-14 13:19
    Ok sounds good, but I cant seem to find "FULLDUPLEXSERIALEXTENDED.SPIN" on the Propeller Object Exchange?· Can you point me where to find it?

    Thanks
    Shawn
  • RaymanRayman Posts: 14,233
    edited 2008-05-14 17:16
Sign In or Register to comment.