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
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 84 times
Master Controller.PDF
Circuit Diagram
(199.67 KiB) Downloaded 77 times

kersing
Valued Contributor
Valued Contributor
Posts: 1961
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
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

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 9100
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
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: 15011
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
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 82 times

james_r_lucas
Posts: 10
Joined: Fri Feb 14, 2014 11:02 am
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
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