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
Issues with 16 Bit PIC
Moderator: Benj
-
- Posts: 10
- Joined: Fri Feb 14, 2014 11:02 am
- Been thanked: 3 times
- Contact:
Issues with 16 Bit PIC
- Attachments
-
- Master Controller.fcfx
- Software
- (28.74 KiB) Downloaded 222 times
-
- Master Controller.PDF
- Circuit Diagram
- (199.67 KiB) Downloaded 215 times
-
- 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
- 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?
- Are you sure the display uses the KS0108 controller?
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis
-
- 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
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
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
- 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
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.
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 219 times
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 10
- Joined: Fri Feb 14, 2014 11:02 am
- Been thanked: 3 times
- Contact:
Re: Issues with 16 Bit PIC
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.
Yes, it is a KS0108 type, I've had no issues getting it to display stuff with other processors.
-
- 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
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.
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.