LCDInfo.com

http://www.lcdinfo.com
It is currently Thu Nov 21, 2024 23:34

All times are UTC + 2 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Sat Sep 02, 2006 15:26 
Offline

Joined: Sat Jul 08, 2006 17:49
Posts: 25
Hi,
I have a 8x2 LCD display equipped with a HD44780.
Everything is working fine and since there is no functionality to reverse the characters I thought that I could create "user defined font" with all the characters reversed and then "upload" them to the HD44780 everytime my program run, after the initialization.
Actually I need to reverse only characters from "0" to "9" and the " " (space).
Reading the datasheet it seems it's possible but, unfortunately, it's not so clear how to do that.
Then I'm asking the experts how I can do that considering that I'm using the display in 8-bit mode.
Thank you, regards.

Bob


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 02, 2006 19:20 
Offline

Joined: Sat Jul 08, 2006 17:49
Posts: 25
I tried the code below to redefine the character 0 but it doesn't work:

LPT= 0x0378

// set the CGRAM at the address 00

portwriteb(LPT, $40);
portwriteb(LPT+2,E_1 or RS_0);
delay(1);
portwriteb(LPT+2,E_0 or RS_0);

// this is the cycle where the character pattern is passed to the
// display 7 times, one for each row of the character matrix.
// At the end character 0 should display 3 vertical lines

for c:=0 to 7 do
begin
portwriteb(LPT, $15); // <-- bit pattern
portwriteb(LPT+2,E_1 or RS_0);
delay(1);
portwriteb(LPT+2,E_0 or RS_0);
delay(1);
end;

Where's the mistake?

Regards,

Bob


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 11, 2006 15:06 
Offline

Joined: Sat Jul 08, 2006 17:49
Posts: 25
I found it...I should have put RS=1 instead of RS=0.
I hope it helps other users, regards.

Bob


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 2 hours


Who is online

Users browsing this forum: No registered users and 17 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group