Hello All I am working with a energy metering project . I am using HyperTerminal privet edition v6.3 as my output terminal to show the voltages current and all the parameters . Keil c compiler and cygnal 8051f120 evaluation board are used for the development . when I tried to update the whole content and update it with my new reading it takes a lot of time . I creates a burden for my program .so I tried ANSI Escape Sequence. I am facing some problem in this phase . some of these sequences are working fine while some are not. I tried with ansi and vt100 emulations I got clear_screen(); and cursor_home(); functions working but I am unable to make out any cursor positioning functions so I am posting these functions with this letter expecting your kind help void clear_screen (void) { putchar(0x1B); putchar('['); putchar('2'); putchar('J'); }//working void cursor_home (void) { printf("%c[H",ESC,ESC); }//working void cursor_point (unsigned char row,unsigned char col) { putchar(ESC); putchar('['); putchar(row); putchar(';'); putchar(col); putchar('H'); }//->the output is ; H; H
What is ESC in your program? Does this equate to a special character? It doesn't look it here. Maybe you have to replace this with the HEX equivilant to the ascii escape character. Andy
"What is ESC in your program? ... Maybe you have to replace this with the HEX equivilant to the ascii escape character." Yes - either
#define ESC 0x1B
#define ESC 27