PDA

View Full Version : ascii to serial port out



ion
05-20-2005, 07:36 AM
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

Chris Savage
05-20-2005, 11:38 AM
Ion,



SEROUT Pin, Baud, [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 (mailto:csavage@parallax.com)

ion
05-20-2005, 02:13 PM
Thank you
Ion