Shop OBEX P1 Docs P2 Docs Learn Events
ascii to serial port out — Parallax Forums

ascii to serial port out

ionion Posts: 101
edited 2005-05-20 07:13 in BASIC Stamp
Hi,
I have a variable word
I put the value = 1234
I would like to send it out to the serial port to a serial printer. The printer take only ascii characters as valid input.
How i can send each digit to the port converted in his ascii value
my printer is looking for a string like that
31 32 33 34
Thank you
Ion

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-05-20 04:38
    Ion,

    SEROUT Pin, Baud, [noparse][[/noparse]DEC value]
    

    Where Pin is the Stamp I/O pin number, and Baud is a valid baud rate value for your device.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • ionion Posts: 101
    edited 2005-05-20 07:13
    Thank you
    Ion
Sign In or Register to comment.