Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[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
Junior Member level 1
Joined
Feb 8, 2013
Messages
16
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
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.
 
  • Like
Reactions: abdul991

    V

    Points: 2
    Helpful Answer Positive Rating

    abdul991

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

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top