Shop OBEX P1 Docs P2 Docs Learn Events
Beginner Needing Help — Parallax Forums

Beginner Needing Help

ArchiverArchiver Posts: 46,084
edited 2003-10-14 23:25 in General Discussion
Hello everyone,

I am currently trying to learn how to use the basic stamp 2 microcontroller.
I already know how outputting from pins works, but I'm unclear on serial port
communication. How do I go about sending information from the microcontroller
to a C++ program and vice versa. I am currently working on a team project and
we need to interface between our microcontroller and the computer. Can anyone
help me out?

Matthew Gehret
gehrem@y...



signature

Do you Yahoo!?
The New Yahoo! Shopping - with improved product search

[noparse][[/noparse]Non-text portions of this message have been removed]

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2003-10-14 15:05
    You have two choices: Use the Stamp's programming port or devote a few
    IO pins to the serial app. If you use the programming port your
    external app needs to deal with the hardware character echo created by
    the Stamp. If you decide to devote a few pins, you can even go the
    flow-control route so that you don't have any missed messages.

    These articles (from Nuts & Volts) may be helpful:

    http://www.parallax.com/dl/docs/cols/nv/vol2/col/64.pdf
    http://www.parallax.com/dl/docs/cols/nv/vol3/col/89.pdf

    -- Jon Williams
    -- Applications Engineer, Parallax
    -- Dallas Office



    Original Message
    From: Matthew Gehret [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=WMasHO-K4hXh2lkO_Bk8flqj7apZdU64DZB83t0Lf89Nxq98Ia6j1t8i7x2gTNP4Aqj7YXAFEhU]gehrem@y...[/url
    Sent: Tuesday, October 14, 2003 1:07 AM
    To: basicstamps@yahoogroups.com
    Subject: [noparse][[/noparse]basicstamps] Beginner Needing Help


    Hello everyone,

    I am currently trying to learn how to use the basic stamp 2
    microcontroller. I already know how outputting from pins works, but I'm
    unclear on serial port communication. How do I go about sending
    information from the microcontroller to a C++ program and vice versa. I
    am currently working on a team project and we need to interface between
    our microcontroller and the computer. Can anyone help me out?

    Matthew Gehret
    gehrem@y...



    signature

    Do you Yahoo!?
    The New Yahoo! Shopping - with improved product search

    [noparse][[/noparse]Non-text portions of this message have been removed]



    To UNSUBSCRIBE, just send mail to:
    basicstamps-unsubscribe@yahoogroups.com
    from the same email address that you subscribed. Text in the Subject
    and Body of the message will be ignored.


    Your use of Yahoo! Groups is subject to
    http://docs.yahoo.com/info/terms/




    This message has been scanned by WebShield. Please report SPAM to
    abuse@p....
  • ArchiverArchiver Posts: 46,084
    edited 2003-10-14 16:00
    There are several articles on my site about this sort of thing. Look at
    http://www.al-williams.com/stampcom.zip which has info on reading from the
    Stamp via C++ or VB.

    Also, our NETPORTER DAQ control is made to work with our DAQ board, but it
    will just as easily read data from a STAMP if you format it correctly. The
    details are here: http://www.al-williams.com/npdaqax.htm and the control is
    free for non-commercial use. Just make the Stamp output lines of data in the
    form VAR=XXXX where VAR can be any string and XXXX is whatever you want.

    Also read http://www.wd5gnr.com/stampfaq.htm

    Regards,

    Al Williams
    AWC
    * Microcontroller kits - http://www.al-williams.com/kits.htm




    >
    Original Message
    > From: Matthew Gehret [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=IB3Y-qDgbd7XvOQrcTLBhhwdcm6KZVcB3uFEgmAz-Ol_lcKZlfZ0mMWvMcz7NyVdZseOBr73jz4]gehrem@y...[/url
    > Sent: Tuesday, October 14, 2003 1:07 AM
    > To: basicstamps@yahoogroups.com
    > Subject: [noparse][[/noparse]basicstamps] Beginner Needing Help
    >
    >
    > Hello everyone,
    >
    > I am currently trying to learn how to use the basic stamp 2
    > microcontroller. I already know how outputting from pins
    > works, but I'm unclear on serial port communication. How do
    > I go about sending information from the microcontroller to a
    > C++ program and vice versa. I am currently working on a team
    > project and we need to interface between our microcontroller
    > and the computer. Can anyone help me out?
    >
    > Matthew Gehret
    > gehrem@y...
    >
    >
    >
    > signature
    >
    >
    > Do you Yahoo!?
    > The New Yahoo! Shopping - with improved product search
    >
    > [noparse][[/noparse]Non-text portions of this message have been removed]
    >
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the
    > Subject and Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to
    > http://docs.yahoo.com/info/terms/
    >
    >
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2003-10-14 23:25
    BS2 Serial Port Output:

    MyBaud CON 84 + 16384 ' 9600 baud, Inverted
    MyData VAR BYTE

    'to send out:
    SEROUT 16, MyBaud, [noparse][[/noparse]"Hello.", 13] ' Prints 'Hello' <CR>

    'to recieve -- note it will 'pend' until get something
    SERIN 16, MyBaud, [noparse][[/noparse]MyData]

    ' You CAN use the 'terminal' in the IDE to send
    ' and receive data.

    --- In basicstamps@yahoogroups.com, Matthew Gehret <gehrem@y...>
    wrote:
    > Hello everyone,
    >
    > I am currently trying to learn how to use the basic stamp 2
    microcontroller. I already know how outputting from pins works, but
    I'm unclear on serial port communication. How do I go about sending
    information from the microcontroller to a C++ program and vice
    versa. I am currently working on a team project and we need to
    interface between our microcontroller and the computer. Can anyone
    help me out?
    >
    > Matthew Gehret
    > gehrem@y...
    >
    >
    >
    > signature
    >
    >
    > Do you Yahoo!?
    > The New Yahoo! Shopping - with improved product search
    >
    > [noparse][[/noparse]Non-text portions of this message have been removed]
Sign In or Register to comment.