FCD file for 18FxxK50

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

gregobac
Posts: 3
Joined: Tue May 07, 2013 1:08 pm
Contact:

FCD file for 18FxxK50

Postby gregobac » Tue May 07, 2013 1:59 pm

Hi,

Do you have FCD files for PIC 18F25K50 and 18F45K50 :?:

Thanks.

gregobac
Posts: 3
Joined: Tue May 07, 2013 1:08 pm
Contact:

Re: FCD file for 18FxxK50

Postby gregobac » Thu Jun 20, 2013 8:29 am

Hello,

The new pic 18F25K50 and 18F45k50 was created to replace the old 18F2550 and 18F4550.
They include more analog input and internal oscillator.

I need to use these new pic in a new project.
Could you provide me the FCD files for these PIC, Or do you have a FCD files editor, because it's a Chinese language for me.

Best
Regards

User avatar
RobH
Posts: 95
Joined: Wed Sep 11, 2013 7:51 pm
Has thanked: 29 times
Been thanked: 17 times
Contact:

Re: FCD file for 18FxxK50

Postby RobH » Wed Sep 11, 2013 7:54 pm

I also would like to have the necessary files to utilize an 18F25K50 (and 18F45K50). Is someone actively working on this?

Thanks,
-Rob

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Has thanked: 514 times
Been thanked: 467 times
Contact:

Re: FCD file for 18FxxK50

Postby dazz » Thu Sep 12, 2013 9:33 am

Hi Guys
It would help if you let us know what version of flowcode you are using, Windows has its own fcd file editor its called notepad,, it would help if you attach the datasheet to a post, The MM team have been flat out busy over the course of this year so may have missed this thread, if you have V5 follow the link in my sig to sign up to the V5 forum as you end to get a quicker response by posting in the correct forums, also have you done a search on those chips to see if anything has been posted on the forums, I can only speak for myself but as a VC i tend to look at the other forums first, remember guys we are very busy as are the MM team so try to help us help you by posting as much info as you can, ie attach a datasheet ,if you have a problem with a flowchart attach it to a post, all of us will help when we can but we are not psychic so need more info



Regards
Dazz
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php

User avatar
RobH
Posts: 95
Joined: Wed Sep 11, 2013 7:51 pm
Has thanked: 29 times
Been thanked: 17 times
Contact:

Re: FCD file for 18FxxK50

Postby RobH » Fri Sep 13, 2013 10:21 pm

FC6 v6.0.1.0 (04.09.2013)
Windows 7 64bit and I do know about notepad, although, I know nothing of manipulating FCD files properly...

PIC18F25K50 and PIC18F45k50 datasheet:
http://ww1.microchip.com/downloads/en/DeviceDoc/30684A.pdf


Thanks,
-Rob


PS. Thank you for not being psychic. I don't think I need people knowing what I'm thinking sometimes. Also, thank you for presumably not being psycho...

kersing
Valued Contributor
Valued Contributor
Posts: 1873
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 530 times
Been thanked: 1040 times
Contact:

Re: FCD file for 18FxxK50

Postby kersing » Fri Sep 13, 2013 10:43 pm

PIC18F25k50 and PIC18F24k50 are not supported by the Sourceboost C compiler. I am also not sure the USB stack has been updated for use with these devices yet.
These users thanked the author kersing for the post:
RobH (Sat Sep 14, 2013 12:51 am)
Rating: 5.26%
 
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

User avatar
RobH
Posts: 95
Joined: Wed Sep 11, 2013 7:51 pm
Has thanked: 29 times
Been thanked: 17 times
Contact:

Re: FCD file for 18FxxK50

Postby RobH » Fri Sep 20, 2013 1:25 am

Should I move my request to the FC6 forum, and also include a question about who to contact in relation to adding these PICs to the BoostC compiler?

Thanks,
-Rob

kersing
Valued Contributor
Valued Contributor
Posts: 1873
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 530 times
Been thanked: 1040 times
Contact:

Re: FCD file for 18FxxK50

Postby kersing » Fri Sep 20, 2013 4:19 pm

For the BoostC Compiler you need to contact the people at http://www.sourceboost.com. After they've included the devices MM needs to include the new compiler in an update, so it will be some time before the devices become available for Flowcode use.
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

User avatar
RobH
Posts: 95
Joined: Wed Sep 11, 2013 7:51 pm
Has thanked: 29 times
Been thanked: 17 times
Contact:

Re: FCD file for 18FxxK50

Postby RobH » Sun Sep 22, 2013 5:31 am

Ok, I made a request in their forums. Lets see where it gets us!

http://forum.sourceboost.com/index.php?showtopic=5245#entry19679
These users thanked the author RobH for the post (total 3):
dazz (Sun Sep 22, 2013 10:49 am) • Benj (Wed Sep 25, 2013 4:02 pm) • medelec35 (Fri Dec 06, 2013 8:40 pm)
Rating: 15.79%
 

GTF
Posts: 170
Joined: Sat Dec 10, 2011 7:21 pm
Location: Canada
Has thanked: 20 times
Been thanked: 52 times
Contact:

Re: FCD file for 18FxxK50

Postby GTF » Fri Dec 06, 2013 7:09 pm

RobH wrote:Ok, I made a request in their forums. Lets see where it gets us!

http://forum.sourceboost.com/index.php?showtopic=5245#entry19679


I added another request over there. I don't mind using an external crystal so I could live without the "crystal-less" USB, but I could really use the larger flash and higher temp rating of these chips.

User avatar
Benj
Matrix Staff
Posts: 14313
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4405 times
Been thanked: 4128 times
Contact:

Re: FCD file for 18FxxK50

Postby Benj » Wed Dec 11, 2013 1:37 pm

Hello,

Were currently working on adding these devices into v6. Input from Sourceboost on this has been disappointing to say the least. We are applying pressure where we can but also looking into the new XC style compilers from Microchip.
These users thanked the author Benj for the post (total 2):
GTF (Wed Dec 11, 2013 2:58 pm) • RobH (Wed Dec 11, 2013 3:41 pm)
Rating: 10.53%
 

Kenrix2
Flowcode v5 User
Posts: 211
Joined: Tue Feb 19, 2013 9:51 pm
Has thanked: 72 times
Been thanked: 177 times
Contact:

Re: FCD file for 18FxxK50

Postby Kenrix2 » Fri Dec 13, 2013 2:45 am

Nice to here your looking into XC8 compilers Benj.
I have done limited testing with XC8 and Flowcode V5. It is a bit of work to setup and I can't figure out how to add the configuration bits in my program so I have to manually enter the configuration bits using the PICkit programmer. If anyone wants to experiment with XC8 here are a few tips. To setup the compiler options put this into...
Compiler Location: C:\Program Files\Microchip\xc8\v1.12\bin\picc.exe
(above location might be different and picc.exe is for 12f/16f, picc18.exe is for 18f)
Compiler Parameters: --CHIP=%p -N48 %f.c
Linker Location: C:\Program Files\Flowcode\v5\Tools\DoNothing\DoNothing.exe
Linker Parameters: make this field blank
Programmer: uncheck "Use external program to set configuration options"
In the project options window/general options tab, uncheck "configure the chip"
and in supplementaty code add this to the top box #include <xc.h>
Now for the defines. XC8 uses upper case letters for the register names and Flowcode outputs lower case. (i.e. porta PORTA ). You can handle this many ways but maybe the easiest is to just add defines to supplementary code as the compiler errors pop up. For instance, #define porta PORTA and on another line #define portb PORTB. You could make a file with all the defines in it and then just add an #include "C:\Program Files\Flowcode\v5\FCD\put the file name here.h" to supplemenatary code.
If you want to use a chip that flowcode does not yet support a .fcd file for that chip will have to be created. I have not done this but maybe a starting place would be to use a .fcd for a similar chip and modify it to match your chip. If your a Flowcode V4 or V5 user it seems like this method might be your only option. If XC8 support does come out for V6 then, that would be another good reason to upgrade. And lastly, you might encounter issues using XC8 with Flowcode.
These users thanked the author Kenrix2 for the post (total 3):
RobH (Fri Dec 13, 2013 3:01 am) • Benj (Fri Dec 13, 2013 10:27 am) • Rudi (Mon Apr 28, 2014 11:41 pm)
Rating: 15.79%
 

User avatar
RobH
Posts: 95
Joined: Wed Sep 11, 2013 7:51 pm
Has thanked: 29 times
Been thanked: 17 times
Contact:

Re: FCD file for 18FxxK50

Postby RobH » Wed Apr 23, 2014 8:45 pm

Is there an update for which route you guys are going on this? My options so far seem to be:

1. Wait for Sourceboost and Matrix to work out updates for newer Microchip ICs.
2. Wait for Matrix to switch over to XC8.
3. Go Arduino, which would require me to purchase another chip pack from Matrix.
4. Something I missed and didn't list.

kersing
Valued Contributor
Valued Contributor
Posts: 1873
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 530 times
Been thanked: 1040 times
Contact:

Re: FCD file for 18FxxK50

Postby kersing » Wed Apr 23, 2014 9:09 pm

Wait a few days and I'll post an installer to update the latest FC5 to include the 18F24K50, 18F25K50 and 18F45K50. I just need to run a final tests on the installer against a clean FC5 installation.
FC6 release 6.0.7 includes support for these devices but requires one fix if you want to use the USB stack.

PM if you want to beta test the FC5 update...
These users thanked the author kersing for the post:
RobH (Wed Apr 23, 2014 11:52 pm)
Rating: 5.26%
 
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

User avatar
RobH
Posts: 95
Joined: Wed Sep 11, 2013 7:51 pm
Has thanked: 29 times
Been thanked: 17 times
Contact:

Re: FCD file for 18FxxK50

Postby RobH » Wed Apr 23, 2014 11:36 pm

Thanks. I have FC6.01; I'll download the latest version.

User avatar
RobH
Posts: 95
Joined: Wed Sep 11, 2013 7:51 pm
Has thanked: 29 times
Been thanked: 17 times
Contact:

Re: FCD file for 18FxxK50

Postby RobH » Fri May 02, 2014 12:25 am

I'm curious if more work is needed in the config files for the 18f25k50. FOSC = INTOSCIO is not available in the drop down list. I'm not sure if there's more. Other than that, I'm ready to pull my hair out. Does anybody have a LED blinky code for this chip working with FC6? I'd love to study it.

And I went ahead and purchased the AVR pack from MM. That's another can of worms on a different post. :lol:

User avatar
Benj
Matrix Staff
Posts: 14313
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4405 times
Been thanked: 4128 times
Contact:

Re: FCD file for 18FxxK50

Postby Benj » Fri May 02, 2014 9:59 am

Hello,

I'm curious if more work is needed in the config files for the 18f25k50. FOSC = INTOSCIO is not available in the drop down list. I'm not sure if there's more.


Looks like the list of setting we are providing has come directly from the device datasheet. Can't see any missing options.

config.jpg
config.jpg (54.39 KiB) Viewed 11788 times


We have used this chip on some of our new hardware boards and they are working great. I can find out the config settings for you if that would help.

User avatar
LeighM
Matrix Staff
Posts: 1890
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 446 times
Been thanked: 640 times
Contact:

Re: FCD file for 18FxxK50

Postby LeighM » Fri May 02, 2014 10:28 am

INTOSCIO is option 8 "Internal Oscillator Block"

Leigh
These users thanked the author LeighM for the post:
RobH (Fri May 02, 2014 4:38 pm)
Rating: 5.26%
 

User avatar
RobH
Posts: 95
Joined: Wed Sep 11, 2013 7:51 pm
Has thanked: 29 times
Been thanked: 17 times
Contact:

Re: FCD file for 18FxxK50

Postby RobH » Fri May 02, 2014 4:37 pm

Thank you. Those verbose descriptions confuse me. Would be nice to be able to toggle them along with the descriptive names. I have had no issues with 16f chips with intosc and no issues with 18F2550 with ecosc, but the 18f25k50 is a beast... Currently trying to use intosc and can't even get a port to turn on.

User avatar
LeighM
Matrix Staff
Posts: 1890
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 446 times
Been thanked: 640 times
Contact:

Re: FCD file for 18FxxK50

Postby LeighM » Tue May 06, 2014 4:26 pm

Hi

Please see attached files.
The 18F25K50 FCD had a bug that will not have helped, fixed version attached together with LED flash on PORT A

Regards,
Leigh
Attachments
PIC18F25K50 LED TEST.hex
(748 Bytes) Downloaded 101 times
PIC18F25K50 LED TEST.fcfx
(3.4 KiB) Downloaded 93 times
18F25K50.fcdx
(30.94 KiB) Downloaded 119 times
These users thanked the author LeighM for the post:
RobH (Wed May 07, 2014 1:45 am)
Rating: 5.26%
 

User avatar
RobH
Posts: 95
Joined: Wed Sep 11, 2013 7:51 pm
Has thanked: 29 times
Been thanked: 17 times
Contact:

Re: FCD file for 18FxxK50

Postby RobH » Wed May 07, 2014 1:50 am

Thanks for that. I couldn't get your hex or compiled fcfx file to work but your fcdx file fixed my problem! Here's my working fcfx file:

porta_blink_1sec.fcfx
PIC18F25K50 - blink port A @1sec on INTOSC @16mhz
(4.44 KiB) Downloaded 133 times


Now on to USB and LCD!
These users thanked the author RobH for the post:
Benj (Wed May 07, 2014 10:14 am)
Rating: 5.26%
 

User avatar
RobH
Posts: 95
Joined: Wed Sep 11, 2013 7:51 pm
Has thanked: 29 times
Been thanked: 17 times
Contact:

Re: FCD file for 18FxxK50

Postby RobH » Wed May 07, 2014 6:31 pm

kersing wrote:FC6 release 6.0.7 includes support for these devices but requires one fix if you want to use the USB stack.


I do want to use the USB stack. Could someone provide me with some information about the needed fix?

kersing
Valued Contributor
Valued Contributor
Posts: 1873
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 530 times
Been thanked: 1040 times
Contact:

Re: FCD file for 18FxxK50

Postby kersing » Wed May 07, 2014 10:19 pm

RobH wrote:I do want to use the USB stack. Could someone provide me with some information about the needed fix?


You'll need to edit the file C:\Program Files (x86)\Flowcode 6\compilers\pic\boostc\include\USB\pic_usb.c (on 64 bit windows) or C:\Program Files\Flowcode 6\compilers\pic\boostc\include\USB\pic_usb.c (on 32 bit windows)

At line 601 (in the function usb_handle_isr) you will find:

Code: Select all

   if (test_bit(pir2, USBIF))         //USB Interrupt?
   {
      clear_bit(pir2, USBIF);         //Clear USB Interrupt

      if (test_bit(uir, IDLEIF))      //USB Idle Interrupt?


This needs to be changed to:

Code: Select all

   if (test_bit(PIRREG, USBIF))         //USB Interrupt?
   {
      clear_bit(PIRREG, USBIF);         //Clear USB Interrupt

      if (test_bit(uir, IDLEIF))      //USB Idle Interrupt?

(So replace pir2 by PIRREG two times)
These users thanked the author kersing for the post (total 4):
RobH (Thu May 08, 2014 12:58 am) • LeighM (Thu May 08, 2014 8:22 am) • Benj (Thu May 08, 2014 9:42 am) • medelec35 (Sun May 11, 2014 12:28 am)
Rating: 21.05%
 
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

User avatar
Benj
Matrix Staff
Posts: 14313
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4405 times
Been thanked: 4128 times
Contact:

Re: FCD file for 18FxxK50

Postby Benj » Thu May 08, 2014 9:43 am

Thanks Kersing,

This fix was checked in but it looks like it did not make it through to the 6.0.7 build for some reason. I've made a note to double check this mod is in the next release.

User avatar
RobH
Posts: 95
Joined: Wed Sep 11, 2013 7:51 pm
Has thanked: 29 times
Been thanked: 17 times
Contact:

Re: FCD file for 18FxxK50

Postby RobH » Sat May 10, 2014 11:51 pm

Should I have to tune the clock settings in the build options after setting osccon to 0x7e? If I set the clock settings to 16000000, blinking an LED 1sec makes it blink too fast. If I set the clock setting to ~19387500 it's pretty close.