Re: LCD problem with ATmega16 and CVAVR
- From: "Matthew Hicks" <mdhicks2@xxxxxxxx>
- Date: Sun, 15 Oct 2006 20:01:07 -0500
Look into ASCII or whatever character encoding the library uses. Once you
figure out what your problem is, change int h = 1 to char h = '1'.
---Matthew Hicks
"Simoc" <simoc@xxxxxxxxxx> wrote in message
news:1160928807.122425.156980@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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.
.
- References:
- LCD problem with ATmega16 and CVAVR
- From: Simoc
- LCD problem with ATmega16 and CVAVR
- Prev by Date: Re: Wireless Microphone
- Next by Date: Re: LCD problem with ATmega16 and CVAVR
- Previous by thread: LCD problem with ATmega16 and CVAVR
- Next by thread: Re: LCD problem with ATmega16 and CVAVR
- Index(es):
Relevant Pages
|