Re: PIC Assembler.

ian field wrote:
"Anthony Fremont" <nobody@xxxxxxxxxxx> wrote in message
ian field wrote:
Does anyone have a link to any tutorials for PIC assembly?

No, but I know of a couple of good books by John Peatman, but they
aren't exactly "beginner" books. Which particular PIC "line" were
you looking at? Allot of the old stuff on the net are based upon
16f84 (or lesser) PICs. Those parts are basically obsolete and the
modern day equiv would be a 16F88.

The book I've already bought (PIC in Practice) is based mainly on the
F84, at Maplin this is about twice the price of newer more capable
PICs possibly indicating that Microchip want to discourage future
sales, the Velleman K8048 kit I bought came with a 'free' F627, this
and the F628 seem to be matching the F84's former popularity for
projects & articles to be found on the net

It usually depends upon the date of the project. Currently, the 16F88 is
the best of the bunch. They are all pretty much pin compatible, just more
features in the newer parts. The 88 has a nice internal oscillator block
that is precise enough (1%) to do serial comms without a crystal. Most code
is easily ported, just changes in the _CONFIG word values and having to add
an instruction or two during the program's initialization to disable the
analog features of some of the i/o pins.

Since you are starting out fresh, I suggest you look at the 18F type
PIC chips. They are far more capable and easier for a beginner IMO. is a site worth looking at. Digikey has a part
number for a complete set of parts to populate the circuit board
that is included with the book.

What makes the 18F parts easier than the 16F parts? I must admit not
having paid much attention to the 18F parts - I think the Velleman

The short answer is banking. The chip still uses banking, it's just that it
powers on in such a state that all the SFRs are accessible without having to
manipulate banking control bits. Just makes life a little easier on a

programmer has limited 18F support compared to 16F parts, they might
even be only supported via ICSP and also restricted by what is
supported by the burner application. Fortunately the programmer is
remarkably similar to the David Tait & Serpic1 designs, so I may be
able to search for programmer software with more devices supported.

If you can spare the money, buy a programmer, don't try to build one of the
el-cheapo designs on the net. Most of the "no parts" type programmers
depend upon conditions that most modern PCs don't operate under. Trust me
you will have enough issues to sort out without having to wonder if your
programmer is working. I use one from It wasn't exactly
cheap, but it's fast, powered by USB cable and will program almost anything.

You may wish to consider a pre-made dev board from somewhere like Some boards will make use a bootloader so that you don't
need a programmer at all, just a serial connection to the board.

Over the past few months I've been trying many permutations of
Google search string, but most of the tutorials I've found assume
previous experience at writing assy for microprocessors.

I learned from looking at other code and using Peatman's first book,
but I had quite a bit of past experience with programming in
assembler. I could give you some sample code that I've written if
you want.

Does the Peatman book have an ISBN number? Most bookshops around here
are reluctant to make much effort finding books without an ISBN and
if its a US book we in the UK tend to get charged as many £ as the
price in $ regardless of exchange rate - so I'm already baulking at
the price before I've even seen it!

ISBN: 0-13-046213-6 is the number for the book at Like
usual, the 18F452 has been superceded by newer parts with less errata. The
older book is ISBN: 0-13-759259-0 and the title is "Design with PIC
Microcontrollers". To give you an idea of it's age, it talks allot about
the 16C74 which was pre 16F84. I'd recommend the newer one.

Another problem is most of what I've found is HTML which is untidy
to save for later study and many pages lose their image files after
being saved to disk (anyone know why that happens?). Any help