View previous topic :: View next topic |
Author |
Message |
Spitzer
Joined: 01 Nov 2004 Posts: 2 Location: Vienna, Austria
|
Posted: Sun May 03, 2009 9:38 pm Post subject: LCD needs too much time |
|
|
I have a problem with LCD
Each line needs 20ms. (3 lines = 60ms !!)
the 20ms are measured with oscilloscope
Does anybody know, how I could reduce this time?
Code:
$regfile = "M32def.dat"
$crystal = 4000000
Ddrb.5 = 1 ' Testpin Oscilloscope
Config Lcdpin = Pin , Db4 = Portc.4 , Db5 = Portc.3 , _
Db6 = Portc.2 , Db7 = Portd.7 , E = Portc.5 , Rs = Portc.6
Config Lcd = 16 * 3 , Chipset = Dogm163v5 , Contrast = 118
Cls
Do
Waitms 50 ' 50ms
Portb.5 = 1 ' Testpin
Locate 1 , 1 : Lcd "Hello World....." ' 20ms
Locate 2 , 1 : Lcd "line 2.........." ' 20ms
Locate 3 , 1 : Lcd "line 3.........." ' 20ms
Portb.5 = 0 ' Testpin
Loop
End |
|
Back to top |
|
|
DToolan
Joined: 14 Aug 2004 Posts: 1384 Location: Dallas / Fort Worth, Texas (USA)
|
Posted: Sun May 03, 2009 10:42 pm Post subject: |
|
|
Use 8-bit data instead of 4-bit data (search the forum and look in the help file for CONFIG LCDBUS). |
|
Back to top |
|
|
Frankeman
Joined: 11 Aug 2004 Posts: 948 Location: the Netherlands
|
Posted: Sun May 03, 2009 11:11 pm Post subject: |
|
|
Hi, and welcome to this friendly forum.
You could also use the "LUC_lcd4busy.lib" this library checks the busy flag from the LCD.
Frank. |
|
Back to top |
|
|
Luciano
Joined: 29 Nov 2004 Posts: 3149 Location: Italy
|
|
Back to top |
|
|
Spitzer
Joined: 01 Nov 2004 Posts: 2 Location: Vienna, Austria
|
Posted: Tue May 05, 2009 11:32 am Post subject: |
|
|
Thanks Luciano, with your library my LCD works great now.
For a single line I need now about 800µs instead of 20ms. |
|
Back to top |
|
|
|