LCD problem with ATmega16 and CVAVR
- From: "Simoc" <simoc@xxxxxxxxxx>
- Date: 15 Oct 2006 09:13:27 -0700
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.
.
- Follow-Ups:
- Re: LCD problem with ATmega16 and CVAVR
- From: Rich Webb
- Re: LCD problem with ATmega16 and CVAVR
- From: Matthew Hicks
- Re: LCD problem with ATmega16 and CVAVR
- Prev by Date: Wireless Microphone
- Next by Date: Re: TEAC GF-350
- Previous by thread: Wireless Microphone
- Next by thread: Re: LCD problem with ATmega16 and CVAVR
- Index(es):
Relevant Pages
|
|