PIC Microcontrollers

PIC Microcontrollers are programable silicon chips offered by Microchip

This is mainly done in C language. For this purpose, the free MPLABX IDE can be downloaded as well various C compilers.

It is possible to buy these chips online, as well various developement boards.

Originally PICs were 8bit controllers, for instance the 16F5X and 16F84 are well known. However their memories are small. Recently the PIC32 was introduced, which has much larger memories, and offers more performance. There are also 16 bit PICs. You can see the portfolio at the Microchip website, best is to check regularily for updates and new products.

Should I build my own device programmer?

Numerous such attempts have been made, however it is not recommended to do this as the first project. You could for sure build a serial port programmer relatively easily however a USB to serial converter will not work for technical reasons so you need a hardware serial port.

The PICKIT3 is very popular these days, and it is recommended even if it costs 50 to 80 dollars.

Should I learn assembler?

No, you only waste time, however for sure it is a suitable means to learn programming as such. Assembler programming has been done by amateurs a lot in the 1980s particulary for the 68000 but it is no longer happening that much now.

For professional use, it can be very difficult to maintain larger assembler source codes, especially to change the structure and to reuse source code. Even if it is modularized, it can be hard to read, since parameters may be passed in a nonstandard way, and banking will tie the source to a specific microcontroller model.

C language actually has assembler-like capabilities such as indexed addressing, and binary operations as well direct register access.

An easy way of hardware debugging

Many people use internal debugging facilities via the IDE but that will result in a slowdown of the firmware. It is difficult to setup as well in some cases.

You can attach LEDs to port bits and piezo speakers, and you can test conditions, then set the LEDs accordingly. You can even attach a LED display or a LCD and display HEX values. For this purpose a serial display is the easiest way.

I found it easier alltogether than using the debug facilities of the IDE.

Of course you need some practice and a good understanding of tristate, port IO and interrupts. If you can handle them easily, you do no longer need to rely on IDE debugging.

Leave a Reply

Your email address will not be published. Required fields are marked *