Page 1 of 2

FCD file for 18FxxK50

Posted: Tue May 07, 2013 1:59 pm
by gregobac
Hi,

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

Thanks.

Re: FCD file for 18FxxK50

Posted: Thu Jun 20, 2013 8:29 am
by gregobac
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

Re: FCD file for 18FxxK50

Posted: Wed Sep 11, 2013 7:54 pm
by RobH
I also would like to have the necessary files to utilize an 18F25K50 (and 18F45K50). Is someone actively working on this?

Thanks,
-Rob

Re: FCD file for 18FxxK50

Posted: Thu Sep 12, 2013 9:33 am
by dazz
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

Re: FCD file for 18FxxK50

Posted: Fri Sep 13, 2013 10:21 pm
by RobH
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/D ... 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...

Re: FCD file for 18FxxK50

Posted: Fri Sep 13, 2013 10:43 pm
by kersing
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.

Re: FCD file for 18FxxK50

Posted: Fri Sep 20, 2013 1:25 am
by RobH
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

Re: FCD file for 18FxxK50

Posted: Fri Sep 20, 2013 4:19 pm
by kersing
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.

Re: FCD file for 18FxxK50

Posted: Sun Sep 22, 2013 5:31 am
by RobH
Ok, I made a request in their forums. Lets see where it gets us!

http://forum.sourceboost.com/index.php? ... entry19679

Re: FCD file for 18FxxK50

Posted: Fri Dec 06, 2013 7:09 pm
by GTF
RobH wrote:Ok, I made a request in their forums. Lets see where it gets us!

http://forum.sourceboost.com/index.php? ... 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.

Re: FCD file for 18FxxK50

Posted: Wed Dec 11, 2013 1:37 pm
by Benj
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.

Re: FCD file for 18FxxK50

Posted: Fri Dec 13, 2013 2:45 am
by Kenrix2
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.

Re: FCD file for 18FxxK50

Posted: Wed Apr 23, 2014 8:45 pm
by RobH
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.

Re: FCD file for 18FxxK50

Posted: Wed Apr 23, 2014 9:09 pm
by kersing
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...

Re: FCD file for 18FxxK50

Posted: Wed Apr 23, 2014 11:36 pm
by RobH
Thanks. I have FC6.01; I'll download the latest version.

Re: FCD file for 18FxxK50

Posted: Fri May 02, 2014 12:25 am
by RobH
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:

Re: FCD file for 18FxxK50

Posted: Fri May 02, 2014 9:59 am
by Benj
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 20389 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.

Re: FCD file for 18FxxK50

Posted: Fri May 02, 2014 10:28 am
by LeighM
INTOSCIO is option 8 "Internal Oscillator Block"

Leigh

Re: FCD file for 18FxxK50

Posted: Fri May 02, 2014 4:37 pm
by RobH
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.

Re: FCD file for 18FxxK50

Posted: Tue May 06, 2014 4:26 pm
by LeighM
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

Re: FCD file for 18FxxK50

Posted: Wed May 07, 2014 1:50 am
by RobH
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 289 times
Now on to USB and LCD!

Re: FCD file for 18FxxK50

Posted: Wed May 07, 2014 6:31 pm
by RobH
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?

Re: FCD file for 18FxxK50

Posted: Wed May 07, 2014 10:19 pm
by kersing
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)

Re: FCD file for 18FxxK50

Posted: Thu May 08, 2014 9:43 am
by Benj
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.

Re: FCD file for 18FxxK50

Posted: Sat May 10, 2014 11:51 pm
by RobH
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.