Page 1 of 1

Issues with 16 Bit PIC

Posted: Sat Apr 26, 2014 8:43 pm
by james_r_lucas
Hello All,

I am using a 16 Bit PIC (Specifically the 24FJ256GB210) for the first time, having only used 8 bit PICs before, however I am having several issues

- The PIC keeps reseting and going through the initialisation function every few minutes - despite having the WDT turned off in the config bits
- A couple of outputs wont work, unless I repeatedly turn them on and off in a loop (The LCD Backlight output for example, down not turn on in the initialisation function, but does toggle in the loop in the main function)
- LCD is refusing to display anything (It's no the contrast, I've already checked that!)

Can anyone look over it and see if I'm doing anything stupid please?

I have attached the code and a circuit diagram below

Re: Issues with 16 Bit PIC

Posted: Sun Apr 27, 2014 10:49 pm
by kersing
- It looks like the CONFIG1 and CONFIG3 registers are not mapped to the correct memory positions (swapped). That might explain the reset issues. (Benj could you check this?)
- Are you sure the display uses the KS0108 controller?

Re: Issues with 16 Bit PIC

Posted: Sun Apr 27, 2014 11:14 pm
by medelec35
Hi James,
I total agree with kersing as settings like watchdog timer are still enabled which explains constant resetting, even though you disabled it.
There is a way around this.
You could download MPLAB or programming (You don't need the actual programmer) software like ASIX Presto
Enter the target device, set configuration settings, save hex file with new configuration settings:

Then load hex file in your current programmer.
This of course is only temporary until bug is fixed.


Re: Issues with 16 Bit PIC

Posted: Mon Apr 28, 2014 11:00 am
by Benj

Kersing was correct the config register settings were the wrong way. I've now fixed this in the definition file.

Please copy the attached file into your "C:\Program Files (x86)\Flowcode 6\FCD\PIC16" directory and restart Flowcode to load the changes, other devices in the same family had the same issue, all been fixed now.

Re: Issues with 16 Bit PIC

Posted: Mon Apr 28, 2014 11:49 am
by james_r_lucas
Many Thanks Benj, I will try that tonight :)

Yes, it is a KS0108 type, I've had no issues getting it to display stuff with other processors.

Re: Issues with 16 Bit PIC

Posted: Sun May 11, 2014 11:19 pm
by cobra1
Hi i am having the exact same issues with the 24FJ256GB206. Would the solution be the same here also.

Im am keen to find out if this also fixed the display fault aswell as i cannot get my display to work at all over SPI but using pic18 it works flawlessly.

I am using the trial version of v6.0.7.