Connecting a alphanumeric LCD to Flowcode
Re: Connecting a alphanumeric LCD to Flowcode
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
Is it necessary to use the language C to be sure that it works ?
Do you advise me to use an external clock?
Arnaud
- 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: Connecting a alphanumeric LCD to Flowcode
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: Connecting a alphanumeric LCD to Flowcode
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
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
Re: Connecting a alphanumeric LCD to Flowcode
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
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
- 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: Connecting a alphanumeric LCD to Flowcode
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: Connecting a alphanumeric LCD to Flowcode
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 ο
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 ο
-
- Flowcode v5 User
- Posts: 273
- Joined: Thu Apr 17, 2008 9:59 am
- Has thanked: 19 times
- Been thanked: 16 times
Re: Connecting a alphanumeric LCD to Flowcode
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
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
- 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: Connecting a alphanumeric LCD to Flowcode
Hello Jan
Yes those connections you specified are correct.
Yes those connections you specified are correct.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Flowcode v5 User
- Posts: 273
- Joined: Thu Apr 17, 2008 9:59 am
- Has thanked: 19 times
- Been thanked: 16 times
Re: Connecting a alphanumeric LCD to Flowcode
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
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
-
- Flowcode v5 User
- Posts: 273
- Joined: Thu Apr 17, 2008 9:59 am
- Has thanked: 19 times
- Been thanked: 16 times
Re: Connecting a alphanumeric LCD to Flowcode
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
Is there a way to fudge the timing short of going into the .C and change all the delays?
Jan Didden
- 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: Connecting a alphanumeric LCD to Flowcode
Hello Jan
If your not getting the black squares on power up then there is a problem. Check your wiring connections and contrast.
If your not getting the black squares on power up then there is a problem. Check your wiring connections and contrast.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Flowcode v5 User
- Posts: 273
- Joined: Thu Apr 17, 2008 9:59 am
- Has thanked: 19 times
- Been thanked: 16 times
Re: Connecting a alphanumeric LCD to Flowcode
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
But I was thinking

Jan Didden
- 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: Connecting a alphanumeric LCD to Flowcode
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- 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: Connecting a alphanumeric LCD to Flowcode
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: Connecting a alphanumeric LCD to Flowcode
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 541 times
- 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: Connecting a alphanumeric LCD to Flowcode
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: Connecting a alphanumeric LCD to Flowcode
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
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
- 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: Connecting a alphanumeric LCD to Flowcode
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: Connecting a alphanumeric LCD to Flowcode
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.........
- 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
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.
- 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
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.
Re: Connecting a alphanumeric LCD to Flowcode
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
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
Re: Connecting a alphanumeric LCD to Flowcode
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!
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!