Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

LCD needs too much time

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> BASCOM-AVR Archive
View previous topic :: View next topic  
Author Message
Spitzer

Bascom Member



Joined: 01 Nov 2004
Posts: 2
Location: Vienna, Austria

austria.gif
PostPosted: Sun May 03, 2009 9:38 pm    Post subject: LCD needs too much time Reply with quote

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
View user's profile
DToolan

Bascom Member



Joined: 14 Aug 2004
Posts: 1384
Location: Dallas / Fort Worth, Texas (USA)

blank.gif
PostPosted: Sun May 03, 2009 10:42 pm    Post subject: Reply with quote

Use 8-bit data instead of 4-bit data (search the forum and look in the help file for CONFIG LCDBUS).
Back to top
View user's profile Yahoo Messenger
Frankeman

Bascom Member



Joined: 11 Aug 2004
Posts: 948
Location: the Netherlands

netherlands.gif
PostPosted: Sun May 03, 2009 11:11 pm    Post subject: Reply with quote

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
View user's profile
Luciano

Bascom Member



Joined: 29 Nov 2004
Posts: 3149
Location: Italy

blank.gif
PostPosted: Mon May 04, 2009 9:09 am    Post subject: Reply with quote

Hi,

Here is the lib.

Libray for character LCD modules (Busy flag/random pins)
http://www.mcselec.com/index2.php?option=com_forum&Itemid=59&page=viewtopic&t=4941

Best regards,

Luciano
Back to top
View user's profile
Spitzer

Bascom Member



Joined: 01 Nov 2004
Posts: 2
Location: Vienna, Austria

austria.gif
PostPosted: Tue May 05, 2009 11:32 am    Post subject: Reply with quote

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
View user's profile
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> BASCOM-AVR Archive All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
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
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum