Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Yes, $df = 223. That's why I mentioned it in my op. But I can't figure out how to get it displayed with sprintf. Sourceboost's sprintf is a little bit non-standard, and their docs on it aren't very thorough.It's 223 decimal on a typical LCD.
It is? Thank you. I'll make a note!ASCII degree symbol is 248, can you type <alt> 0223 in the quotes?
sprintf(string,"Temp: %u",an2);
lcd_string(string);
sprintf(string,"\xdf",0);
lcd_string(string);
sprintf(string,"C",0);
lcd_string(string);
<alt> is not a valid escape code for BoostC's sprintf (or any that I've used). All I get displayed is "<alt>223".ASCII degree symbol is 248, can you type <alt> 0223 in the quotes?
I fumbled on a way to do it. Had to split the line up into three separate outputs, but it works now.
Code:sprintf(string,"Temp: %u",an2); lcd_string(string); sprintf(string,"\xdf",0); lcd_string(string); sprintf(string,"C",0); lcd_string(string);
sprintf(string,"Temp: %u\xdf",an2);
lcd_string(string);
sprintf(string,"C",0);
lcd_string(string);
You must type <alt> 223 on the number pad if I recall. Sometimes you need the leading zero. I've not used the method for ages.
That works. Now it fits all on one line again. Excellent!I just looked through the manual a bit does this work?
Code:sprintf(string,"Temp: %u\223",an2);
I see \x is for hex and df is 223 in decimal, so I think the escape code is the \ and in the manual it says \xnn for hex and \nn for decimal so maybe it's just sprintf(string,"Temp: \223",an2); just curious now. lol
sprintf(string,"Temp: %u\223C",an2);
sprintf(string,"Temp: %u\223",an2);
The 223 is strictly for the LCD, it'll show up as who knows what in XP but the LCD should be happy.
Edit: glad it's working futz, plenty of smart folks hang around here. Nicely done BaCarDi
**broken link removed**. He's not exactly speeding ahead with the project as he has a PICkit 2 clone for sale now (and so doesn't really need the Stella anymore) and is very busy with other things.PS I see on your site you've got one of dipmicros ICD2 clones, I wonder how Roman's going to make it 3.3V as it looks about the same as the Inchworm.
Ya, I swore off C many years ago. Went back to assembler and wouldn't touch C. I remembered hating it. Then the dsPIC kind of forced me to get back into C programming and I realized I didn't hate it as much as I had remembered. Lately I'm doing nothing but C.Ok now I need to start using c again too...lol Damn that learning curve!
Me too. Think I'll build a board or two with 2-wire LCD circuits that I can plug into any PIC board or breadboard I'm using when I want a quick, easy LCD.I really like that 2-wire LCD interface!
Heh, ya.I will say Stella looks familiar
How do you mean?As for the two wire LCD interface I had a SPI + 2 wire (4 wires) that I was going to use in a future kit design. I tied RW to gnd but used the 8 bit mode and standard mode 1 SPI . The E line was CS and RS was the other wire.