lcd options

General discussion relating to the library modules supplied with the compiler

Moderators: David Barker, Jerry Messina

Post Reply
richardb
Posts: 307
Joined: Tue Oct 03, 2006 8:54 pm

lcd options

Post by richardb » Wed Oct 04, 2006 8:00 am

I Have a 4x20 lcd display and if i WriteAt(3,1,"here") the text appears at about coulumn 16(this is a guess)
should there be an option to set the screen size?
i have to print on line1 at column 21 to work.
Hmmm..

User avatar
David Barker
Swordfish Developer
Posts: 1214
Joined: Tue Oct 03, 2006 7:01 pm
Location: Saltburn by the Sea, UK
Contact:

Post by David Barker » Wed Oct 04, 2006 9:58 am

Can you try the following:

(1) In the code explorer window, you will see 'LCD' in the includes section. Click on 'LCD' to open the file in the IDE

(2) At the top of the LCD code, you will see a small 'lock' icon with the text

"LCD is a compiler system file and is read only"

Double click on the lock icon so you can edit the file.

(3) Scroll down to the following sub

Code: Select all

public sub MoveCursor(pLine, pCol as byte)
and make the following changes

Code: Select all

public sub MoveCursor(pLine, pCol as byte)
   dec(pCol)
   select pLine
      case 1 : SetDDRAM(pCol)
      case 2 : SetDDRAM($40 + pCol)
      case 3 : SetDDRAM($14 + pCol)   // ** change to $14
      case 4 : SetDDRAM($54 + pCol)   // ** change to $54
   end select
end sub
Save your changes, then close the 'LCD.bas' module. Please let me know if it works for you...

richardb
Posts: 307
Joined: Tue Oct 03, 2006 8:54 pm

Post by richardb » Wed Oct 04, 2006 11:05 am

That works perfectly.
Hmmm..

Post Reply