Beginning PICs

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

Translate This Thread From English to

Threaded View
I don't want to start a flame war - but need to ask - which would be a
good solution to begin PIC programming?
This would include not only the chip but the programmer & tools.
I would also like to learn an architecture that's fairly common in the
industry (Z8, 8051, 16XXX) or just let me know which controllers are
best for certain situations.

Kits are good too.

Any info would be great and price is a big consideration also.

Thanks,
Bender

Re: Beginning PICs
BTW, I also have no knowledge of circuits (I know, I know, I'll get
there) so I'm looking for solutions with very limited soldering/building.

Re: Beginning PICs
Why torture yourself with a PIC?
Start with Atmel AVR. Go to www.avrfreaks.net
Get WinAVR package for free. Contains free C compiler
that is a port of GCC. Get the STK500 kit.


Quoted text here. Click to load it



Re: Beginning PICs
Quoted text here. Click to load it

I agree fully with this. Many years ago I used Z80/8085, liked them.
More lately I used HC11, loved it. Then I needed something cheap and
small, found PIC and have regretted it since. When I have used up the
chips I have bought I will look at something different.


Re: Beginning PICs

Quoted text here. Click to load it

  I looked back at a 16F628 project I wrote in assembler
in 2002 - a keyboard morse generator that decodes the
data and clock lines of a standard keyboard. What an
untidy mess of a chip - banked RAM, no way to pop the
return address off the stack just for starters.
  I'm not far from testing a rewrite of it for the
68HC908, which is a joy to programme.  I don't care
how efficient PICs can be - they're so ugly.

--
Ian Stirling, G4ICV, AB2GR, Long Valley, New Jersey, USA.
Email address is not valid: contact details are on that
We've slightly trimmed the long signature. Click to see the full one.
Re: Beginning PICs

Quoted text here. Click to load it

Other PIC 16 series torture methods:
o No way to read constant from FLASH other than a return literal (retlw).
Awkward at best.
o Bank switching of RAM to get to variables. Difficult to keep track of and
wasteful of FLASH and time.
o Multiply and Divide are not available in the most popular 16 series.
o Bank switch of FLASH not as bad as RAM bank switching, but a pain none the
less.
o Only one interrupt vector
o Only 35 instructions are to rudimentary. Use of Microchip supplied macros
highly recommended.

That said, their tech support is very good.



Re: Beginning PICs

c0ORe.3696$ snipped-for-privacy@newssvr33.news.prodigy.com...
Quoted text here. Click to load it

This is relevant : it can be learned quickly ;-)
Too many instructions isn't good to.
--
-Stan



Re: Beginning PICs

Quoted text here. Click to load it


You don't _have_ to use all of the available instructions in an
architecture. If you feel you must, you can probably get by
using only 35 instructions on most processors -- you just end
up with less efficient code. ;)

--
Grant Edwards                   grante             Yow!  They don't hire
                                  at               PERSONAL PINHEADS,
We've slightly trimmed the long signature. Click to see the full one.
Re: Beginning PICs

Quoted text here. Click to load it

What they fail to mention is that there are 35 instruction *types* but by
the time you multiply this by the various addressing modes you still end up
with well over 100. Take your average CISC micro and factor the
instructions by the various addressing modes and you end up with little
more than 35 instruction *types*. So it's just pico micro marketing hype.

Ian

Re: Beginning PICs
Quoted text here. Click to load it








But the addressing mode issue isn't the same for the PIC.

PICs only have one address mode: direct addressing.

So none of the postindexed address with a base offset type stuff is available
on a PIC.

The only instruction variation is that a W and file-register based instruction
can select either W or the file-register as the destination target. So the
ADDWF instruction is directed addressed but can have either W or F as a target.

PICs have a form of indirect addressing. However, it is done by loading an
address register (FSR) and then accessing the target (INDF).

So it is truly a RISC instruction set at 35 instructions.

BAJ

Re: Beginning PICs

Quoted text here. Click to load it

This is one of the reasons I like the PIC when I design small timing
critical projects written in assembly. The PIC is extremely easy to keep
track of cycles, which is essential to my timing critical applications. I
was always taught that I RISC processor was superior to a CISC.



Here is part of a RISC definition I pulled off the web. "Reduced Instruction
Set Computer. One advantage of reduced instruction set computers is that
they can execute their instructions very fast because the instructions are
so simple. Another, perhaps more important advantage, is that RISC chips
require fewer transistors, which makes them cheaper to design and produce."



I think it's important that when one states his or her preference for a
certain microcontroller that they also state the type and size of project
they are working on. I love the PIC for the size and type of projects I have
worked on, but if I ever had to design a large complex project written is C
or better, I would more than likely shop around for the best solution, which
probably wouldn't be the PIC.



Thomas



Re: Beginning PICs

Quoted text here. Click to load it

There is more choice than there used to be, at the low end.

Now you have Atmel, Freescale, Philips, SiliconLabs, TI, ST, Zilog all
making usefull small, microcontrollers.
The most widely sourced 8 bit core is 80C51, with 5 of 7 of the above
offering 80c51 variants amongst their lineups.
In larger cores, ARM is the most widely sourced, with 5 of 7 of the
above also offering ARM variants.

  -jg


Re: Beginning PICs
Quoted text here. Click to load it

I suggest you look into AVRs. They are much nicer to program and a bit
faster to boot.

cheers,

Al

Re: Beginning PICs

Quoted text here. Click to load it

have a look at:
http://www.dontronics.com/auto.html
this may help

Don...




--
Don McKenzie
E-Mail Contact Page:       http://www.e-dotcom.com/ecp.php?un=Dontronics

We've slightly trimmed the long signature. Click to see the full one.
Re: Beginning PICs

Quoted text here. Click to load it

PICs are very cheap. There's a webring called piclist that has lots of info.
I don't know the AVRs but if you're in assembly programming PICs only have 30
odd instructions which are very easy to work with (IMHO). I use them for
low-level realtime stuff where cycles count. They do about 5M
instructions/second without overclocking. There's a free develeopment tool
from Microchip called MPLAB. I'm not sure there's a free C compiler, never
looked. There is a free other compiler called JAL which is Pascal-like (see
http://www.voti.nl/pic/index.html -> tools -> Jal).

Mat Nieuwenhoven



Re: Beginning PICs
Mat Nieuwenhoven schrieb:

Quoted text here. Click to load it

There is cc5x, free for hobbyists, with some limitations (1k
instructions, but you can work around. Look: http://cc5x.de/Crack.html ).
Support in MPLab is included.

Michael

Re: Beginning PICs

Quoted text here. Click to load it

There is a free compiler from microchip for the 18f series
look for the student version(free).

Jal is very good as well.

For a non free but "cheap" c compiler picant / boostc www.picant.com
picant was 16f and   only
boostc is 12f, 16f and 18f  see
http://sourceboost.ipbhost.com/index.php?s=ea776dbd8b320379021939e2bbfb917a&showtopic96%1

Avrs are pretty good as well.
avr gcc / win avr  - port of gcc for avr - free

If you prefer basic there is the demo version of bascom avr.

Both chips are cheap and reasonably easy to use.

Find a project you want to build and go for it.

Alex



Re: Beginning PICs
bender schrieb:

Quoted text here. Click to load it

It's a good intention, but you can't prevent this. Be not frustrated ;-)

Quoted text here. Click to load it

That is my Prog-HW (Less than 10 or $):
http://www.rotgradpsi.de/mc/picprog/picproge.html

A good and useful SW for many HW can be found there:
http://people.freenet.de/dl4yhf/winpicpr.html

The dev-suite can be downloaded from the microchip web site for free.
C-Compiler: cc5x for PIC 12F/16F or C18 (from Microchip) for 18F.
Some other languages are available.

Quoted text here. Click to load it

If you are a hobbyist, look around the web. There are many projects,
also some to realize a circuit for development. (But it's not my way.)

My best kit is a breadbord ;-)


More questions?
Michael

Re: Beginning PICs
I like the Z8 from Zilog. The eval kits are cheap <$50 on Digikey. And
the programmer & Complier come with the eval kit.

Zilogs App Notes are excellent aswell.

I've heard good things about AVR's too, but I have never used one.

Eric


Re: Beginning PICs

Quoted text here. Click to load it

Are there any Linux-hosted toolchains for the Z8?

Quoted text here. Click to load it

I've looked at the data sheets, and they seem pretty decent.
The gnu AVR toolchains is also supposed to be good.

--
Grant Edwards                   grante             Yow!  I know things about
                                  at               TROY DONAHUE that can't
We've slightly trimmed the long signature. Click to see the full one.

Site Timeline