Question regarding HyperTerminal and printf

13 Apr 2011

Hello,

I have been working my way through Bert van Dam's "ARM Microcontrollers". In the book he demonstrates communication between the mbed and a PC using Serial, USB and HyperTerminal on the PC. Various "special" codes are mentioned e.g.

pc.printf("\x1B\x48\x1B\x4A");

which homes the cursor and clears the screen.

I am curious to know the origin of these codes and whether there is a definitive list. So far my searches haven't revealed anything.

TIA...

Chris.

13 Apr 2011

These are standard ANSI/VT100 control codes for controlling a terminal.

See http://en.wikipedia.org/wiki/ANSI_escape_code and http://ascii-table.com/ansi-escape-sequences-vt-100.php

13 Apr 2011

Aha! Thanks Dave, I think that's what I need. My problem was that I didn't know exactly what I should be searching *for*, if you see what I mean.

Thanks again,

Chris.