Maker Pro
Maker Pro

Learning PIC - where to start?

N

Nobody

Jan 1, 1970
0
I'm thinking about learning PIC programming, and would appreciate
any advice. E.g.

1. Which programmer? Preferably something that can program most DIP flash
PICs, primarily 10-18 series.

2. Which prototyping method(s)? Is plugblock feasible? Veroboard?

3. Are the PICDEM kits worth it?

4. How useful/important is an ICD?

5. Any recommended web sites and/or books?
 
H

Hammy

Jan 1, 1970
0
I'm thinking about learning PIC programming, and would appreciate
any advice. E.g.

1. Which programmer? Preferably something that can program most DIP flash
PICs, primarily 10-18 series.

2. Which prototyping method(s)? Is plugblock feasible? Veroboard?

3. Are the PICDEM kits worth it?

4. How useful/important is an ICD?

5. Any recommended web sites and/or books?
You should just get a PICkit 2 starter board from wherever you buy
your other components it's only around $40.00.

http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en023805

This will come with MPLAB and a C compiler,as well as other
documentation. They are coming out with a a PICkit 3 soon from what I
heard.

A good place for some starter tutorials is here.

http://www.gooligum.com.au/tut_baseline.html

Get some header pins so you can program other PIC's using a
breadboard,read the data sheet for the PICkit 2 for the correct size.
 
I

ian field

Jan 1, 1970
0
Hammy said:
You should just get a PICkit 2 starter board from wherever you buy
your other components it's only around $40.00.

http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en023805

EPEmag did a reader offer of a pickit2 for about £10 I think, but it expired
end of last month (they do plenty of PIC projects) its not the first time
they've done a pickit2 reader offer and probably not the last.

Its best to avoid any programmer that uses RS232 or LPT ports as newer PCs
don't have them.
 
C

Charles

Jan 1, 1970
0
Nobody said:
I'm thinking about learning PIC programming, and would appreciate
any advice. E.g.

1. Which programmer? Preferably something that can program most DIP flash
PICs, primarily 10-18 series.

2. Which prototyping method(s)? Is plugblock feasible? Veroboard?

3. Are the PICDEM kits worth it?

4. How useful/important is an ICD?

5. Any recommended web sites and/or books?

http://www.mikroe.com/en/tools/easypic5/
 
J

JeffM

Jan 1, 1970
0
Nobody said:
I'm thinking about learning PIC programming,
and would appreciateany advice[...]
Jan said:
I would start with something simple like a 16F84 (something I started with,
those were in the pay TV smartcards for example).
How much *more* will he pay to get that (obsolete?) number
rather than a modern stocking number?

Isn't there a modern variant that is ~1:1 compatible
with the large 16F84 codebase out there?
5. Any recommended web sites and/or books?

Read the datasheet.
I assume you know about hardware and logic.
A microprocessor just executes instructions it finds, and changes registers
or bits, nothing special or mystical.
Books do not tell you anything about the special functions
in a specific type of controller,
books kill trees, books are heavy, books are a fire hazard,
books, to be clear, suck, are from the dark or middle ages[...]

http://www.google.com/search?q=Fahrenheit-451 :cool:
 
P

petrus bitbyter

Jan 1, 1970
0
Nobody said:
I'm thinking about learning PIC programming, and would appreciate
any advice. E.g.

1. Which programmer? Preferably something that can program most DIP flash
PICs, primarily 10-18 series.

2. Which prototyping method(s)? Is plugblock feasible? Veroboard?

3. Are the PICDEM kits worth it?

4. How useful/important is an ICD?

5. Any recommended web sites and/or books?

I consider
http://www.voti.nl/swp/n_index.html
a good intro. A lot of info for starters.

As for programmers you have zillion possibilities. I've used Votis Wisp,
Oshons serial programmer
http://www.oshonsoft.com/picprogserial.html
and the serial programmer described in WINPIC
http://www.qsl.net/dl4yhf/winpicpr.html

I also used professional programmers but do not own one. I did not need them
as one or more of the ones mentioned above always met my needs.

I've used wirewrap, soldering and solderless breadboards. The last method is
not reliable in critical applications.

Never used a PICDEM kit. AFAIK buying a PICKIT 2 for some 50 Euros will cost
some money and save some time.

Ever used an ICD. That one caused more problems then help. Though a good one
may be usefull.

Once you find the PICLIST
http://www.piclist.com/techref/piclist/index.htm
you can navigate to everything you ever want to know about PICs. If not, you
can always ask. I never found a real usefull book about PICs. As for reading
you need to read the datasheet of the PIC at hand carefully, including the
erata.

petrus bitbyter
 
A

att

Jan 1, 1970
0
Nobody said:
I'm thinking about learning PIC programming, and would appreciate
any advice. E.g.

1. Which programmer? Preferably something that can program most DIP flash
PICs, primarily 10-18 series.

2. Which prototyping method(s)? Is plugblock feasible? Veroboard?

3. Are the PICDEM kits worth it?

4. How useful/important is an ICD?

5. Any recommended web sites and/or books?

I'm going to assume you have some programming experience. The best place to
start would be to get a PICKIT 2 kit from Microchip, you'll have a 16F690, a
board for it with some switches and LEDs, a USB programmer, a CD full of
software & documentation.

If you don't have any programming experience at all, I would suggest a copy
of "What's a microcontroller" and a basic stamp development kit for openers.
 
N

Nobody

Jan 1, 1970
0
First question: What do you know about programming, what languages.

At various times, I've used assembler (6502, Z80, 68000, 80x86, ARM), C,
C++, Python, Lisp, Java, Haskell, PostScript, Basic for writing
significant amounts of code. Plus having toyed with a dozen or so others
but never using them for anything significant.
I would start with something simple like a 16F84 (something I started
with, those were in the pay TV smartcards for example).

Am I correct in thinking that the various 10-16 chips are essentially the
same CPU with different amounts of RAM, flash and I/O? And that 18 is
quite similar but with enhancements to support programming in C?
Soldering is the only reliable method. Imagine my switch mode PIC power
supply with an intermittent connection, BANG.
And the high current would melt any flimsy contacts.

I'm not looking at doing power stuff, at least not for now. I'm mostly
concerned with the effect of parasitics on high-frequency signals.
No idea, I use the noppp programmer, 'no part programmer' and have added
software and hardware to it over the years for many different PICs.

Hmm; it's creator appears to have "disowned" it, recommending a PICkit 2.
 
D

David L. Jones

Jan 1, 1970
0
Nobody said:
I'm thinking about learning PIC programming, and would appreciate
any advice. E.g.

1. Which programmer? Preferably something that can program most DIP flash
PICs, primarily 10-18 series.

The PICkit 2 wins hands down. only $35. For DIP parts buy or make DIP ZIF
adapter (ebay has them)
Don't muck around with no-name brand or DIY programmers, it's not worth the
hassle.
http://www.microchipdirect.com/productsearch.aspx?Keywords=pickit+2
2. Which prototyping method(s)? Is plugblock feasible? Veroboard?

Traditional breadboard is easiest.
3. Are the PICDEM kits worth it?

Demo kits in general are pretty handy, but not much different to building
yourself on breadboard.
4. How useful/important is an ICD?

Very important.
It's a real PAIN to plug and unplug DIP parts every time you program it.
MUCH easier if every design you make (even on breadboard) has an ICD
connector.
You can use in-circuit debugging too, it's not just for programming.

Also, forget using assembler, use and learn C. Then your programming skills
will be more useful across any brand microcontroller, and you'll be able to
do more complicated things with greater ease.

Dave.
 
J

Jon Kirwan

Jan 1, 1970
0
I'm thinking about learning PIC programming, and would appreciate
any advice. E.g.

1. Which programmer? Preferably something that can program most DIP flash
PICs, primarily 10-18 series.

I have the PICStart+ and the ProMate II plus some adapters. I don't
have the PICKIT2 yet. I will be buying one, soon, though. (If anyone
knows of a place cheaper than $49.99 US, let me know.) You can also
get a variety of 3rd party boards for this, as well. (I like the fact
that Microchip supports their old tools [like the ProMate II]
literally "forever," though.) My original PicStart didn't support
flash programming of new code into it, but I adapted it with their
newer chip (opened it up and installed it a few years ago) and it now
downloads code from MPLAB just fine, when new chip support is
required.

There are a lot of options for you to consider and none of us can
really tell you what is better for you. If I were doing this new, I'd
probably just look around for schematics -- think a little about their
approaches -- and build it myself using some ZIF sockets I'd buy to go
along with it.

(I just noticed that Newark has a "promo" on the PIC10F200 for less
than 30 cents each in 1's, by the way.)
2. Which prototyping method(s)? Is plugblock feasible? Veroboard?

Whatever works for you, I think. I haven't had problems yet with a
variety of methods. I sometimes use wire-wrap, even; or those $10
white proto boards and end-stripped jumper wires.
3. Are the PICDEM kits worth it?

Don't know, but they look like one of several cheaper options.
4. How useful/important is an ICD?

There are times when that helps. But in the two or three cases where
I really needed something, I needed my ICE2000 system to find the chip
bugs. The trace buffer was a huge help there. (I haven't used ICD in
years, to be honest. I usually can track down my own problem code
fairly easily without it.)
5. Any recommended web sites and/or books?

You have some, already. Microchip also has a forum and if I were you
I'd set up an account and use it.

Jon
 
D

David L. Jones

Jan 1, 1970
0
Nobody said:
At various times, I've used assembler (6502, Z80, 68000, 80x86, ARM), C,
C++, Python, Lisp, Java, Haskell, PostScript, Basic for writing
significant amounts of code. Plus having toyed with a dozen or so others
but never using them for anything significant.

Then stick with C.
Don't struggle learning yet another useless assembler dialect, it won't get
you very far.
Am I correct in thinking that the various 10-16 chips are essentially the
same CPU with different amounts of RAM, flash and I/O?

Basically yes.
And that 18 is quite similar but with enhancements to support programming
in C?

You can happily use C on even the smallest PICs, not just the 18's and
above. The 18's and above handle C a bit better but it's not a big deal.
Code-compactness varies of course, some compilers are MUCH better than
others.
Unles you are targeting some high volume price-senstive application, choose
a PIC with the most memory. If you are hitting memory constraints then you
have chosen the wrong PIC.
I'm not looking at doing power stuff, at least not for now. I'm mostly
concerned with the effect of parasitics on high-frequency signals.

That's not much of a concern with most basic micro apps, as even the fastest
PICs can't process I/O at more than few MHz. Breadboard will be fine,
vero-board for more permanent stuff.
And custom PCB's are pretty cheap once you want a decent looking product.
Hmm; it's creator appears to have "disowned" it, recommending a PICkit 2.

Very very smart idea, you'd be wise to heed that advice.
The PICkit 3 is due out any week now, but probbaly not worth waiting for.
PICkit 2 will be everything you want, including powering your circuit (fully
software variable voltage), in-circuit debugging, has push-button field
programming, and also works as a logic analyser.

Dave.
 
D

David L. Jones

Jan 1, 1970
0
Jon Kirwan said:
I have the PICStart+ and the ProMate II plus some adapters. I don't
have the PICKIT2 yet. I will be buying one, soon, though. (If anyone
knows of a place cheaper than $49.99 US, let me know.)

Plenty of places for $35:
Microchip Direct:
http://www.microchipdirect.com/productsearch.aspx?Keywords=pickit+2

Digikey:
http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=PG164120-ND

Mouser:
http://au.mouser.com/Search/ProductDetail.aspx?qs=sGAEpiMZZMtdAabcSkQOl4ERF8GmpIKm

The PICkit 3 is just out:
http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=DV164131-ND
and
http://www.microchipdirect.com/productsearch.aspx?Keywords=pickit+3
But the PICkit2 is well proven, the 3 isn't yet.

Dave.
 
J

Jon Kirwan

Jan 1, 1970
0

Actually, I was thinking about the kit that includes the extra board
(DV164120 and DV164121.) Also, I may need AC162061 and AC164110.

Jon
 
J

Jon Kirwan

Jan 1, 1970
0

Charles, do you know much about this board? I just looked it over and
it is feature-rich. But one of the things that seems to really be a
problem is the mikroICD. It appears that it may only work with their
own software tools (not good, in my case) and I can't even tell if I
can use assembly coding only with it. They specify the compilers, but
not the assembler. Also, if I were to use it to program target boards
I make where I write my code using Microchip's C compiler, would that
be possible? I haven't yet seen a definitive answer, but what I have
seen concerns me a lot about that.

Thanks,
Jon
 
R

Robert Monsen

Jan 1, 1970
0
How does a PIC conform to the +/- 15V RS-232 specs with only a single
+5V supply?

A MAX232 works well, and a PIC can bit-bang the RS232 async protocol
reliably. I suspect that is what he meant. Some of the larger PICs
have built-in UARTs, which makes it even easier.

Regards,
Bob Monsen
 
F

freddie

Jan 1, 1970
0
A MAX232 works well, and a PIC can bit-bang the RS232 async protocol
reliably. I suspect that is what he meant. Some of the larger PICs
have built-in UARTs, which makes it even easier.

Regards,
 Bob Monsen

Hi
I sure I will get howled down, but have you looked at Picaxe. I use
them and there is a lot of information about them. I started with a
08M kit and have 4 articles designed for school children which got me
started 2 years ago.
Tony
 
H

Hammy

Jan 1, 1970
0
The Debug Express costs the same as the PICkit 2 starter.

Yes I know. The thing is it's SMD with the starter board he can insert
other PIC's in the socket.

The majority of tutorials on the net also have to do with the starter
board. That's why I suggested it.
 
M

Michael

Jan 1, 1970
0
Jan Panteltje wrote:
(snip)
I would start with something simple like a 16F84 (something I started with,
(snip)

I whole-heartedly agree with that philosophy but not with the uC.
While the 16F84 is nice, the 16F628 and F628A obsoleted it, so the F84 and F84A became quite
expensive.

There are lots of PIC16Fxxx. Take your pick (pun intended). I like the F628A for small footprint
and several I/O's, the F887 for more I/O.

I do use MPLAB for assembly and simulation. I, too, use the NOPPP (No Parts PIC Programmer). (For
burning 16F877 w/ NOPPP I wrote my own code in BASIC PDS.)

All of the chips I've mentioned are code compatable. IIRC :)
 
I

ian field

Jan 1, 1970
0
Jan Panteltje said:
I'd say: get an USB to RS232 adapter, as many PICs have RS232 and you will
want
to use it.

The Velleman PIC programmer I bought years ago states clearly in the
instructions that it won't work with a USB to 232 converter.
 
Top