LCD Display EA DIP 204-6

Post your requests and ideas on the future development of mikroPascal.
Post Reply
Author
Message
charly
Posts: 32
Joined: 31 Oct 2004 23:38

LCD Display EA DIP 204-6

#1 Post by charly » 09 Jun 2005 10:56

I´m not confirm with Assembler an the currend Displaydriver works not
ok with this Display. If I integrated the following lines after your Init and i´, using my gotoxy() , it works korrekt



Version MP 3.0.0.4, Pic 18F452, 4.00 Mhz

Procedure BrLcd_cmd(cmd:byte;rs:byte);
begin

portd := 0;
if testbit(cmd,7) = 1
then setbit(portd,br_db7)
else clearbit(portd,br_db7);

if testbit(cmd,6) = 1
then setbit(portd,br_db6)
else clearbit(portd,br_db6);

if testbit(cmd,5) = 1
then setbit(portd,br_db5)
else clearbit(portd,br_db5);

if testbit(cmd,4) = 1
then setbit(portd,br_db4)
else clearbit(portd,br_db4);

if rs = 1
then setbit(portd,Br_RS)
else clearbit(portd,Br_RS);

setbit(portd,Br_ENABLE);

delay_ms(1);
clearbit(portd,br_enable);


if testbit(cmd,3) = 1
then setbit(portd,br_db7)
else clearbit(portd,br_db7);

if testbit(cmd,2) = 1
then setbit(portd,br_db6)
else clearbit(portd,br_db6);

if testbit(cmd,1) = 1
then setbit(portd,br_db5)
else clearbit(portd,br_db5);

if testbit(cmd,0) = 1
then setbit(portd,br_db4)
else clearbit(portd,br_db4);

if rs = 1
then setbit(portd,Br_RS)
else clearbit(portd,Br_RS);

setbit(portd,Br_ENABLE);
delay_ms(1);
clearbit(portd,br_enable);
if cmd = 1
then delay_ms(10);

end;

Procedure BrLCD_Gotoxy(row,column:byte);
begin
BrLcd_cmd((_lcd_address[row-1]+column-1)or 128,0) ;

end;

Procedure Br_LCD_init;
begin
delay_ms (10);
BrLcd_cmd(%00100000,0);
BrLcd_cmd(6,0); // Cursor Autoincrement
BrLcd_cmd(%00100110,0);
BrLcd_cmd(%00001001,0);
// BrLcd_cmd(%01000000,0);
Br_diable_symbols; // Alle Sonderzeichen löschen
delay_ms(5);


BrLcd_cmd(%00100000,0);
BrLcd_cmd($0f,0);
BrLcd_cmd(1,0);
delay_ms (10);
end;


This funktion is for the Symbolic

Procedure Br_Enable_symbol(idx,status:byte);
var i : byte;
st : byte;
begin
st := status;
i := 64 + idx ;
if (idx > 14)
then begin
case idx of
15 : st := $1F;
16 : st := $1E;
17 : st := $1C;
18 : st := $18;
19 : st := $10;
end;
i := 79;
end;

delay_ms(1);
BrLcd_cmd(%00100110,0);
BrLcd_cmd( i,0);
delay_ms(1);
BrLcd_cmd(st,1);
BrLcd_cmd(%00100000,0);
end;

thanks Arnold

Post Reply

Return to “mikroPascal Wish List”