Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

C Compiler

Status
Not open for further replies.

gregmcc

Member
I've been fiddeling around a while with the 16F628 and have just started with the 16F88 which supports ICD with my inchworm/mplab.

I've been thinking about doing some programs in C and would still like use it with my inchworm/mplab - for that reason I looked at Mplab's C30 compiler. However according to the readme it only supports the PIC24 instruction set. Does this mean it won't work with the 16F pics. Is there another compiler I can look at which will work with mplab and the icd?

Any advice would be appreciated.
 
I personally use BoostC with MPLAB and the ICD2, just to confirm that it does what you want. There are other C compilers that do this also, but I believe BoostC has the best free version (2k code limit and no other limitations), and the cheapest paid versions.
 
FWIW
Microchip offers a good (student version) of their compiler for the 18F series chips. If you are not going into production it may be better to pay a little more for the chps and use this compiler.

Microchip’s PIC18 MCUs are ideal for applications requiring 10-16 MIPS performance, with up to 128KB program memory, ranging from 18-100 pins. PIC18 Microcontrollers feature:
• C compiler efficiency
• High performance architecture (16-bit program word)
• Cost-effective offerings for both small and large memory sizes
• Flexibility of self programming Flash
• Industry leading peripheral set including advanced communication peripherals and protocols (CAN, USB, ZigBee™, TCP/IP)
• Socket, software and peripheral compatibility, providing scalability for complex embedded designs

You can get the 40Mhz PIC18F1220-I/P for $2.44US from Newark.
 
thanks for the feedback - i'll check out boostc

I've got used to the 16F - I don't want to switch just yet :)
 
Last edited:
I'll definitely agree there. The architecture of the 18F's is just so much nicer, no more cringing at the thought of how incredibly inefficient your code is going to be once compiled from C into assembly. I should have been a little clearer, I said "I personally use BoostC" and what I should have said is "I personally use BoostC when I actually use 12F's or 16F's" and since I started playing with 18F's I haven't felt much desire to use 16F's. Once I get a better collection of 18F's on hand, I may stop using 16F's entirely ;) Though since there's no 8-pin 18F's, I'll still need to switch back every once in a while for the smaller projects with 12F's.

I know what you mean about comfort with the 16F's. The 18F's are much nicer, but they're also a bit more complicated to work with (though certainly not bad). The only reason I didn't switch to 18F's much sooner is the same familiarity and comfort with the 16F's, though now I wish I had switched sooner. I'd say do yourself a favor and at least look into it... maybe get a few 18F's to play with and/or just look at some example code.

I must say, after writing a few programs on 16F's where I was doing a lot of 16-bit integer math and watching the routines which displayed these values on an LCD take many thousands of instruction cycles, the hardware multiplier of the 18F's started to look very appealing ;)
 
Last edited:
I wouldn't characterize the 18F' devices as "a bit more complicated to work with". If anything they're really much easier to work with as you eliminate that silly bank switching into the SFR's and the instruction set is really much more efficient and intuitive. The single word branch instructions (BZ, BNZ, etc.) are so much better than the equivalent 2 word 16F instruction combinations like BTFSS STATUS,Z and GOTO Label ("BNZ").

My 2 cents. Mike
 
Mike said:
I wouldn't characterize the 18F' devices as "a bit more complicated to work with". If anything they're really much easier to work with as you eliminate that silly bank switching into the SFR's and the instruction set is really much more efficient and intuitive. The single word branch instructions (BZ, BNZ, etc.) are so much better than the equivalent 2 word 16F instruction combinations like BTFSS STATUS,Z and GOTO Label ("BNZ").

My 2 cents. Mike

That may be true, but in this thread (as evidenced by the title) I'm speaking purely about using them with C compilers, where you never have to deal with bank switching or the other things you mentioned.

By saying they're a bit more complicated I'm basically referring to things like the high and low priority interrupts vs. just a single one, more configuration bits, more hardware modules to configure, etc. Just the price you pay for increased flexibility and capability.
 
One thing i want to ask that,
I personally use BoostC with MPLAB and the ICD2
This option is also available in free version of BoostC????? I mean i know BoostC can integrate with MPLAB, and want to ask it also support ICD2???

we can use MPLAB SIM with BoostC to debug or code???

Currently i am using PIC16F877A and which is it's equlant in PIC18F series(Cheap)???

Microchip student version has no program memory limitations???
 
Ayne said:
One thing i want to ask that,

This option is also available in free version of BoostC????? I mean i know BoostC can integrate with MPLAB, and want to ask it also support ICD2???
Actually, now that you mention it, I don't think the free version works with the ICD2 - it doesn't expressly disallow it, but the limitation on data memory or something else like that prevents it from working if I recall correctly, because the ICD2 needs a certain amount of resources to operate.

we can use MPLAB SIM with BoostC to debug or code???
yes, it simulates/debugs at the C source level.

Currently i am using PIC16F877A and which is it's equlant in PIC18F series(Cheap)???
Why don't you just go to the microchip site and look at their product selection tables for the 18F series? you can look at them all by factors like pin count, features, and price, and answer your own question in minutes.

Microchip student version has no program memory limitations???
Right. The student version limits the extended instruction set after the 60-day trial expires, which means your code is a bit less optimized, but for most projects this isn't a problem at all. Other than that it's unlimited.
 
<off subject>

Evan,

Just checked out your PCB/PnP article and it's great. Thank you. You've got me excited enough to consider trying this method. May I impose to ask a couple questions please?

(1) Where do you get the carbide drill bits and what sizes do you typically use for through hole components?
(2) Have you found a way to tin or plate the board after etching? I've found that solder flows much better on tinned pads compared to plain copper pads.

Take care. Regards, Mike
 
I'm busying downloading boostc and the free version of ccs. Gonna be another good night of fiddling. Now..where's that blink code :)
 
Why don't you just go to the microchip site and look at their product selection tables for the 18F series? you can look at them all by factors like pin count, features, and price, and answer your own question in minutes.
Yes, but i am asking because, there are many chocies but i want to know which is well known in PIC18F series..
There are many others with 40 pin counts but PIC16F877 is well know in hobiest...
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top