One of the best ways I know to engage with a new microcontroller -- both the hardware and its documentation -- is to create a few of your own personal tools for it. Two that I like (and some of the easiest to create) are an I/O pin configuration tool and a disassembler.
The I/O pins on a microcontroller are almost invariably multiplexed to support multiple functions, with a few special function register (SFR) settings determining the actual function a given pin will perform. Understanding (and remembering) all the options and settings available for an MCU's I/O pins can be a real chore. Yet having that understanding is key to getting the most out of a device.
To deal with the complexity of setting the SFRs, most MCUs now come with a canned pin configuration tool. These tools are nice to have, but they don't really provide the same sort of detailed learning experience that comes with trying to write your own tool for this purpose.
As an example, one of my configuration tools for the TI MSP430G2211 (in a 14-pin DIP) is shown below. I cobbled together this program in a day, and the process of building it forced me to read the device data sheet and the user's guide -- carefully. In particular, I had to pay attention to a number of I/O-related issues I hadn't noted before in my more casual reading of the docs.
Pin Assignment Tool
Creating a pin assignment tool forces you to learn your MCU's I/O options in detail.
From a programming standpoint, constructing a tool like this is pretty straightforward, especially once you've built one or two. The hard part is working back and forth in the documentation to be sure you understand (in real detail) all the options and settings required to set up your I/O configuration. You learn a lot about the I/O going through this process.
There is a similar learning opportunity for the MCU's instruction set. Mastering an instruction set can come only with practice, but I find that building a simple table-driven disassembler for a given device is useful early on in the learning process. It forces me to work through each of my MCU's instructions and addressing modes as I create the tables that will let me enter a hexadecimal instruction from my assembly listing and convert it into a familiar assembly language statement.
In addition to the education you get from its construction, the disassembler is useful in later development. For instance, as I read the listing from an assembly or compilation in order to find some bug, I find that it's often helpful to be able to enter the hex code of a statement and recover the assembly language statement that produced that code. The process sometimes yields surprises.
Once again, the IDE you're using almost certainly will let you go back and forth between an instruction as a sequence of hex digits and an assembly language statement. But using the canned disassembler may not be the ideal way to move between listings, and it certainly won't force you to study your device's basic assembly language.
My disassembler for the MSP430 is illustrated below. A tool like this can be built in a day, and, again, the process gets easier once you've constructed one for a few different devices.
Creating a simple disassembler tool can give you a head start on mastering your MCU's instruction set.
I'd encourage you to try building your own versions of both these DIY tools if you can find the time. You'll almost certainly learn something about your MCU -- and you'll end up with two small programs that can be helpful in configuring and debugging your projects. If you do try these, I'd be pleased to hear about your experience.
And if you have a few of your own DIY microcontroller tools, I'd certainly be pleased to hear about them. What do they do, and how do they support your design process?