Programming 32-Bit Microcontrollers In C: Exploring The PIC32

Jan. 7, 2009
By Lucio Di Jasio

The book is all about Microchip’s PIC32, a 32-bit, MIPS32-based microcontroller line. It delves into Microchip’s development tools and software development suite while providing a general overview the MIPS32 architecture making it suitable reading for anyone that plans on working with a MIPS32 platform, not just a PIC32. Still, you get the most out of the book if Microchip will be your chip supplier.

The book comes with a copy of MPLAB, Micorchip’s IDE (integrated development environment). It is designed for use with the Microchip Explorer 16 development board. Jasio starts with IDE basics including loading, compiling, and linking. The chapter provides step-by-step instructions and wraps with subsections for experts (C, assembly, PIC) as well as a Tips and Tricks subsection. Most chapters wrap up in the same fashion.

The PIC32 simulator is highlighted next along with some C basics. Discussions about things such as numbers and arrays are presented in processor’s architecture context. It provides a fair overview in case C is not your primary programming language.

The more interesting parts of the book start in Chapter 5 where the interrupt system is addressed. As noted in the title, C is the way to deal with the PIC32. Assembly need not apply, much. Memory management hardware and C memory management support has a chapter dedicated to it. The PIC32 has a basic memory management unit so topics like virtual memory do not have to be addressed.

Analog, digital, and communication chapters match peripherals with C code suitable for direct access or for writing device drivers. There is minimal use of logic diagrams but this book is about software rather than interfacing. One of the more interesting analog interface chapters is called UTube. This actually covers a software-based video driver that also takes advantage of the PIC32 hardware to drive a VGA display. A number of interesting applications including some Mandelbrot programs are provided to highlight the system’s operation.

The mass storage and file systems chapters should prove to be useful in most applications. The chapters include support for flash memory system such as SD/MMC cards. The file system support addresses the FAT file system that is typically found on these types of memory cards.

The last chapter entitled Musica, Meastro takes a closer look at the PWM (pulse-width-modulation) support of the PIC32. An oscilloscope will be handy to replicate the graphs presented in the book but it is not a requirement. It was one of the more interesting chapters.

The book is a relatively easy read for anyone familiar with C and microcontrollers in general. Those unfamiliar with the PIC32 at the start should have a good feel for its capabilities by the end.

One thing I would have liked to see is a table of functions presented in the book. It should be organized by use. The alternative right now uses the index if you can remember the function name. Other than this minor item, I can highly recommend the book to anyone that will be using the PIC32.

Sponsored Recommendations

Near- and Far-Field Measurements

April 16, 2024
In this comprehensive application note, we delve into the methods of measuring the transmission (or reception) pattern, a key determinant of antenna gain, using a vector network...

DigiKey Factory Tomorrow Season 3: Sustainable Manufacturing

April 16, 2024
Industry 4.0 is helping manufacturers develop and integrate technologies such as AI, edge computing and connectivity for the factories of tomorrow. Learn more at DigiKey today...

Connectivity – The Backbone of Sustainable Automation

April 16, 2024
Advanced interfaces for signals, data, and electrical power are essential. They help save resources and costs when networking production equipment.

Empowered by Cutting-Edge Automation Technology: The Sustainable Journey

April 16, 2024
Advanced automation is key to efficient production and is a powerful tool for optimizing infrastructure and processes in terms of sustainability.

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!