Page 1 of 1

LCD simulation problem

Posted: Thu Oct 03, 2024 9:18 am
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

Re: LCD simulation problem

Posted: Thu Oct 03, 2024 9:37 am
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.

Re: LCD simulation problem

Posted: Thu Oct 03, 2024 6:43 pm
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.

Re: LCD simulation problem

Posted: Fri Oct 04, 2024 11:34 am
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?

Re: LCD simulation problem

Posted: Fri Oct 04, 2024 12:31 pm
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 4621 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 4621 times
I'm surprised that the LED you have connected to your hardware cycles on and off at exactly one second.

Re: LCD simulation problem

Posted: Fri Oct 04, 2024 1:33 pm
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