Tools

Development tools consist of the MPLAB X IDE (integrated development environment) and XC8 C-language compiler.

To install these on your personal computer go to MPLAB. Part way down the page look for and select the Downloads tab. Then look for your PC’s operating system and download MPLAB X IDE 2.15.

You’ll need to extract the installer and run it. During the installation process you will be prompted to choose and download the compiler. Again, we will be using the XC8 compiler.

Local History Tool

One of the more useful features of the IDE is called “Local History”. It keeps track of changes to your source files, allowing you to compare the latest to earlier versions. Local History is the first place you should look when things go wrong! Look for it under the Team menu heading.

A frequent surprise for an embedded developer is to discover that a trivial change has unforeseen  consequences. I advise you to use Local History after every edit of a source file. Make it a habit to check your changes this way before you re-program your device.

Change with enthusiasm. Review with skepticism.

A skeptical view of the actual changes might save you from the trap of anticipating the desired outcome and stumbling over your own disappointment.

Source Code Pretty Print

MPLAB X IDE provides a code formatter. Under the top pull-down menu bar:

Source -> Format

will do the job for you. If you happen to dislike some aspect of the format, you can change the rules via:

Options -> Editor -> Formatting

I strongly suggest you use this tool regularly.

A lot of time and energy is wasted when software developers argue about proper source code style or layout. This is not to say that passion for the beauty and practicality of well-written code is wrong. Here’s my complaint: Software developers are producers of automation. It is ironic in the extreme that we manually format code instead of using computer tools to do the job for us!

Disassembly Listing

This tool lets you see the machine code produced by the XC8 compiler. It appears interleaved with your C program.

MPLAB X IDE command:

Window->Output->Disassembly Listing File

Required Tools

You will need Adobe Reader as most documents are of PDF type.

Useful Instruments

A digital multimeter (DMM) can be handy.

An oscilloscope is valuable (though not cheap).

Leave a Reply

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

Tools, techniques, design approaches and fun!