Microchip (PIC) RISC Assembler

For anyone who wants to try assembler instead of that girly BASIC stuff some folk are always raving about, this is the place.

RISC assembler programmed into PICs by In-Circuit Serial Programming using home-built programmers for under $20 is my thing.

Ask me questions.

Now, this maybe belongs under the 4 elements. Does it go under programming or electronics? Naw. I'd say it's another "system". Is anyone able or inclined to move it to that container?

What do you need?

Well, for programming you just need a programmer such as http://www.jdm.homepage.dk/newpics.htm which plugs into your PC serial port. (Assuming you have one of those anchient (circa 3 years ago) PCs that still has serial ports - USB/RS232 convertors don't seem to work terribly well for this type of application.)

Then you need a piece of software to drive it. I used http://www.ic-prog.com/ for years (it has a cool builtin disassembler). Then I switched to http://freenet-homepage.de/dl4yhf/winpicpr.html recently, becuase it inherently supports ALL Pics.

ICSP is dead easy. You attach /MCLR, Vdd, Vss, PC and PD on your programmer to /MCLR, Vdd, Vss, PC and PD on your PIC and press "go".

Walkthrough

Yes. Good idea. The problem with making a walkthrough is that I don't see what's difficult. I'll try to remember what I found as the major hurdles and work from there.

1) Get an account at www.microchip.com. They will happily send you three engineering samples of any four components for free - and they even pay the postage.

2) download their EXCELLENT and FREE RISC assember IDE. It has online help, offline debugging, in-circuit serial debugging and is possibly the best development environment for any programming language EVER. I really mean it.

(http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1...)

3) Get a 16Fxx or 16Fxxx series PIC, and attach and LED to one of te DIO lines, through a resistor to ground.

Actually... Watch this space. I will shortly recommend a PIC with an internal oscillator, give you the assembler code, recommend a programmer and a promming package and tell you how to prom it with ICSP. (If real life allows.)

Notes:

There are only a few DIY programmers whcih work directly with the Microchip IDE. They have to make money SOMEHOW: they give you everything else for free! Consequently, we need to choose an external prommer and some software to drive it. I will work only with freeware and freely available prommer designs.

Update 2008-05-29

The first revision of the HowTo is here.

https://www.robotshop.com/letsmakerobots/node/715

Update 2008-07-07
I'm not going to do any further work on this as all the information is presented in an idiot-resistant form at Gooligum Electronics.

If you find it useful, contact the guy and say "thanks". He has put a LOT of effort in.

 

Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.

Newbie Question

First, I want to say thank you for your Microchip PIC ordering walkthroug.

Second, Id like to ask if having experience on program in 8086 microprocessor will help me to program the 16F690. I learnt 8086 basic assembler on college,

I ordered the 16F960, I’d like to do funny things with them (when they arrive :P)

 

Bye and thanks

It’s Assembler

My first assembler was 6502, then I moved to Z80. The 8086 instruction set is HUGE by comparison. The PIC RISC has only 31 (ish).

So, yeah, you’re used to breaking processes down into tiny little tasks, but in RISC, you have to break 'em down even further.

Imagine programming in C, but without using library files! (C only has about 30-ish commands, I think.)

Thanks for the answer

I’m not bad on C but assembler is like “not-atractive” to me, so if I must use it to do something as cool as the things you do, I will start to have a good reason to improve on it :slight_smile:

When the microcontrollers arrive I will start studying the RISC, but it will take me a long time to develop a robot, what I can do is a “newbie” walktrhoug like… how to make a led flash with PIC and things like that.

I will also order an Arduino :slight_smile:

 

Thanks for all the comments

 

No more free PICs

It seems like Microchip has stopped providing free samples to Europe! What a shame, I could really have used one :’(

Dennis L

Not certain

I haven’t followed the process right through to actually pressing “order”, but I have the impression that they’ll still do the samples, but you have to pay your own postage now.

Some sources are saying you need a business account. I don’t think you NEED one, but if you don’t have one you don’t get free postage.

I have a good supply at the moment, but I will follow this process through one day soon.

USA is fine

It think that they’ll still ship to USA and Asia, but not Europe. According to Microchip them self that is so.

Dennis L

Damn!
Damn!