Shop OBEX P1 Docs P2 Docs Learn Events
Rs232 — Parallax Forums

Rs232

IvanIvan Posts: 3
edited 2005-11-17 09:41 in General Discussion
I am using the Javelin in the Stamp PLC and I would like to use the same PC interface link used·when programming, for data exchange with the PC.· The basic stamp permits this - by·setting the pin param to 16 (or something like that?). Can this be done with the Javelin and·how? Also how good is the coms circuit, am I better of using· a max232 or something - this would negate my reason for choosing the Stamp PLC!·


I am new to stamps and to Java so please keep it simple!

Comments

  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2005-11-16 15:53
    You can use the terminal programs here

    http://groups.yahoo.com/group/JavelinCode/files/JideTerm/

    JideTerm.exe is the command line version.

    JideWin Terminal is the windows version.

    After you have downloaded a program to the javelin, close the Jide program

    and start the terminal program of your choice. You can log messages to a file

    and send keystrokes and textfiles to the javelin.



    regards peter
  • IvanIvan Posts: 3
    edited 2005-11-16 16:24
    Sorry, may be I did not state my problem correctly?

    PC app. is no problem, its the Javelin side of things I need help with. The uart vp requires me to specify i/o pins, but Sout and Sin are not avaiable (or are they).
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2005-11-16 16:35
    To output data to pin SOUT you use

    System.out.print() or System.out.println() or you

    can use my Format class method printf() like Format.printf()

    http://groups.yahoo.com/group/JavelinCode/files/Javelin%20Stamp%20IDE/lib/stamp/util/text/

    Class Format allows you to easily print chars, strings, decimal, binary, octal and hex values.

    It also allows you to parse input.

    To receive data from pin SIN, you use

    Terminal.byteAvailable() to check if there is any data.

    Terminal.getChar() to read one character at a time.

    My adapted terminal class Terminal.java

    http://groups.yahoo.com/group/JavelinCode/files/Javelin%20Stamp%20IDE/lib/stamp/core/

    also allows you to read an entire string, method Terminal.getString()

    Since the javelin SOUT and SIN pins have a special protocol you cannot use

    these pins to communicate with any device, unless that device is programmed

    with the javelin protocol. My terminal programs (earlier post) are.

    regards peter






    Post Edited (Peter Verkaik) : 11/16/2005 4:39:45 PM GMT
  • IvanIvan Posts: 3
    edited 2005-11-16 17:08
    Thanks for your help. I will give that a go
  • WaldoDTDWaldoDTD Posts: 142
    edited 2005-11-17 03:28
    This sounds similar to what I was having trouble with. I ended up using a 232 shifter try looking for a thread called code?? in this part of the forum that has a lot of Smile in it on what you need.
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2005-11-17 09:41
    That would be this thread

    http://forums.parallax.com/showthread.php?p=555000

    To emphasize the use of SOUT and SIN pins:

    Since the javelin SOUT and SIN pins have a special protocol you cannot use
    these pins to communicate with any device, unless that device is programmed
    with the javelin protocol.

    If you want to communicate with an external device that has no knowledge of
    the javelin protocol, you must create a serial connection using I/O pins and Uart VP's.

    regards peter
    ·
Sign In or Register to comment.