Flowcode v6.1.1

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

Post Reply
TedO
Posts: 79
Joined: Sat Mar 14, 2015 7:52 am
Has thanked: 46 times
Been thanked: 26 times
Contact:

Flowcode v6.1.1

Post by TedO »

I recently purchased a license for Flowcode V6 PIC Version and am still quite new to this program. I tried to experiment with a small LCD program which would output a message onto the LCD screen, works fine in the simulation etc. The problem I am having is that once I have compiled the program to .HEX file and programmed a PIC16F84A chip, I built the circuit up onto a breadboard according to the EB005 LCD Module pin connections and according to the PIC's and the LCD pinout requirements. Have checked my circuit many times to make certain that there are no faults, but I cannot get the LCD to display anything except a row of black squares on the top line, it seems that it is not initializing. Does the component macro in Flowcode V6 only cater for the PIC16F1937 and PIC16F88 as seen on many of your examples? I am using an LMB162ABC LCD module.

Thanks

User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 364 times
Been thanked: 716 times
Contact:

Re: Flowcode v6.1.1

Post by JohnCrow »

Hi Ted

I'm not familiar with that display, but to work in flowcode the display must have a Hitachi HD44780 or Samsung KS0066U controller chip or equivalent
(the same controller as used in the e-block display).

Flowcode works with a large range of device not just the PIC 16F1927 and 16F88.

If you think the display is ok you can post your flowchart we can have a look at it for you.
1 in 10 people understand binary, the other one doesn't !

TedO
Posts: 79
Joined: Sat Mar 14, 2015 7:52 am
Has thanked: 46 times
Been thanked: 26 times
Contact:

Re: Flowcode v6.1.1

Post by TedO »

Hi John

I think you have hit the nail on the head.....I don't think that this display is compatible with the E Block type as you have mentioned, as it does not seem to initialize at all. Will try and get the correct type on Monday.

Thanks for your kind assistance.....hopefully I will get better at this!!

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Flowcode v6.1.1

Post by medelec35 »

Hi TedO before getting new display, if I was you I would first check that configuration setting are correct (should be if using xtal 4MHz or greater).
If you follow my signature, there is further details on configuration settings.
Then I would do a 1 second flasher make sure that the timing is one second.
If the timings are out then there is either an issue with your hardware, or configuration settings, so no LCD will work as the timings will be out.

What John said about posting your flowchart is really best thing you can do as it could save you money as you may not require another LCD if issue is with something else.

Also with would be helpful if you can provide either a full circuit diagram or explain what value xtal you have and what connections of LCD go to where.

Martin
Martin

TedO
Posts: 79
Joined: Sat Mar 14, 2015 7:52 am
Has thanked: 46 times
Been thanked: 26 times
Contact:

Re: Flowcode v6.1.1

Post by TedO »

Hi Martin

Please find attached the flowchart that I am trying to display.
Attachments
PIC16F84A LCD TEST.fcfx
(4.37 KiB) Downloaded 231 times

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Flowcode v6.1.1

Post by medelec35 »

What have you got pin 5 of LCD connected to, and does 1sec flash test work ok?

If it does and you completed continuity tests to make sure all connections are correct then yes looking at LCD.
But all it takes is one wrong connection or microcontroller to run at the wrong speed for LCD not to be initilaised.
Martin

TedO
Posts: 79
Joined: Sat Mar 14, 2015 7:52 am
Has thanked: 46 times
Been thanked: 26 times
Contact:

Re: Flowcode v6.1.1

Post by TedO »

Hi Martin

Pin 5 of the LCD goes to Ground on my circuit. I strongly suspect that my programmer is the cause of all my problems. Running the 1 second program on a 12F629 chip works perfectly well, however when I configure the program for the 16F84A chip the LED remains lit, in fact the whole PORTB is high all the time.
Will try this same test using my friend's more modern type programmer, mine dates back about 15 years when I started learning to program PICs in assembly language!

Thanks for your kind assistance, it is greatly appreciated, will give you feedback once I have checked out the programmer issues.
Attachments
LCD Circuit.pdf
(171.37 KiB) Downloaded 220 times

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Flowcode v6.1.1

Post by medelec35 »

Hi Ted,
looking at your circuit diagram, MCLR is left floating.
That will keep your microcontroller in permanent reset state since its active low to reset.
With 16F84A MCLR must be connected to +5V with other chips can be floating if MCLR witin configuration settings is set to internal.

Have you got a 4K7 to 10K pull up resistor to connect MCLR to +5V?
You can link it directly to +5V, but you won't be able to program the chip while MCLR is directly connected to +5V since its also VPP programming pin it could damage programmer and chip since VPP can be +13V!

Martin
Martin

TedO
Posts: 79
Joined: Sat Mar 14, 2015 7:52 am
Has thanked: 46 times
Been thanked: 26 times
Contact:

Re: Flowcode v6.1.1

Post by TedO »

Hi Martin

Have corrected the circuit diagram to reflect the pull up resistor on MCLR pin, thanks.

I have gone online this morning to check out our local suppliers of LCD displays, have seen on RS Components website that they stock a display using the ST7066U chip. Now apparently this is also compatible with the HD44780 type display that you mentioned. Will check it out and advise.

Ted

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Flowcode v6.1.1

Post by medelec35 »

Hi Ted,
Did the LED flash at the correct speed with MCLR connected to +5v via pull-up resistor?
If so did you retry LCD?
Martin

TedO
Posts: 79
Joined: Sat Mar 14, 2015 7:52 am
Has thanked: 46 times
Been thanked: 26 times
Contact:

Re: Flowcode v6.1.1

Post by TedO »

Hi Martin,

My outdated programmer was the cause of all the drama, have purchased a new locally made programmer that caters for the entire Microchip PIC family of PDIP chips.
I reprogrammed the 16F84A and the 1Hz timer was working correct. Have not rebuilt the LCD circuit on the breadboard, will give it a go on Saturday.

I always get confused when to connect or not to connect the MCLR pin as some chips have an internal MCLR facility.

Rgds
Ted

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Flowcode v6.1.1

Post by medelec35 »

Hi Ted,
TedO wrote:I always get confused when to connect or not to connect the MCLR pin as some chips have an internal MCLR facility.
There are two ways of checking if MCLR must be connected or not.

1) Look at the datasheet and see if there is a port that's on MCLR.
For example RA3:
MCLR.png
(21.77 KiB) Downloaded 4643 times
if there is then you must change MCLR to internal within configuration settings.

2) Look at the configuration settings.
Is there an option to change MCLR to internal?
MCLR2.png
(23.27 KiB) Downloaded 4643 times
If so then set it to internal then no pull-up is required.

If not, as in the case of 16F84A then a pull-up resistor or direct connection to +5V is essential.
Without any program will not function as chip is in permanent reset state as mentioned in a previous post.

Martin
Martin

TedO
Posts: 79
Joined: Sat Mar 14, 2015 7:52 am
Has thanked: 46 times
Been thanked: 26 times
Contact:

Re: Flowcode v6.1.1

Post by TedO »

Hi Martin

Thanks for the valuable information, sure is great to have guys like you willing to assist newcomers to this fascinating yet daunting field.

Ted

Post Reply