16 x 2 LCD Problem?

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
Speedy2k
Posts: 91
Joined: Mon Aug 06, 2012 5:04 am
Has thanked: 2 times
Contact:

16 x 2 LCD Problem?

Post by Speedy2k »

Hi guys, the question is not flowcode related, but i know you are all pretty awesome in helping, so here is the problem. I have a Canakit UK1133 board with a PIC 16F616 MCU on it. It is used to control motor with PWM. I have modified the board to remove the frequency potentiometer and put a hall effect input at this place so i can closed loop control the motor with rpm feedback. Everything works flawlessly exeot for the lcd part. There is a pin header port for an external LCD, normally they use a 8 x 2 LCD they are selling, but i want to use a 16 x 2 i have here. I have recreated the complete (exact) schematic to a breadboard with a lcd conected directly to the breadboard and everything is working, the LCD initialize and show what i have programmed, but as soon as i connect it to the pin header port to a flat cable connector to the LCD, i got the power but the LCD never get initialized. I have verified everything 100x time pinout is perfect it have traced pin per pin to make shure all connection are OK and they are. So now the question is, does a 1 meter flat cable run is too long for the LCD display ? This is the only thing i can think of right now ? Or maybe any other suggestion will be really appreciated. thanx a lot!

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times
Contact:

Re: 16 x 2 LCD Problem?

Post by Enamul »

Yes, 1m cable is too long for LCD data transmission..I have seen problem in sending LCD data over long wires. If you tested your LCD and it works fine except when you connect to the header, wire length could be an issue. By the way, contrast control and RS, En and R/W all pins are connected properly..although you said you checked everything.
Enamul
University of Nottingham
enamul4mm@gmail.com

Speedy2k
Posts: 91
Joined: Mon Aug 06, 2012 5:04 am
Has thanked: 2 times
Contact:

Re: 16 x 2 LCD Problem?

Post by Speedy2k »

I have read that for longer wire loweringvthe frequency of the signal sent to the lcd will help.
Is there a way to do that with Flowcode?

User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed Dec 31, 2008 3:37 pm
Has thanked: 460 times
Been thanked: 523 times
Contact:

Re: 16 x 2 LCD Problem?

Post by Steve001 »

Success always occurs in private and failure in full view.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: 16 x 2 LCD Problem?

Post by Benj »

Hello,

To lower the frequency to the display select the LCD on the panel and click custom code.

Edit the defines code section and change this delay to match your new desired frequency.

Code: Select all

#ifdef _BOOSTC
  #define %a_DELAY   delay_10us(10)
#endif
For example, this would increase the delay by a factor of 10.

Code: Select all

#ifdef _BOOSTC
  #define %a_DELAY   delay_10us(100)
#endif

Post Reply