View previous topic :: View next topic |
Author |
Message |
riz179
Joined: 06 Apr 2012 Posts: 21
|
flex lcd driver in 8-bit mode |
Posted: Fri Apr 27, 2012 8:54 am |
|
|
Hey guys please help. I need flex lcd driver in 8-bit mode for 16x2, its urgent please. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19496
|
|
Posted: Fri Apr 27, 2012 9:24 am |
|
|
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
|
|
Posted: Fri Apr 27, 2012 9:48 am |
|
|
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: 1933 Location: Norman, OK
|
|
Posted: Fri Apr 27, 2012 11:07 am |
|
|
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
|
|
Posted: Fri Apr 27, 2012 11:38 am |
|
|
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
|
|
Posted: Fri Apr 27, 2012 12:06 pm |
|
|
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
|
|
Posted: Fri Apr 27, 2012 1:19 pm |
|
|
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
|
|
Posted: Fri Apr 27, 2012 3:03 pm |
|
|
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
|
|
Posted: Fri Apr 27, 2012 4:10 pm |
|
|
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
|
|
Posted: Sat Apr 28, 2012 6:08 am |
|
|
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
|
|
Posted: Sat Apr 28, 2012 8:55 am |
|
|
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
|
|
Posted: Sat Apr 28, 2012 2:04 pm |
|
|
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: 19496
|
|
Posted: Sat Apr 28, 2012 2:12 pm |
|
|
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
|
|
Posted: Sun Apr 29, 2012 1:50 am |
|
|
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
|
|
Posted: Sun Apr 29, 2012 2:10 am |
|
|
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 |
|
|
|