Special symbols on LCD with PIC16F877A in CCS C Compiler

Status
Not open for further replies.

john120

Banned
Hello guys I am writing a program in ccs c which will display a percantage of calculations made but I have a great problem to display for example 10% on the lcd.

for example how can I collect this for the lcd to print out 52%:

delay_ms(500);
printf(lcd_putc,"\f52");
delay_ms(500);

thx

betwixt

Super Moderator
Staff member
A single '%' is usually reserves as a format specifier but if you use two together "%%" printf usually prints one of them untouched. So printf(lcd_putc,"\f52%%"); should work. I can't check with CCS but that's how it normally works.

Brian.

Banned
send hex value 0x25

xbased

Member level 1
Try this:

Code:
printf(lcd_putc(0x25));

FvM

Super Moderator
Staff member
I can't check with CCS but that's how it normally works.
It works with CCS, too.

Status
Not open for further replies.