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

flex lcd driver in 8-bit mode

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
riz179



Joined: 06 Apr 2012
Posts: 21

View user's profile Send private message

flex lcd driver in 8-bit mode
PostPosted: Fri Apr 27, 2012 8:54 am     Reply with quote

Hey guys please help. I need flex lcd driver in 8-bit mode for 16x2, its urgent please.
Ttelmah



Joined: 11 Mar 2010
Posts: 19544

View user's profile Send private message

PostPosted: Fri Apr 27, 2012 9:24 am     Reply with quote

Why?.
Seriously, this has been answered before. It is basically pointless. The commands take much longer than the 4bit I/O. Even if you have all eight lines connected, there is little point in fiddling around and going 8bit. When you start talking commands that take dozens of times the time needed to send the data, use the known working code, and KISS.

Best Wishes
riz179



Joined: 06 Apr 2012
Posts: 21

View user's profile Send private message

PostPosted: Fri Apr 27, 2012 9:48 am     Reply with quote

i can't explain but i need it please, i am new to uC so i can't modify the drivers available in 4bit to 8bit mode,,i'll be very thankful if you could do it for me,it will take a little time of yours but save me from a big problem
dyeatman



Joined: 06 Sep 2003
Posts: 1934
Location: Norman, OK

View user's profile Send private message

PostPosted: Fri Apr 27, 2012 11:07 am     Reply with quote

Sounds like a school project at the last minute to me... As TTelmah said
there is no good reason to run in 8 bit mode that I can think of
_________________
Google and Forum Search are some of your best tools!!!!
riz179



Joined: 06 Apr 2012
Posts: 21

View user's profile Send private message

PostPosted: Fri Apr 27, 2012 11:38 am     Reply with quote

there are lot of things in this world which don't have any good reason to exist.! please tell me how to change the flex driver to work in 8-bit mode,,if you are on this forum to really help someone,
riz179



Joined: 06 Apr 2012
Posts: 21

View user's profile Send private message

PostPosted: Fri Apr 27, 2012 12:06 pm     Reply with quote

ok,what will happen if i connect the lcd in 8-bit mode to uC but use the flex driver of 4 bit,will it work properly or i must have to connect the first four pins of lcd to ground
vladtess



Joined: 14 May 2011
Posts: 26

View user's profile Send private message

PostPosted: Fri Apr 27, 2012 1:19 pm     Reply with quote

As far as the public libraries goes on CCS forums there are libs that use all 8 bits to drive the LCD. By looking at the code it seems that much modifications would have to be done before you can use 8bit mode. Use 4 bit and make other bits simply attach to the other 4 bits to PIC so the professor is proud.
Mike Walne



Joined: 19 Feb 2004
Posts: 1785
Location: Boston Spa UK

View user's profile Send private message

PostPosted: Fri Apr 27, 2012 3:03 pm     Reply with quote

Quote:

there are lot of things in this world which don't have any good reason to exist.! please tell me how to change the flex driver to work in 8-bit mode,,if you are on this forum to really help someone,

You're just not getting it.

First; give us a REALLY GOOD REASON for going 8-bit mode, THEN someone may take you seriously.

Mike

PS. You've been given enough hints!!!!
riz179



Joined: 06 Apr 2012
Posts: 21

View user's profile Send private message

PostPosted: Fri Apr 27, 2012 4:10 pm     Reply with quote

the reason is just that i am using lcd in 4bit mode in my circuit but it is not displaying anything & i don't see any problem in hardware,i got a circuit from my friend which is actually using lcd in 8-bit mode,so i want to test my lcd,uC,keypad etc on that board that's why i need,
Mike Walne



Joined: 19 Feb 2004
Posts: 1785
Location: Boston Spa UK

View user's profile Send private message

PostPosted: Sat Apr 28, 2012 6:08 am     Reply with quote

Why has your friend not supplied code as well as circuit?

How have you got all the LCD data pins connected?

Mike
riz179



Joined: 06 Apr 2012
Posts: 21

View user's profile Send private message

PostPosted: Sat Apr 28, 2012 8:55 am     Reply with quote

he has the working code but that is in mikroC and one more thing i want to test my own code,,all the pins are already connected data=PORTD and other to PORTC
Mike Walne



Joined: 19 Feb 2004
Posts: 1785
Location: Boston Spa UK

View user's profile Send private message

PostPosted: Sat Apr 28, 2012 2:04 pm     Reply with quote

So, neither 4 or 8 bit modes work!

When 4 bit code initiliases it recognises that you want 4 bit mode, irresepective of how the unused LCD's bits are connected.

Assuming all's well 4-bit mode code SHOULD work.

If flex_lcd does not work then either you've got a hardware problem or delays don't match the requirements for your lcd module.

Give us more to work on.

Mike
Ttelmah



Joined: 11 Mar 2010
Posts: 19544

View user's profile Send private message

PostPosted: Sat Apr 28, 2012 2:12 pm     Reply with quote

I'd triple check the pin connections, and particularly whether R/W is being used. The flex driver runs fine on a system that has all eight lines connected.
Remember it is the _high_ four data lines that are used, not the low lines.

Best Wishes
riz179



Joined: 06 Apr 2012
Posts: 21

View user's profile Send private message

PostPosted: Sun Apr 29, 2012 1:50 am     Reply with quote

its working fine on friend's circuit,please solve another confusion,i am using 20M crystal in my ciruit while he is using 12M,is there any requirement of jhd162a about crystal value,it is made in china and i don't find datasheet for it something is written in chinese i don't understand
Mike Walne



Joined: 19 Feb 2004
Posts: 1785
Location: Boston Spa UK

View user's profile Send private message

PostPosted: Sun Apr 29, 2012 2:10 am     Reply with quote

This is like pulling teeth.

Let's take a step back; and do some simple tests.

(1) Is your circuit running at all?
(2) Will your circuit do a simple 1Hz LED flasher?
(3) If yes to (2), is it running at the correct speed?
(4) Does your LCD work on your friends rig?
............

Mike
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
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


Powered by phpBB © 2001, 2005 phpBB Group