Reply by bert_hoogenboom November 15, 20072007-11-15
it looks like you have a parity problem
i do not know the promeus software or the code-vision compiler
--- In a..., Omid Station wrote:
>
> Dear All
>
> I have a problem about characteristic LCD.
>
> When I use and simulate my circuit in Proteus program,
only odd (or even) characters shown correctly and other characters
shown wrong. Also first character in each word always doesn’t show.
> For example if I want to show “document” LCD shows “
ofufeft” in Proteus simulation.
> My LCD is 20x4 and My AVR IC is Atmega 32 , version of my Code
Vision is 1.23.8c Standard and version of my Proteus is 6.9 (full).
>
> I use these functions:
>
> #include
>
> #asm
> .equ __lcd_port=0x18
> #endasm
>
> #include
>
> void main(void)
> {
>
> lcd_init(20);
> lcd_clear();
> while (1)
> {
> lcd_gotoxy(0,0);
> lcd_putsf("document");
>
> };
> }
>
> I changed LCD port in AVR IC but problem still exists.
> How I can correct my program? Is it required other adjustment? Is
it possible that Proteus is responsible my problem?
>
> Regards
>



Reply by Zack Widup November 14, 20072007-11-14
Hi Omid,

What LCD controller chip does your LCD use? The lcd.h files I've seen are
for the HD44780. It REALLY helps to have the documentation for the LCD
controller chip you have, though, as I've found that some of the other
devices are "nearly compatible" with the HD44780 but not quite.

I have the data sheet for the HD44780 controller on my website:

http://www.qsl.net/w9sz/files/PDFs/HD44780.pdf

Zack
On Wed, 14 Nov 2007, Omid Station wrote:

> Dear All
>
> I have a problem about characteristic LCD.
>
> When I use and simulate my circuit in Proteus program, only odd (or even) characters shown correctly and other characters shown wrong. Also first character in each word always doesn’t show.
> For example if I want to show “document” LCD shows “ ofufeft” in Proteus simulation.
> My LCD is 20x4 and My AVR IC is Atmega 32 , version of my Code Vision is 1.23.8c Standard and version of my Proteus is 6.9 (full).
>
> I use these functions:
>
> #include #asm
> .equ __lcd_port=0x18
> #endasm
>
> #include void main(void)
> {
>
> lcd_init(20);
> lcd_clear();
> while (1)
> {
> lcd_gotoxy(0,0);
> lcd_putsf("document");
>
> };
> }
>
> I changed LCD port in AVR IC but problem still exists.
> How I can correct my program? Is it required other adjustment? Is it possible that Proteus is responsible my problem?
>
> Regards





Reply by Omid Station November 14, 20072007-11-14
Dear All

I have a problem about characteristic LCD.

When I use and simulate my circuit in Proteus program, only odd (or even) characters shown correctly and other characters shown wrong. Also first character in each word always doesn’t show.
For example if I want to show “document” LCD shows “ ofufeft” in Proteus simulation.
My LCD is 20x4 and My AVR IC is Atmega 32 , version of my Code Vision is 1.23.8c Standard and version of my Proteus is 6.9 (full).

I use these functions:

#include

#asm
.equ __lcd_port=0x18
#endasm

#include

void main(void)
{

lcd_init(20);
lcd_clear();
while (1)
{
lcd_gotoxy(0,0);
lcd_putsf("document");

};
}

I changed LCD port in AVR IC but problem still exists.
How I can correct my program? Is it required other adjustment? Is it possible that Proteus is responsible my problem?

Regards