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..
- - - Updated - - -
i'm using MPLab and pickit2 for programming...
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: