View previous topic :: View next topic |
Author |
Message |
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Wed Apr 15, 2015 1:27 am |
|
|
Quote: | Can you confirm that this driver using a 6 pin configuration (NO RW), will work with a 3.3V Pic and a 5V LCD? |
It depends on the LCD controller. Some of them have a TTL interface,
with Vih at 2.2v. That would work, but carefully check the Voh of the LCD
to make sure it doesn't exceed the absolute maximum ratings for the
PIC's input pins.
Other LCDs have CMOS inputs, with Vih at 0.7 x Vdd, which would be 3.5v
on a 5v LCD. Then your 3.3v PIC wouldn't work. It can only drive its
output pins to 3.3v max, and it can't get up to the 3.5v minimum. |
|
|
elenik94
Joined: 31 Oct 2015 Posts: 1
|
|
Posted: Sun Nov 01, 2015 12:21 am |
|
|
Hi PCM
Hi all
I want to use lcd 20*4 on port D. That is impossible with <lcd420.c>
I tried your Flex lcd code and it mixed my lines and Proteus says "logic connections detected on net".
when i use portb and lcd420.c my output is correct and like this:
Vin=1.24 volt
Vout= 1.3 volt
Iout= 1.01 A
FAULT=
BUT when i use FLEX_LCD420.c either on port b or port d or other pins output will be like this:
FAUL1.01
Vin=1.24 volt
Vout= 1.3 volt
Iout=
i changed address of lines and Vin came to first line and FAUL1.01 to line4
but still line 3 and 4 are mixed
Vin=1.24 volt
Vout=1.3 volt
Iout=1.01
FAUL1.01
i saved your code as a .c file in drivers folder. before that i changed following lines:
#define LCD_DB4 PIN_D4
#define LCD_DB5 PIN_D5
#define LCD_DB6 PIN_D6
#define LCD_DB7 PIN_D7
#define LCD_RS PIN_D0
#define LCD_RW PIN_D1
#define LCD_E PIN_D2
can you help me |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Mon Nov 02, 2015 12:29 pm |
|
|
I don't have Proteus, so I can only make suggestions.
1. Do not use #fast io. The flex lcd driver does not support #fast io.
2. If you still have the problem, then disconnect the R/W line between the
PIC and the LCD. On the LCD, connect the R/W pin to ground. Leave
the PIC pin unconnected. Then comment out the following line in the flex
lcd driver:
Code: | // #define USE_RW_PIN 1 // This line is commented out. |
When you comment out that line, the flex driver will be configured to
work without having to read the lcd's Busy Flag bit. It will treat the lcd
as a write-only device.
After those two changes, re-compile the program and test it.
Note: This issues discussed in this post are only regarding Proteus.
In real hardware, there is no problem at all. You can use the R/W pin
and read the lcd's busy bit with no bus contention. It is only a Proteus
Isis problem. |
|
|
link555
Joined: 29 Jul 2010 Posts: 14 Location: North Vancouver
|
I know this was posted a long time ago but… |
Posted: Wed Apr 12, 2023 10:45 pm |
|
|
Just wanted to say a big thank you for writing such clear and useable code. It really helped me with my project. Thank you for all you do! It is greatly appreciated. |
|
|
|