Details on PIC

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hello All,
                 I am new to this group. I want to learn about PIC and the C
Compilers for PIC.

                 I want to buy PIC chip also to do some real time
programming. Can any body give the details of PIC chips, how to but where to
buy and about the PIC materials .

Thanks in advance,

Sathish Athreya

Re: Details on PIC
Starter kit - /
Datasheet -
Google for C compilers, free one is gcc.

Re: Details on PIC
Quoted text here. Click to load it


Re: Details on PIC
Quoted text here. Click to load it

Give some thought to what you're trying to accomplish.
Check out the availability and prices of tools that you'll need for
hardware and software development.  Compilers for different families
may have significantly different pricing structures.
I use pics just because that's where I started.  I'm not sure I'd go
that way today.  Today, there may be
better/cheaper alternatives for what you want to do.

Return address is VALID.
Wanted, Slot 1 Motherboard
We've slightly trimmed the long signature. Click to see the full one.
Re: Details on PIC

Quoted text here. Click to load it
the C
where to is the manufacturer, so that's where the datasheets
are.  Also take a look at:  The book comes with a blank circuit board and digikey
sells a kit of parts to populate the board for US $56.97.  The only snag
is that you need access to programmer to initially install the
bootloader onto the blank 18F452.  Since you are just starting out with
PICs, I suggest you start with this chip.  Otherwise, I would recommend
you read the datasheets for the 16F628 or 16F88 (preferred).  Those
chips are the evolution of the now obsolete 16F84.

The PIC is not a real friendly architecture for C compilers, but some
decent compilers do exist.  Unfortunately they are not free.  I'm not
sure how well gcc currently supports the PICs.  I think it has better
support for the AVRs, which are more C friendly.

Re: Details on PIC
Quoted text here. Click to load it

AFAIK gcc has not been ported directly to the PICs at all. A derivative of gcc,
sdcc ( ), has been in the works for quite some time now,
but the
PIC port is incomplete.  I'm not sure how functional PIC sdcc is, but it may be
worthwhile for learning purposes.  Unfortunately, I believe work has stopped on
the PIC
port, so where it stands right now is where it will stay, unless another brave
comes along to take up where Scott Dattalo ( ) left off.

The only other free PIC C compiler I know of is BoostC ( ),
which is
currently in Alpha testing.  The alpha version, as well as the SourceBoost IDE,
available for free, but it's not completely finished either, although it does
seem to be
farther along than the PIC port of sdcc.

Alex Parkinson

Re: Details on PIC
Quoted text here. Click to load it

IIRC, there used to be some elemental support in it.  Perhaps that's
been abandoned.  At least I thought it was gcc.  The gputils stuff is
pretty nice.  The gpsim simulator is real fast.

Quoted text here. Click to load it

I tinkered around with sdcc 2 or 3 years ago on the 8052 types.  It was
quite painful.  They were really working on it, but it just had too many
"issues" for my tastes.  I've seen people talking about using sdcc on
PICs, but I don't have any personal experience with that.

Quoted text here. Click to load it

Hmm.....I think I'll pass then.  ;-)

Quoted text here. Click to load it

I think I'll look into that.  I've only used assembler on the PIC,
mostly because the seeming lack of availability of a decent free
compiler.  C on the 8052 was fun using the Keil compiler, but that's to
be expected for the cost.

The biggest problems IMO with C on the 16F type PICs is the 8 level
stack and single accumulator bottleneck.  I think the 18F's might solve
these issues.

I recommend the OP first learn to program in assembler.

Re: Details on PIC

Quoted text here. Click to load it
and the C
Quoted text here. Click to load it
where to


As others have suggested, is a good place to start.
You might want to try one of their demo boards, especially if they have
one that looks a bit like you intended application.

I'd look at the PIC18 series of parts from Microchip, unless there is a
specific feature you need that is only available in a PIC16 part. The
PIC18 parts are often cheaper than PIC16 parts, and generally have more
memory, more I/O functions, and can run faster.

Look at using a flash based part that has In Circuit Debugger (ICD)
capability. The ICD makes for a nice cheap debug environment. Be aware
that there are 2 versions of the ICD available. ICD1 is available from
several sources, but only works with a few PIC16 parts. ICD2 supports
more parts and is the only ICD that Microchip continues to support.
ICD2 seems to be only available from Microchip.

There are a few free C compilers for the PIC, but I have no personal
knowledge of them. What I've read suggests they are not quite ready for
prime time. They may be worth looking at if you are on a very tight

I have used the Hitech C compiler for the PIC16 series. It was pretty
efficient, but a bit of a pain to set up. It has been a few years since
I used it, so it may have improved since then. There is a free demo
version that will compile up to a 4K program and can be used for
commercial projects.

CCS ( makes a pretty good C compiler. They have
versions for all PIC families (12 bit, 14 bit, 16 bit). They also have
a nice source level debugger based on the ICD1 that works with most
PIC16 and PIC18 parts. You can write code, and debug it on your target
without ever having to learn how to use Microchip's MPLAB.

The PIC18 C compiler is available from Microchip. I've done a few
benchmark tests comparing it against CCS C. Microchip's compiler is
more efficient, but used to lack the built-in functions provided by
CCS. I hear that has improved. You can download a free 30 day demo.
You'll also want to look at MPLAB, Microchip's free editor, assembler,
etc. tool.

Be advised that even if you are a C wizzard, you'll still probably want
to learn some PIC assembler.

Happy hacking,


Re: Details on PIC
thank u all for all your valuable suggestions.

Re: Details on PIC

Quoted text here. Click to load it

PIC & C do not go together well.  But I will bet you chose C because
that was the language you had at school.  And PICs are presently
popular, but that will change and some other processor will take
its place in a few years.  Z-80 and CPM, anyone?

The processor and language you start out with becomes your 'native
tongue, so choose carefully: you will forever acquire an accent
and PIC is a _very_ low class accent.  You can always go slumming
with a PIC when the need arises.  Climbing out of the slum is not
so easy.

I would suggest a popular up and coming processor that has been designed to
accommodate embedded C: it should look quite a bit like a PDP-11.
Real stack, a goodly number of registers, lots of register<->register
instructions and lots of indirect addressing modes.  

If you are set on PIC you may want to experiment with a 'Basic Stamp'
development kit.

Nicholas O. Lindan, Cleveland, Ohio
Consulting Engineer:  Electronics; Informatics; Photonics.
We've slightly trimmed the long signature. Click to see the full one.
Re: Details on PIC

Quoted text here. Click to load it

This has more to do with expectations of a feature-rich processor than
it does from any instrinsic unsuitability of PICs for C.  If you
understand the limitations of the PIC, then C can be very useful, as
compared to, say, pure assembly language.

Quoted text here. Click to load it

  ...pure speculation.   Any other chip in use today has just as much
of a chance of disappearing.

Quoted text here. Click to load it

Nonsense.  Feature-rich chips are easy by comparison.  Climbing into
the "slum" after being spoiled on feature-rich processors is what is
hard to do.

Quoted text here. Click to load it

There is a place for all kinds of chips, if you match the chip to the
application.  The jobs for which I have used PICs don't need a
feature-rich processor with lots of stack.  Instead I rely on the
simple timing, low power, and small size.  Without considering the
detailed requirements of the application, it is impossible to say that
one chip is uniformly better than another.

-Robert Scott
 Ypsilanti, Michigan
(Reply through this forum, not by direct e-mail to me, as automatic reply
address is fake.)

Re: Details on PIC
Here here!

I agree completely with your statements.

I have been using PICs with the CCS C compiler for years very successfully.
One thing that has not been brought up in comparing C compilers is the cost.
While I have no doubt the Hi-Tech and Microchip versions of the C compilers
are more complete and even faster in some respects, the cost of the CCS
compiler is very difficult to beat, aside for some of the freeware versions.
The CCS compiler also comes with a very good, well organized manual.

I don't believe C or PICs are going away any time soon.  With Microchip's
latest entries of the PIC30Fxxx family, even DSPs are within reach...  These
DSPs certainly do not compare with the high-speed units by TI or other
vendors but it's a good start.  Microchip has shown a very good history of
responding to what is needed in the marketplace, also.


Quoted text here. Click to load it

Site Timeline