CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Flexible LCD driver for 20x4 LCDs
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic    CCS Forum Index -> Code Library
View previous topic :: View next topic  
Author Message
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Apr 15, 2015 1:27 am     Reply with quote

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

View user's profile Send private message

PostPosted: Sun Nov 01, 2015 12:21 am     Reply with quote

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

View user's profile Send private message

PostPosted: Mon Nov 02, 2015 12:29 pm     Reply with quote

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

View user's profile Send private message

I know this was posted a long time ago but…
PostPosted: Wed Apr 12, 2023 10:45 pm     Reply with quote

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.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> Code Library All times are GMT - 6 Hours
Goto page Previous  1, 2, 3
Page 3 of 3

 
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


Powered by phpBB © 2001, 2005 phpBB Group