Shop OBEX P1 Docs P2 Docs Learn Events
programming output — Parallax Forums

programming output

soyyamsoyyam Posts: 3
edited 2005-07-25 14:40 in BASIC Stamp
what's the syntax for sending a variable out through an i/o pin?

Comments

  • Bruce BatesBruce Bates Posts: 3,045
    edited 2005-07-25 14:40
    soyyam -

    It really depends on what the receiver expects. If the receiving device expects to see an asynchronous serial output (an RS-232 data steam), then the answer to your question is to use the SEROUT command. If the receiving device expects to see a synchronous serial output (data and clock), then you want to use the SHIFTOUT command. Both commands can be found in the PBasic Manual or Pbasic Help file.

    There are other commands for output as well, but those two are the main commands usually used for serial data.

    General syntax:

    SEROUT Tpin {\Fpin}, Baudmode, {Pace,} {Timeout, Tlabel,} [noparse][[/noparse]OutputData ]

    SHIFTOUT Dpin, Cpin, Mode, [noparse][[/noparse]OutputData {\Bits} {,OutputData {\Bits}...}]

    Regards,

    Bruce Bates
Sign In or Register to comment.