LCD problem with ATmega16 and CVAVR



Well, I'm attempting to use an LCD-module with ATmega16 -controller. I
met a confusing
problem. I'm programming with CodeVisionAVR, which has a library of lcd
functions.

When I wrote into main program:

lcd_gotoxy(0,0);
lcd_putsf("hello world");

That resulted perfectly correct displaying of text "hello world" on the
LCD, so
the lcd and its connections seem to be ok.

BUT when I attempted to use lcd_putchar -function, which should display
the value of
a variable, a problem occured. So firstly, I declared a global variable
h and set it
to 1, by writing at the beginning of the code:

int h=1;

Then attempted to get it displayed by writing into the main program:

lcd_gotoxy(0,0);
lcd_putchar(h);

But the "1" didn't get displayed. Instead, it displays || -looking
character.
As well did many other values of h, and some values displayed as |||
-character.

I also tried changing the data type of the h from int to char and
unsigned char,
but with same results. What might be wrong?

--
I don't read top-posted messages.

.



Relevant Pages

  • Re: LCD problem with ATmega16 and CVAVR
    ... Look into ASCII or whatever character encoding the library uses. ... which has a library of lcd ... That resulted perfectly correct displaying of text "hello world" on the ...
    (sci.electronics.misc)
  • Re: Philips HD prepared CRT TV (repost attempt)
    ... CRT TV that is a HD TV. ... is capable op displaying 1024i. ... wanting to drive profits (logistics of distributing, storing, and stocking ... compared to similar size LCD. ...
    (uk.tech.digital-tv)
  • CPU temperature reading with C
    ... I've connected a 2x20 HD44780 based LCD to the parallel ... What I want to do is displaying different Mother Board settings ... own simple DOS program displaying i.e CPU teperature, System temperatur, ... I'm using an Abit IC7-G mother board. ...
    (comp.lang.c)
  • CPU temperature reading with C
    ... I've connected a 2x20 HD44780 based LCD to the parallel ... What I want to do is displaying different Mother Board settings ... own simple DOS program displaying i.e CPU teperature, System temperatur, ... I'm using an Abit IC7-G mother board. ...
    (comp.arch.embedded)
  • gif to binary data
    ... i m using a 240*128 pix lcd with t6963c controller ... for graphics i thougt of converting the gif file to binary data so did ... typedef unsigned char byte; ... static int i; ...
    (comp.arch.embedded)