I want to send Ascii codes to an mbed and have it print Ascii characters which can be seen from Hyperterminal. How can this be done? I looked at the mbed website and found nothing about keyboard input or ascii characters.

  • \$\begingroup\$ Can you tell what the Hyperterminal is and what do you connect to your mbed to send text through it? \$\endgroup\$ Feb 25, 2011 at 10:59
  • \$\begingroup\$ I think the mbed forums would be a suitable place to ask this question as well mbed.org/forum \$\endgroup\$
    – jsolarski
    Mar 20, 2011 at 23:47

2 Answers 2


IIRC you can just use printf and scanf/gets on the serial ports of the mbed.

  • \$\begingroup\$ That's sort of right, but the text needs to be converted to ascii code before writing. Then when reading back they need to be converted back to text. \$\endgroup\$ Apr 19, 2011 at 17:25
  • \$\begingroup\$ What do you mean when you say "text"? I do not understand what you want to do: most textual data today is actually encoded as a sequence of ASCII bytes. \$\endgroup\$
    – jpc
    Apr 19, 2011 at 20:44
  • \$\begingroup\$ I just mean normal characters. \$\endgroup\$ Apr 19, 2011 at 23:19
  • \$\begingroup\$ Then I do not understand the need of conversion you are talking about. Could you provide some examples of what you have in mind? \$\endgroup\$
    – jpc
    Apr 20, 2011 at 8:13
  • \$\begingroup\$ +1 jpc is right; see mbed "Serial Communication with a PC" and mbed Serial for more details. \$\endgroup\$
    – davidcary
    Nov 3, 2011 at 10:46

ASCII printable characters are just bytes with values in the range of 32 to about 127. If your mbed receives ASCII, it should simply pass it to the output unchanged.

If it doesn't work, then the problem is in connection between mbed and whatever you want it to send text to.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.