LCD simulation problem

For general Flowcode discussion that does not belong in the other sections.
Post Reply
jack2006
Posts: 4
http://meble-kuchenne.info.pl
Joined: Tue Jan 19, 2021 9:06 am

LCD simulation problem

Post by jack2006 »

I am probably missing something but just created a test program for LCD 16x2 and cannot get it to display anything. Used similar snipit of code in version 6 over the years without any problems. Something obvious I am missing, suggestions appreciated (not rude!) thanks
Attachments
LCD Test Flowcode 10.fcfx
(8.55 KiB) Downloaded 127 times

medelec35
Matrix Staff
Posts: 2086
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 644 times
Been thanked: 702 times

Re: LCD simulation problem

Post by medelec35 »

Hello.
Unlike other forums, On these forums we don't tolerate any rude comments/abuse etc.
The first thing to check is if the configuration setting are correct e.g. start with Watchdog enabled to No.
When starting a new project, I would recommend starting with a very basic 1 sec flasher test.
Only when the LED is on and off for only a full second, then add components like LCD.
If LED is flashing on/off for one second, and LCD is still not working, then we can look at how the LCD is wired and do some fault finding.
Martin

jack2006
Posts: 4
Joined: Tue Jan 19, 2021 9:06 am

Re: LCD simulation problem

Post by jack2006 »

Thanks for reply. Yes I already have leds and various control items in my flowchart and they work fine. I was trying to use the MAP function in version 10, hence using the simulation LCD display but no luck which is why I went back to a simple 'start' and then 'print' command. I can see my mapped valueschanging as expected watching the variables so guess that will be close enough until I can try it in hardware.

jack2006
Posts: 4
Joined: Tue Jan 19, 2021 9:06 am

Re: LCD simulation problem

Post by jack2006 »

Dropped back to version 6 and LCD works as expected in simulation and also functions fine with MAP function etc. Tried other LCD displays in version 10 and could not get any to work in simulation, seems strange, perhaps my version is corrupted?

medelec35
Matrix Staff
Posts: 2086
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 644 times
Been thanked: 702 times

Re: LCD simulation problem

Post by medelec35 »

Hi Jack.
Can you compare FC10 Configuration Options to FC6.
The reason I mentioned the 1 sec flasher is because you have Watchdog Timer Enabled set to yes, but you don't add C code Command icon or Autoclear watchdog enabled in Other Options, to clear the watchdog timer.
Config settings1.png
Config settings1.png (174.67 KiB) Viewed 4616 times
That would mean your hardware keeps resetting and not allowing the LCD to work.
Also there looks like there is a mismatch between clock speed selection and Clock settings without a C ocde block to change clock speed on your hardware to match:
Config settings2.png
Config settings2.png (28.23 KiB) Viewed 4616 times
I'm surprised that the LED you have connected to your hardware cycles on and off at exactly one second.
Martin

jack2006
Posts: 4
Joined: Tue Jan 19, 2021 9:06 am

Re: LCD simulation problem

Post by jack2006 »

Hello Martin,

Sorry I had changed the watchdog settings as you last suggested but still no joy and also changed the clock time.

Thanks, John

Post Reply