Good morning all.
I am doing a bit more work on my micro controller project and need a little help
Below is a section of the code to display a message to LCD.
At the moment it displays
HS1: 35.03Deg C
I want to be able to display the Degree symbol "°"
HS1: 35.03°C
Can Anyone help
I am using MPLAB X IDE v2.10
The chip is 16F877A
else if (FAULT_6==0) //FAULT, RC6 AT 0V
{
Lcd_Init(); // initialize LCD
Lcd_Clear(); // clear LCD
init();
Lcd_Set_Cursor(1,1);
Lcd_Write_String(MSG_M9A);
Lcd_Set_Cursor(2,1); // select line 2
Lcd_Write_String(MSG_M9B);
DelayMs(1000);
Last_Value=-1; // Force update on first pass
Lcd_Clear();
while(1)
{
// READ ADC(2) AND DISPLAY ON LINE ONE.
Adres=ReadADC(2);
{
Degrees=( // scale to Degrees as fixed point, 2DP, with rounding.
Adres*(unsigned long)(MAXTEMPERATURE*100) + ADCMAX/2)/ADCMAX;
DeciDegrees = Degrees%100; // extract decimals
Degrees = Degrees/20; //extract integer volts
// Lcd_Clear();
Lcd_Set_Cursor(1,1); // select line 1
sprintf(OutString,"HS1: %u.%2.2uDeg C ",Degrees,DeciDegrees);
Lcd_Write_String(OutString);
Last_Value = Adres;
}
// READ ADC(3) AND DISPLAY ON LINE TWO.
Adres=ReadADC(3);
// if(adres!=last_value)
{
Degrees=( // scale to Degrees as fixed point, 2DP, with rounding.
Adres*(unsigned long)(MAXTEMPERATURE*100) + ADCMAX/2)/ADCMAX;
DeciDegrees = Degrees%100; // extract decimals
Degrees = Degrees/20; //extract integer volts
Lcd_Set_Cursor(2,1); // select line 2
sprintf(OutString,"HS2: %u.%2.2uDeg C ",Degrees,DeciDegrees);
Lcd_Write_String(OutString);
}
// Last_Value = Adres;
DelayMs(1000);
}
}
Thank you
BILL.