what is the major difference between NT 3881 and HD 44780?

M

Mylinux

Guest
I am in big trouble. I read through the two pdf articles. I need to know
what are their major difference?


I notice they have difference display characters address code, the matrix
characters address are different. the LINE1 and LINE2 address.


But Why they are two opposite direction.

If IBM pc compatible, most of the machines are IBM pc compatible. This is
the first time I heard about NT 3881 after returning home from ( 40 miles
apart.)

My two other LCD are HD 44780 compatible. suddenly there is a NT 3881. I am
afraid I can't handle this myself. I have alter the panel.c and panel.h and
make and then execute. it still "messy".

When I return the program to "normal" and use the "normal BL" one , the
normal is working with the self-written shell program like it show weather,
stock prices, machine health status ....etc.

Help me brothers.
 
Perhaps it maght be worth just writing a test program for this specific
module, rather than trying to get existing code to work.

If it is initialising (no completely black segments on line 1), then as has
been mentioned before the difference is in the CGRAM addressing.

From the sounds of it this has been implimented on your LCD similar to some
1 line and all 4 line displays. That the lines have been split in two for
each line.

here are the standard line addresses for upto a 4*16 display

Line1 0x80,
Line2 0xC0,
Line3 0x90,
Line4 0xD0

For 4*20
Lines 1 and 2 as above
Line 3 0x94
Line 4 0xD4

Perhaps your display is Line 1 0x80 for columns 1 to 10 and 0xC0 for 11-20

Colin


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.524 / Virus Database: 321 - Release Date: 06.October.2003
 
cdb <barnDOTc@webcityuk.zznDOTcom> wrote in message
news:3f83eee0$0$28120$afc38c87@news.optusnet.com.au...
Perhaps it maght be worth just writing a test program for this specific
module, rather than trying to get existing code to work.

If it is initialising (no completely black segments on line 1), then as
has
been mentioned before the difference is in the CGRAM addressing.

From the sounds of it this has been implimented on your LCD similar to
some
1 line and all 4 line displays. That the lines have been split in two for
each line.

here are the standard line addresses for upto a 4*16 display

Line1 0x80,
Line2 0xC0,



I have changed the address too. no luck at all.





Line3 0x90,
Line4 0xD0

For 4*20
Lines 1 and 2 as above
Line 3 0x94
Line 4 0xD4

Perhaps your display is Line 1 0x80 for columns 1 to 10 and 0xC0 for 11-20

Colin


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.524 / Virus Database: 321 - Release Date: 06.October.2003
 
Mylinux <myLinux@My.com> wrote in message
news:bm32sc$d232@imsp212.netvigator.com...
cdb <barnDOTc@webcityuk.zznDOTcom> wrote in message
news:3f83eee0$0$28120$afc38c87@news.optusnet.com.au...
Perhaps it maght be worth just writing a test program for this specific
module, rather than trying to get existing code to work.

If it is initialising (no completely black segments on line 1), then as
has
been mentioned before the difference is in the CGRAM addressing.

From the sounds of it this has been implimented on your LCD similar to
some
1 line and all 4 line displays. That the lines have been split in two
for
each line.

here are the standard line addresses for upto a 4*16 display

Line1 0x80,
Line2 0xC0,




I have changed the address too. no luck at all.





Line3 0x90,
Line4 0xD0

For 4*20
Lines 1 and 2 as above
Line 3 0x94
Line 4 0xD4

Perhaps your display is Line 1 0x80 for columns 1 to 10 and 0xC0 for
11-20

Colin


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.524 / Virus Database: 321 - Release Date: 06.October.2003
#include "panel.h"
// line 30 16 -----> 20 on 20th Sept 2003

void lcd_reset() {
out_lcd(0x38,0); file://Display mode
usleep(10000);
lcd_clr(); file://Clear
out_lcd(0x0c,0); file://Display on
out_lcd(0x06,0); file://Entry mode
}

void lcd_clr() {
out_lcd(0x01,0);
usleep(3000);
}

void lcd_putc(char c) {out_lcd(c,1);}

file://No scrolling
void lcd_puts(const char *s) {
int i,j;

i=0;
j=0;
while(s!='\0') {
if(s=='\n') {
j=0;
/* HD 44780 */
out_lcd(0x80|LINE2_ADDR,0);

/* NT 3881
out_lcd(0x80|LINE2_ADDR,0);
*/

}
else if(j<20) {
out_lcd(s,1);
j++;
}
i++;
}
}

void gotoxy(int x, int y) {
int addr;

if(y==0)
addr=LINE1_ADDR;
else
addr=LINE2_ADDR;
addr+=x;
/* HD 44780 */
out_lcd(0x80|addr,0);


/* NT 3881

out_lcd(0x80|addr,0);
*/
}
 
:;#include "panel.h"
::// line 30 16 -----> 20 on 20th Sept 2003

::void lcd_reset() {
:: out_lcd(0x38,0); file://Display mode
:: usleep(10000);
:: lcd_clr(); file://Clear
:: out_lcd(0x0c,0); file://Display on
:: out_lcd(0x06,0); file://Entry mode
::}


Try this as an alternative init code sequence, ignore the null terminator at
the end unless you want to try the whole of my function which uses a pointer
for all LCD functions..

const char initLCD[]={0x33,0x32,0x28,0x01,0x02,0x0C,0};

call = disp_init(initLCD);

//ignore #ifdef it is needed for library routine
//Function enters with address of disp_init table
#ifdef _disp_init
void disp_init(unsigned char *tmpPtr)
{



unsigned char currentCH;
unsigned char delay=2;
rs=0; //LCD RS pin LOW for command mode

while(delay) //Delay 26mS to enable LCD to initialise
{

tasktime(); ; straight forward delay can be used here
delay--;
}
//Top nibble of port
#ifdef TOP
while(*tmpPtr)
{

currentCH=*tmpPtr;
LCDPORT&=0x0F; //Mask off lower nibble this allows switches and
things to be connected to same port
LCDPORT=(currentCH&0xF0); //Send top nibble of byte
sendit(rs);
currentCH<<=4; //send lower nibble of byte
LCDPORT=currentCH;
sendit(rs);
Wait(1);
tmpPtr++; //increment to next byte
}

//LCD Port on lower port nibble
#else
while(*tmpPtr)
{

currentCH=*tmpPtr;
LCDPORT&=0xF0;
LCDPORT=(currentCH&0x0F);
sendit(rs);
currentCH>>=4;
LCDPORT=currentCH;
sendit(rs);
//t40();
Wait(1);
tmpPtr++;
}
#endif
}
#end



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.525 / Virus Database: 322 - Release Date: 09.October.2003
 

Welcome to EDABoard.com

Sponsor

Back
Top