Issues with 16 Bit PIC

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

Moderator: Benj

Post Reply
james_r_lucas
Posts: 10
Joined: Fri Feb 14, 2014 11:02 am
Been thanked: 3 times
Contact:

Issues with 16 Bit PIC

Post 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
Attachments
Master Controller.fcfx
Software
(28.74 KiB) Downloaded 214 times
Master Controller.PDF
Circuit Diagram
(199.67 KiB) Downloaded 207 times

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: Issues with 16 Bit PIC

Post 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?
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

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: Issues with 16 Bit PIC

Post 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.

Martin
Martin

User avatar
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: Issues with 16 Bit PIC

Post by Benj »

Hello,

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.
Attachments
24FJ256GB210.fcdx
(62.96 KiB) Downloaded 215 times

james_r_lucas
Posts: 10
Joined: Fri Feb 14, 2014 11:02 am
Been thanked: 3 times
Contact:

Re: Issues with 16 Bit PIC

Post 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.

cobra1
Posts: 175
Joined: Thu Feb 04, 2010 7:44 am
Has thanked: 3 times
Been thanked: 3 times
Contact:

Re: Issues with 16 Bit PIC

Post 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.

Post Reply