Connecting a alphanumeric LCD to Flowcode

Forum for problems or queries regarding other Flowcode Components. Eg LEDs, Switches, LCD, Gfx LCD etc

Moderators: Benj, Mods

arnaud
Posts: 5
Joined: Wed Dec 05, 2007 10:59 pm
Contact:

Re: Connecting a alphanumeric LCD to Flowcode

Postby arnaud » Fri Jan 25, 2008 8:33 pm

Did you test a alphanumeric LCD with a PICmicro using an internal clock?

Is it necessary to use the language C to be sure that it works ?

Do you advise me to use an external clock?

Arnaud

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

Re: Connecting a alphanumeric LCD to Flowcode

Postby Benj » Mon Jan 28, 2008 10:32 am

Another thing to look out for is in the expert configuration settings for the chip. If you have your LCD connected to PortB then you will have to disable Low Voltage Programming. This programming method uses up an I/O pin (generally on PortB) to detect the programming voltage.

kirstom14
Posts: 40
Joined: Thu Nov 15, 2007 9:13 am
Contact:

Re: Connecting a alphanumeric LCD to Flowcode

Postby kirstom14 » Mon Jan 28, 2008 10:54 pm

Hi Ben

Regarding my problem. With a help of another flowcode forum user, we tried the same cct on a different breadboard [as we were in a prototyping stage] and the program worked ok. Then we found that the breadboard that I was using has a high capacitance between its tracks and so it was interferancing with the crystal.
I am using a zif socket. Soldering a base to it and then soldering the crystal directlt to the pins of the base solved the problem. And the cct is now working fine!!!
So the PIC is recognising the LCD not as I taught, but another technical problem that we have no control over it....

Thanks very much
kirstom14
tomcat14

Ron
Posts: 225
Joined: Wed Apr 11, 2007 6:15 pm
Has thanked: 2 times
Contact:

Re: Connecting a alphanumeric LCD to Flowcode

Postby Ron » Tue Jan 29, 2008 4:54 am

Hi,

The HD44780 I have, actual Hitachi does not match your pin out.

Hitachi Pin 5 is R/W read/write. Your pinout calls out ground, do I simply tie this to ground and it will work?

Data sheet calls out

D0 - D3, not used in 4 bit operation.

D4 - D7 - I this what you were referring to as Flowocde D0 - D3?

Thanks

Ron

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

Re: Connecting a alphanumeric LCD to Flowcode

Postby Benj » Tue Jan 29, 2008 10:44 am

Hello Ron

Yes tying this pin to ground simply fixes it into the write state. There does not seem much point in being able to read data back from the LCD as you have had to send it out in the first place. Yes D0 - D3 is connected to pins D4 -D7 on the LCD.

GJB
Posts: 11
Joined: Tue Jan 09, 2007 9:37 pm
Contact:

Re: Connecting a alphanumeric LCD to Flowcode

Postby GJB » Sat Mar 15, 2008 3:15 pm

Hi Support team
I recently designed a board which employed an LCD display supplied by Crystalfontz. The display is pin and function compatible Flowcode. The target application required the finished product to be placed in strong RF fields, and so I decoupled the data and control lines of the display port to ground using 1nf capacitors.

The PIC board was running with a 20 Mhz clock, and I found on first test the display produced corrupted characters in random parts of the display area. This proved to be the decoupling capacitors which were rounding off the edge of the data waveform, thus making it hard for the display logic to find the leading edge. Once removed, the display functioned normally, and did not suffer from the effects of RF.

Just something to watch for 

jadiflow
Flowcode v5 User
Posts: 249
Joined: Thu Apr 17, 2008 9:59 am
Has thanked: 16 times
Been thanked: 16 times
Contact:

Re: Connecting a alphanumeric LCD to Flowcode

Postby jadiflow » Wed Jun 04, 2008 9:33 am

Just to make sure I understand the connections:

Flowcode specified D0 bit = LCD D4 = component connection Data 1
Flowcode specified D1 bit = LCD D5 = component connection Data 2
Flowcode specified D2 bit = LCD D6 = component connection Data 3
Flowcode specified D3 bit = LCD D7 = component connection Data 4

("Flowcode specified bit" is mentioned in the very first post in this thread)

Correct?

Jan Didden

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

Re: Connecting a alphanumeric LCD to Flowcode

Postby Benj » Wed Jun 04, 2008 9:54 am

Hello Jan

Yes those connections you specified are correct.

jadiflow
Flowcode v5 User
Posts: 249
Joined: Thu Apr 17, 2008 9:59 am
Has thanked: 16 times
Been thanked: 16 times
Contact:

Re: Connecting a alphanumeric LCD to Flowcode

Postby jadiflow » Fri Jun 20, 2008 1:34 pm

Hello,

I have a DATRON 2*20 LCD (Samsung KS0070-BP controller) on portC of a 16F865, no display at all, not even dark squares. I double checked the connections, and the program itself runs correctly (reacts to events correctly).
I do an LCD init at the start.
Osc is external xtal at 4Mhz, config also set to 4Mhz, HS (Question: should the config be HS or XT? Neither works, anyway).
Any tips?

Jan Didden

jadiflow
Flowcode v5 User
Posts: 249
Joined: Thu Apr 17, 2008 9:59 am
Has thanked: 16 times
Been thanked: 16 times
Contact:

Re: Connecting a alphanumeric LCD to Flowcode

Postby jadiflow » Fri Jun 20, 2008 2:17 pm

It must be a timing issue. I connected a Noritake 4*20 VFD (which is supposed to be HD44780 compatible), and that works.
Is there a way to fudge the timing short of going into the .C and change all the delays?

Jan Didden

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

Re: Connecting a alphanumeric LCD to Flowcode

Postby Benj » Fri Jun 20, 2008 2:37 pm

Hello Jan

If your not getting the black squares on power up then there is a problem. Check your wiring connections and contrast.

jadiflow
Flowcode v5 User
Posts: 249
Joined: Thu Apr 17, 2008 9:59 am
Has thanked: 16 times
Been thanked: 16 times
Contact:

Re: Connecting a alphanumeric LCD to Flowcode

Postby jadiflow » Fri Jun 20, 2008 3:42 pm

Ben, thanks, I'll double check the contrast thing. As I noted above, the Noritake display works OK.

But I was thinking ;-) if it is a timing issue (not all LCD controllers are exactly equal in that respect) if I specify the clock freq at double of what it actually is, it might give the LCD controller enough leeway. Or am I talking non-sense?

Jan Didden

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

Re: Connecting a alphanumeric LCD to Flowcode

Postby Benj » Fri Jun 20, 2008 4:40 pm

Hello Jan

You are correct that speeding up the clock in Flowcode will give you longer delays. However we have tested our driver quite thoroughly and the correct speed should work.

IIf there is no black squares then the problem is the LCD or the LCD circuitry.

jadiflow
Flowcode v5 User
Posts: 249
Joined: Thu Apr 17, 2008 9:59 am
Has thanked: 16 times
Been thanked: 16 times
Contact:

Re: Connecting a alphanumeric LCD to Flowcode

Postby jadiflow » Sat Jun 21, 2008 3:11 pm

Ben, my bad. The contrast pot was connected to Vdd both sides....
I should learn to trust you guys more ;-)

Jan Didden

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

Re: Connecting a alphanumeric LCD to Flowcode

Postby Benj » Mon Jun 23, 2008 9:47 am

Hello Jan

Its always the small details that cause the problems. Glad you've got it working correctly now. Let us know if you have any further problems.

hjue
Posts: 3
Joined: Thu Feb 19, 2009 3:42 am
Contact:

Re: Connecting a alphanumeric LCD to Flowcode

Postby hjue » Thu Feb 19, 2009 3:52 am

I am trying to connect a 16x2 alphanumeric LCD (LCM-S01602DTR) to my PIC18F1320. All my wiring seems to be correct according to the first post in this thread. The LCD powers on and the first row is all on. However, the text I have programmed in Flowcode (v3.4.7.48) does not show. I've attached my code. The final product will be an incubator sensor/alarm (humidity/temperature sensor), and this is only the display part. Thanks in advance for the help.
Attachments
Incubator Alarm (Display portion).fcf
(5.5 KiB) Downloaded 324 times

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

Re: Connecting a alphanumeric LCD to Flowcode

Postby Benj » Thu Feb 19, 2009 11:50 am

Hello

Please can you check the following:

1) The Chip -> Clock speed in Flowcode has the correct value to match your crystal.
2) The Chip -> Configuration in Flowcode is set to XTAL (Expert mode HS for over 4MHz, XT for 4MHz or under, Watchdog Off, LVP Off)
3) The hardware is set to XTAL mode if you are using Matrix hardware.
4) The Pin connections defined in Flowcode are correct.

zolti103
Posts: 2
Joined: Sun Jul 26, 2009 1:50 pm
Contact:

Re: Connecting a alphanumeric LCD to Flowcode

Postby zolti103 » Tue Jul 28, 2009 6:19 am

Hello, Benj

i am trying to interface 1x16 HD44780controller LCD with PIC16f876a, my circuit is soldered on waroboard, i have tried all the points written in previous discussion of forum but no success till now. i have tried 4MHZ ,11MHZ crystals with HS and XT config for both. LCD initializes ok as dark boxes turns in to very light boxes i have also varied the contrast but no alphabet appear on LCD.

while i have been successfully used the same LCD on kiel for C51 family and PIc16f876a on MPLAB

its mean there is some problem using FLOWCODe, i have tried on v3.2 and v4....

PLease guide me, i am tired of lenghty programes of kiel and MPLAB

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

Re: Connecting a alphanumeric LCD to Flowcode

Postby Benj » Tue Jul 28, 2009 8:27 am

Hello

The thing to check is that your clock speed setting in Flowcode matches your actual crystal frequency. The default is 19.6608MHz. Also you should check the connections of the LCD component in Flowcode to ensure the pin wiring to the LCD matches your configuration. Remember that the four data bytes are connected to the higher nibble of the data bus on the LCD. eg D4 - D7.

zolti103
Posts: 2
Joined: Sun Jul 26, 2009 1:50 pm
Contact:

Re: Connecting a alphanumeric LCD to Flowcode

Postby zolti103 » Wed Jul 29, 2009 4:41 am

i have also tried it previously, if my circuit is wrong or clock speed is wrong then it never get initialize properly, any ways ...i will reconfirm all your mentioned points again.........

User avatar
tmd_63
Flowcode V4 User
Posts: 21
Joined: Sat Dec 26, 2009 9:47 pm
Location: Swindon, England
Has thanked: 9 times
Been thanked: 1 time
Contact:

Re: Connecting a alphanumeric LCD to Flowcode

Postby tmd_63 » Wed Dec 30, 2009 3:43 pm

Is there any way of allowing the LCD component to use all of the inputs D0-D7, E, RS and R/W instead of just the 4bit mode and no R/W if required as I have a requirement that uses the faster 8bit mode.

User avatar
Steve
Matrix Staff
Posts: 3071
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 87 times
Been thanked: 387 times
Contact:

Re: Connecting a alphanumeric LCD to Flowcode

Postby Steve » Thu Dec 31, 2009 9:34 am

You will have to customise the low-level comms with your own C code if you want to use the 8-bit mode.

User avatar
tmd_63
Flowcode V4 User
Posts: 21
Joined: Sat Dec 26, 2009 9:47 pm
Location: Swindon, England
Has thanked: 9 times
Been thanked: 1 time
Contact:

Re: Connecting a alphanumeric LCD to Flowcode

Postby tmd_63 » Thu Dec 31, 2009 12:11 pm

Is it possible to look at a new component or change to the original component for the LCd to allow 8bit modes as an enhancement please.

ASDned
Posts: 6
Joined: Tue Sep 08, 2009 12:08 pm
Contact:

Re: Connecting a alphanumeric LCD to Flowcode

Postby ASDned » Sat Feb 13, 2010 1:39 pm

Hello specialist,
I have a LCD problem with the following setup:
I have bought the PIC18F4520 Dem2PLUS board from Sure Electronics witch is a nice board but the LCD is connected in 8 bits mode and so the RS and E line are on a different port. I disconnected the pins 4, 5, 7, 8, 9, 10 and put them to ground. The control signals are stil on a different port because the hardware was build this way. The LCD gives the grey row, some rubbish but most of the time nothing. Should I rewire the control signals?

Best regards,
ASDned

ASDned
Posts: 6
Joined: Tue Sep 08, 2009 12:08 pm
Contact:

Re: Connecting a alphanumeric LCD to Flowcode

Postby ASDned » Sat Feb 13, 2010 8:31 pm

Hello specialist,

Here I am again with a update...
I already have changed the LCD connections to the D port with the RS on bit 0 to pin 4 and the E on bit 1 to pin 6, the data bits from 4 to 7 on pin 11 to 14 of the LCD. but still nothing but rubbish. I have a 12 Mhz. xtal and I am using the HS option but are there other things to set in the configuration menu because I think its a timing problem?

Please HELP!