Peter Fleury lib lcd & "°"

Go To Last Post
14 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello
I'm using P Fleury Lcd Lib...(work good for me)
But i can't use the car "°" to display my temperature...

Have you an idea?
Thanks

computer : GNU Linux / e6750
ship : Attiny 2313 / ATmega8
compiler : avr-gcc 1:4.3.2-1

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Re-read your own post as if you know nothing already about the problem. Do you think you could answer it? How then do you expect anyone else to who knows even less about it than you?

Is the issue about how to convert the binary value in a variable to a string of ASCII numeric digits to display? That is given:

temp=23;

how do you output the characters '2' and '3' to the LCD? If so look at the C function itoa():

char buffer[8];

itoa(temp, buffer, 10);

lcd_puts(buffer);

Cliff

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes : it's like this.
My problem is with this character :

°

(degree).

computer : GNU Linux / e6750
ship : Attiny 2313 / ATmega8
compiler : avr-gcc 1:4.3.2-1

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Is that in the HD44780 character set?

EDIT: actually looking at my copy of the Hitachi data, if the chip has character set A00 (mainly Japanese above 0x80) then there's a thing looking like degree in position 0xEF. If the character set is A02 then try 0xB0 which (superscript 0) looks as close as you can get.

Last Edited: Sat. Apr 17, 2010 - 06:49 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

computer : GNU Linux / e6750
ship : Attiny 2313 / ATmega8
compiler : avr-gcc 1:4.3.2-1

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ah sorry, I was wrong about 0xEF in my edit above - it's 0xDF. So just lcd_putc(0xDF) when you want one.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This give me an alpha...

computer : GNU Linux / e6750
ship : Attiny 2313 / ATmega8
compiler : avr-gcc 1:4.3.2-1

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Make one for loop and see in wich position is the º char.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'll maybe do the loop...

And do you how i can inclue this data in the programm :

http://www.quinapalus.com/hd4478...

computer : GNU Linux / e6750
ship : Attiny 2313 / ATmega8
compiler : avr-gcc 1:4.3.2-1

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Et keep cool,

for (;;) {
    lcd_puts(car);
    car++;
   _delay_ms(300);
  
}

lcd_puts refuse it!!

computer : GNU Linux / e6750
ship : Attiny 2313 / ATmega8
compiler : avr-gcc 1:4.3.2-1

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

So just lcd_putc(0xDF) when you want one.

That's what I use in several apps.

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well is car a character type variable ? If so perhaps you should try using this function void lcd_putc (char c), because the documentation says that lcd_puts has the following declaration void lcd_puts (const char *s), hence it expects a string as a parameter.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

This give me an alpha...

As the picture of the character set you posted shows - "alpha" is at 0xE0 not 0xDF ?!?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ok
I found my datasheet and it's B3...

computer : GNU Linux / e6750
ship : Attiny 2313 / ATmega8
compiler : avr-gcc 1:4.3.2-1