[SOLVED] Display Special Character like degree symbol or ohm symbol on PC Hyperterminal -PIC

Status
Not open for further replies.

abdul991

Junior Member level 1
Joined
Feb 8, 2013
Messages
16
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,402
I'm using PIC-18f452 to serial transmit temperature value through the serial port . I need to display special character degree symbol to get at the Hyperterminal.. the display must be temp = 30 degree(in symbol) Celsius. please help this is my code..

Code:
int tem=30;
char str[80];
sprintf(str, "   Ch1 Temp  = %5d ", tem);
      SerTxS(str);

void SerTxS(char* s)
{
  int i;
   for(i=0; i<strlen(s); i++)
   SerTx(s[i]);
 }

void SerTx(unsigned char c)
{
	while(PIR1bits.TXIF == 0);
	TXREG = c;
}

 TXSTA = 0x20;  									//  for asynchronous , tx enable settings
	      
	SPBRG = 18;  						// for 12mhz baud rate.
    TXSTAbits.TXEN = 1;
	RCSTAbits.SPEN = 1;

- - - Updated - - -

i'm using MPLab and pickit2 for programming...
 
Last edited by a moderator:

In the extended ASCII set as per ISO 8859-1 the code for degree ° symbol is 176 or 0xB0. Use this code in your string being sent & see how it works.
 
Reactions: abdul991

    V

    Points: 2
    Helpful Answer Positive Rating

    abdul991

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…