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

Post by gregobac »

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

Post 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

User avatar
RobH
Posts: 95
Joined: Wed Sep 11, 2013 7:51 pm
Contact:

Re: FCD file for 18FxxK50

Post 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

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Contact:

Re: FCD file for 18FxxK50

Post 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
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
Contact:

Re: FCD file for 18FxxK50

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

kersing
Valued Contributor
Valued Contributor
Posts: 1939
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Contact:

Re: FCD file for 18FxxK50

Post 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.
“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
Contact:

Re: FCD file for 18FxxK50

Post 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

kersing
Valued Contributor
Valued Contributor
Posts: 1939
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Contact:

Re: FCD file for 18FxxK50

Post 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.
“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
Contact:

Re: FCD file for 18FxxK50

Post by RobH »

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

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

GTF
Posts: 170
Joined: Sat Dec 10, 2011 7:21 pm
Location: Canada
Contact:

Re: FCD file for 18FxxK50

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

User avatar
Benj
Matrix Staff
Posts: 14865
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Contact:

Re: FCD file for 18FxxK50

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

Kenrix2
Flowcode v5 User
Posts: 211
Joined: Tue Feb 19, 2013 9:51 pm
Contact:

Re: FCD file for 18FxxK50

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

User avatar
RobH
Posts: 95
Joined: Wed Sep 11, 2013 7:51 pm
Contact:

Re: FCD file for 18FxxK50

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

kersing
Valued Contributor
Valued Contributor
Posts: 1939
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Contact:

Re: FCD file for 18FxxK50

Post 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...
“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
Contact:

Re: FCD file for 18FxxK50

Post by RobH »

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

User avatar
RobH
Posts: 95
Joined: Wed Sep 11, 2013 7:51 pm
Contact:

Re: FCD file for 18FxxK50

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

User avatar
Benj
Matrix Staff
Posts: 14865
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Contact:

Re: FCD file for 18FxxK50

Post 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 13280 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: 2052
Joined: Tue Jan 17, 2012 10:07 am
Contact:

Re: FCD file for 18FxxK50

Post by LeighM »

INTOSCIO is option 8 "Internal Oscillator Block"

Leigh

User avatar
RobH
Posts: 95
Joined: Wed Sep 11, 2013 7:51 pm
Contact:

Re: FCD file for 18FxxK50

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

User avatar
LeighM
Matrix Staff
Posts: 2052
Joined: Tue Jan 17, 2012 10:07 am
Contact:

Re: FCD file for 18FxxK50

Post 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
Attachments
PIC18F25K50 LED TEST.hex
(728 Bytes) Downloaded 116 times
PIC18F25K50 LED TEST.fcfx
(3.4 KiB) Downloaded 106 times
18F25K50.fcdx
(30.94 KiB) Downloaded 131 times

User avatar
RobH
Posts: 95
Joined: Wed Sep 11, 2013 7:51 pm
Contact:

Re: FCD file for 18FxxK50

Post 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 165 times
Now on to USB and LCD!

User avatar
RobH
Posts: 95
Joined: Wed Sep 11, 2013 7:51 pm
Contact:

Re: FCD file for 18FxxK50

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

kersing
Valued Contributor
Valued Contributor
Posts: 1939
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Contact:

Re: FCD file for 18FxxK50

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

― C.S. Lewis

User avatar
Benj
Matrix Staff
Posts: 14865
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Contact:

Re: FCD file for 18FxxK50

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

User avatar
RobH
Posts: 95
Joined: Wed Sep 11, 2013 7:51 pm
Contact:

Re: FCD file for 18FxxK50

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

Post Reply