Serial output - add bold char control on SCI serial port

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Serial output - add bold char control on SCI serial port

2,486 Views
blewis
Contributor I
We are using the 9s12xdp512 and the serial port. We have hyperterminal connnected and we can output chars to the window and it works. What I can't seem to find is a way to turn the output stream into Bold, Italic for example. Can someone tell me the char sequence or the C statement that does this please, or even a google search string that would work. None of the one's I have tried have yielded anything useful. I guess this is not specific to any processor but we are using the HC12 so I thought I would try here. Thanks inadvance

Robert
Labels (1)
0 Kudos
Reply
3 Replies

737 Views
bigmac
Specialist III
Hello Robert,
 
The ability to alter font type "on the fly" will depend on the capability of the terminal emulation program, and perhaps more specifically on the terminal emulation type in force.  Then you would need to send the character sequence required by the emulation type.
 
Firstly, you will need to choose an emulation type that supports your special requirements, and then choose a terminal emulation program that supports the desired emulation type.  Perhaps check out ANSI or VT102 emulation capabilities.
 
I am not aware that hyperterminal is particularly flexible on these issues, so may not be feasible in this case.
 
Regards,
Mac
 
0 Kudos
Reply

737 Views
peg
Senior Contributor IV
Hi Robert,
 
You could use ANSI terminal emulation as just about everything emulates this (even hyperterm).
Then Google "ANSI codes" or "ANSI escape sequences" for way too much info on how to get what you want on the screen.
 
0 Kudos
Reply

737 Views
imajeff
Contributor III
I know it gets off topic but to more specifically answer,

I Googled and found this:
"I know that I can send ESC[1m; to the console for getting bold text"

In other words, send these chars (in Hexadecimal):
1B 5B 31 6D

So I looked further and found that 22m would turn off bold (if implemented), but 0m would be the most reliable. It turns off all formatting.

FYI: I read that the simicolon ';' is used to continue with more consecutive sequences, rather than repeat another 'ESC' and '[' sequence. That would optimize for heavy formatting.

A simple reference I found:
http://pueblo.sourceforge.net/doc/manual/ansi_color_codes.html

Edit: coloring, URL link


Message Edited by imajeff on 2007-06-05 11:25 AM
0 Kudos
Reply