Main Site Documentation

PIC prog


Thinking about playing a bit with PICs. I am looking at maybe these two:

The easypic6 is $70 more, but looks like has a lot more in terms of dev features. Then using/learning mikroC PRO. Any thoughts?


At my work I use PIC’s a lot. We have the MPLAB ICD 1 (obsolete) and MPLAB ICD 3. This ICD 3 can program and debug almost every 16F & 18F. But as far as I know, full C compilers are not free for PIC.

That’s the reason why, at home, I use atmel. I have the AVR Dragon to debug and program atmels. The free AVR Studio 4 uses GCC to compile your C programs. So you have a full, and great C compiler for free :slight_smile:

In short, if you need a cheap setup with full C compiler, I would go for atmel :slight_smile:

For example: The AVR dragon costs 46 EUR at


I have only minor experience with atmel, with something-ICE debugger and some JTAG debugger, and i didn’t enjoy it. :). Maybe just because I’m used to PIC. :slight_smile:

I prefer PIC for which I use ICD2, PICkit2 and PICkit3. My current fav is PICkit3.

There are some C languages on the microchip site that are free, with some optimisation disabled. I have not found this to be a problem.


I use Pic’s for all my products (at the moment, I’m switching to USBizi )
I use the simple pickit2… you can ICD with most recent Pic processors.

I also use Labcenter’s Proteus. You can build virtual systems without soldering a single wire…

As Errol states:: Student versions of C18 and C24 are free!! If you’re a good programmer (As I know you are ) optimisation won’t be an issue.

Cheers Ian


If you look at unoptimised assembly code, you surely can double the speed if you optimise it.

For a PIC, a basic optimalisation is removing the bank-selection overhead where bank-switching is not needed each time you access a variable in the same bank (which happens a lot).

Also, you might want to use a PIC that supports multiplications (PIC16F’s can’t multiply in hardware) and more then one FSR if you write code in C.


We get it Wouter !! you like AVR’s they are a very good processor but William wants to try Pic’s… William’s code knowledge is more than good enough for “playing” with a pic…

I have the full C18 suite (cost a bit) and the difference between an optimised compile and a non optimised compile with efficient code is minimal.

Cheers Ian


I think Wouter is talking about PIC. I found it interesting.


Sorry everyone…Very bad day!!

There are pro’s and con’s on all systems. I also have used Avr’s and the support is excellent…

Wouter, I’m sorry if I sounded abrupt. I agree that the banked memory on the pic architecture is not the best, but the C compiler masks most of that.

Cheers Ian


Personally I try to stick to the PIC18 range. They are designed for C and they can always be debugged in-circuit(right?).

The PIC16 are lower powered(?) and cheaper(?) and can sometimes be debugged in circuit, but sometimes require a speacial chip/header to debug. When I need to use one of these(physical size requirement) then I use the simulator as first line of debugging and “program and see what happens” as second line.

Regarding optimization. I do sometimes write code in ASM to optimise it for speed. Mainly for tight loops like bit-banging SPI and such. The rest of the time I find that the optimization provided by the free compiler is just fine(there are a lot of optimisation, only some of it gets removed. Which only becomes an issue when you program to the limit of flash space and every byte counts…)

At this point I enjoy building little I2C modules with PICs that I connect to my bot’s I2C bus to add functionality like Sonar. It’s a nice thrill(for me anyway) for plug a new module into the bus and ping it’s adress from my Panda and get a response… :slight_smile:


If you already use PIC/AVR then you are fine…
…iof starting to to use somethign new then you should use cortex-m0 micros. You get 32-bit 50Mhz and 4x the memory for he same price as a 8bit micro!
Here is an example

In my personal world, 8bit micros should be illegal top use past year 2010…unless you are making a hand watch and you are counting every single micro amp!!

goodbye 8bit micros…you have serves us well in the past 50 years but it is time to die! :slight_smile:


Trust you Gus!! I knew you’d chuck a spanner in, Ha Ha.

Its very difficult to get through hole for development, so Pic and Avr rule… However a “Panda…” why not! virtually every pin accessible and dammed easy to program. All the library’s you can eat… Like I said before “It can’t really fail”

Cheers Ian


Gus, although all you say is true, i’m still going to feel like a real bad programmer if I have to use a 50MHz 32bit CPU to just count pulses from my motor encoders… :). I think that 8bit still has it’s place… :slight_smile:

I would like to look more into the LCPxxxx chips for number crunching projects like Synthetic Aperture Sonar, but then it’s a whole new lot of debuging tools and learning the finer points of a new development environment etc… :frowning:


I do not feel bad that most users have 3Ghz PCs with 4GB or RAM and all they do is check whiter facebook page :slight_smile:

Or some have 20 megapixel camera that they use to take simple pictures.

I see what you are saying but if both are the same price then why bother? Plus you will have the power and the tools and the KNOWLEDGE to run those powerful little things so once you are done with encoder and you are ready to do more then you do not have to change your micro nor your tools.

…this is my own opinion of course.


I agree with Gus. And, learn to solder surface mount by hand - you can do it. It really is not that hard. You just need a small iron and a microscope or really high power magnifier. If you can see it you can solder it. Doing a 100 pin SMT part by hand is completely reasonable. And your boards look a lot better and the PCB is a lot smaller and costs a lot less.

Maybe you need PTH for prototyping, but you can use a breakout on a SMT controller to get the pins.

…this is my opinion of course. :slight_smile:


I have been looking forward to see a 32bit ARM processor on a 28pin DIP package for years…still waiting but I have a feeling it is going to be very soon.

Have you guys seen this?
Now that is a piece of art …a 32bit at 50Mhz and can fit in a toothpick!


OK, that I can’t solder by hand!


Solder it!! I wouldn’t be able to see it…

Cheers Ian


i’d use dspic’s personally, 20 or 40mips, 16 bit, cheap, small - and can use MikroE’s compiler and programmers. I’ll sell you my dspic dev board if you want one heh. I have a MikroE dsPIC Pro4 gathering dust here.


@ Gus: You can mount that on a breakout board that is DIP16 size… :slight_smile:

First my heart sank when i saw that it is BGA because routing is always a pain for the inner balls. Then I saw that it is only two rows deep so single sided will be possible because vias under the chip isn’t required as the inner balls can just be routed between the other balls.

But the killer is that the balls are 0.5mm apart. I can’t create 0.1mm traces with 0.1mm spaces to run tracks in between the balls at home, and most PCB manufactures in my country can’t do it, or charge you more… :frowning:

@ MarkH: I have played with dspic. But got REALLY annoyed when a serial port changed behaviour when I changed from debug to release. The polarity switched, the stop bits changed and the timing changed. And I couldn’t debug it because it worked when I debugged… :slight_smile:

@ Gus: I must say that is really lowers the entry barrier:
$30 for a debugger and demo board? Cool… :slight_smile:


“$30 for a debugger and demo board? Cool…”

That is cool. Clean and neat. I like the direction. Would have been even better to integrate it with VS Express instead of eclipse.