Programming C or swordfish with the Inchworm?

Status
Not open for further replies.

Andy1845c

Active Member
I feel bad asking this because i'm almost sure it has been asked before, bu I can't find anything.

I have Bills inchworm ICD2 programmer. I have only used MPLAB with it and wrote programs in ASM. I'd like to try some other language because assembly just isn't coming very easy. I haven't really done anything with electronics or PICs all summer, but this winter I would kinda like to finally get a grasp on programming and am thinking about trying C or Swordfish basic like Gramo uses on his site.
Will the inchworm work as far as the hardware end of things goes? I know i can't use MPLAB for a compiler, but was hoping I could use the inchworm and a free/limited version of some other compilers just to see what language I decide works best for me.
 
I don't know if you can use ICD2 with swordfish, I use a pickit2 without any problems. You could use BoostC or C18 (both free) within MPLAB with your ICD2. Depending on your target hardware there may be examples here.

Mike.
 
and am thinking about trying C or Swordfish basic like Gramo uses on his site.
Swordfish is nice if you like BASIC, but if you're looking for a C compiler I recommend SourceBoost BoostC. The demo is only code size/RAM limited - works for all supported PICs. And when you hit the limits of the demo, a full license for the compiler is only about $75! Compare with C18's price of ~$500 and PICC's price of ~$1000. It's a no brainer! Better yet, BoostC comes with both 16F (supports some 12F also) and 18F compilers.

Will the inchworm work as far as the hardware end of things goes?
Yes it will. I have an Inchworm+ (with the Unicorn USB add-on) and it's a fine programmer/debugger. I do prefer my PICkit 2's, but I still sometimes use the "ICD2". The Inchworm+ doesn't care at all what program produced the hex file. It just programs it to the PIC for you.

I know i can't use MPLAB for a compiler, but was hoping I could use the inchworm and a free/limited version of some other compilers just to see what language I decide works best for me.
Just in case you don't know (sounds like you don't), MPLAB is NOT an assembler or a compiler or a language. It is an IDE (Integrated Development Environment). That means you can use it as an editor/programmer/debugger for almost any PIC language.
 
Last edited:
Thanks for the replys.

Futz,
No, I guess I don't really understand MPLAB at all then. So I could write a program in C using MPLAB and it would work? That seems way too easy.

https://en.wikipedia.org/wiki/MPLAB
Hmm, says there that it supports Assembly and C........

Is it really that easy to try C?
 
Last edited:
Here are the language toolsuite selections in my MPLAB after setting up the free/student version of C18, the free/lite version of SourceBoost, and the free/lite version of Swordfish... You select one of these toolsuites when you create a new project with the project wizard...

Good luck. Mike
 

Attachments

  • Toolsuite.PNG
    19 KB · Views: 154
Last edited:
No, I guess I don't really understand MPLAB at all then. So I could write a program in C using MPLAB and it would work? That seems way too easy.
It's not terribly difficult. An IDE gives you a common set of tools to use with all your languages. You only have to learn one editor that way. There's easy access to your programmer and debugger and a BUNCH of other tools, all in one program (the IDE).

Most PIC language suites integrate into MPLAB automatically (or with a click or two) when you install them. Then when you create a new project you just select the language toolsuite you want that project to use and you're programming baby!!

https://en.wikipedia.org/wiki/MPLAB
Hmm, says there that it supports Assembly and C........
And BASIC and others. The assembler is Microchip's MPASM. It's bundled with MPLAB. If you disliked it for some reason you could probably install another one and use that instead (Are there any other assemblers for PIC? Not sure...).

"Supports" does not mean that these other languages are already part of MPLAB. They are not. Only MPASM comes with MPLAB when you download it. To add another language you download and install it. With some, during the install it will ask if you want to integrate with MPLAB. With others you have to follow instructions and move a couple files from one directory to another. Depends on the language toolsuite.

Is it really that easy to try C?
Takes about (being generous) half an hour to download a compiler and install it. Maybe a bit longer if yer confused and mess it up a couple times. Then if you've never used a C compiler or programmed in C before, a couple or three evenings of massive confusion before you get much of anything to happen. If things go well or if you've programmed in C (on a PC?) before you might have something happening the same evening. C isn't difficult but there are a lot of things to learn all at once before you start to see the big picture.
 
Last edited:
Thanks guys,

Now things are becoming a bit clearer.

I've never used C for anything and don't know really anything about it. But I hardly know any more about assembly at this point, so I just want to give it a try and see if I can make better sense of things.

I'll give it a try and see what I can figure out.

Thanks again!
 
If doing C take a look at the tutorials on my site. (see homepage in sig) They go over all bits and what they do. Do lessons 1 to 4. There is a bit of overlap between 1 and 2&3.

It assumes junebug tutor but you can easily breadboard the 1 LED required in lessons 1-3. Lesson 4 is about switches and the code is there but not the lesson to go with it. It requires LED1 - LED3 & the 3 switches.
 
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…