View previous topic :: View next topic |
Author |
Message |
Blake
Joined: 31 Dec 2004 Posts: 31
|
Posted: Sun Jan 31, 2010 10:46 pm Post subject: LCD4BUSY Question |
|
|
In the sample file lcd4busy.bas it shows:
Const _lcdport = Porta
Const _lcdddr = Ddra
Const _lcdin = Pina
Const _lcd_e = 1
Const _lcd_rw = 2
Const _lcd_rs = 3
From what I can understand by reading the comments in the lcd4busy.lib file pins 4-7 of the port must be connected to db4-db7
Also it appears that E, R/W, and the RS pins from the LCD attach to pins 1,2,3 from the SAME port, is this correct?
Also, if I wanted to use Port D instead of Port A do I just change 'A' to 'D' in the Const definitions in the lcd4busy.bas sample?
Does the lcd4busy.lib file support 4 line LCD displays?
Thanx |
|
Back to top |
|
|
Blake
Joined: 31 Dec 2004 Posts: 31
|
Posted: Mon Feb 01, 2010 12:52 am Post subject: |
|
|
I am not sure about the lcd4busy.lib routine in the LIB folder of the MCS Electronics but I downloaded the LUC_lcd4busy.lib file from another thread and it works fine on a 20*4 LCD with only one Enable line.
Its corresponding .bas file gives a good example of how different port pins can be used.
Thanks Luciano
Blake |
|
Back to top |
|
|
olhexy
Joined: 03 Apr 2011 Posts: 192 Location: Tilburg, Netherlands
|
Posted: Fri Mar 30, 2012 12:20 pm Post subject: |
|
|
I also have some trouble finding my way in the lcd libraries.
The timings for initializing the display seem to be taylored for 4 Mhz 8515. When you really need to initialize the lcd wih a 20 Mhz device will this standard "lcd4busy.lib" be successfull?
There is the "lcd4busy_anypin.lib" that seems better in fullfillling this task, because it uses @genus() to adjust timings.
This library (date 28 feb 2011) is the slightly optimized version of Luciano's LUC_lcd4busy.lib.
Because the missing "LUC_" part in the name it is somewhat hard to recognize, but "lcd4busy_anypin.lib" is in my Bascom version 2.0.7.3. |
|
Back to top |
|
|
Luciano
Joined: 29 Nov 2004 Posts: 3149 Location: Italy
|
Posted: Fri Mar 30, 2012 12:49 pm Post subject: |
|
|
Hi,
Here is the LIB: LINK
There is a version with and without timeout.
(See the first post of the thread).
* * *
The original Bascom lcd4busy_anypin.LiB is based on the code of the above link.
(Based on the version without timeout).
Best regards,
Luciano |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5922 Location: Holland
|
Posted: Fri Mar 30, 2012 12:51 pm Post subject: |
|
|
there is no need to use customized lcd libraries. the default lib code will do.
And when you need the busy pin, you need to add the WR pin to the config. Look at the help for config lcdpin.
some libs are only intended as an example. but the supported ones all work with all speeds. if not, you need to send a small example.
luciano's lib was derived from the lcdbusy. And in turn i derived from Luciano's work and added the WR option.
So the default libs should/will work. if you use an example you probably need to adjust timings.
So there is no need to 'find your way' : all is built into the compiler. only when you write a driver for a new type of lcd, or want special handling you can use these libs as a starting sample. _________________ Mark |
|
Back to top |
|
|
dl7sep
Joined: 26 Feb 2006 Posts: 81
|
Posted: Fri Mar 30, 2012 2:07 pm Post subject: |
|
|
Hello Mark,
one question about the help between CONFIG LCDPIN:
Quote: | CONFIG LCDPIN = PIN , DB4= PN,DB5=PN, DB6=PN, DB7=PN, E=PN, RS=PN [WR=PIN] [BUSY=PIN] [MODE=mode]
|
Need the compiler both (WR= PIN and BUSY=PIN) ore need the compiler only one of them?
Is WR for write / read funktion and BUSY for timing, ore will do both the same?
Best regards
Josef |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5922 Location: Holland
|
Posted: Fri Mar 30, 2012 3:08 pm Post subject: |
|
|
The busy pin is only required for the 20x4VFD display. this is a special display and lib.
for normal lcd all you need is to add the WR pin. When the WR pin is used, there is no fixed timing, but instead the busy signal will be checked. The busy signal is on the data lines. _________________ Mark |
|
Back to top |
|
|
dl7sep
Joined: 26 Feb 2006 Posts: 81
|
Posted: Fri Mar 30, 2012 4:13 pm Post subject: |
|
|
Thank you very much for your answer.
This make it clear for me, in the time before i always had used WR on GND.
But to get the maximum on speed for display routines there is a good thing to do this by check the busy bit.
Best regards
Josef |
|
Back to top |
|
|
|