Microcontroller documentation explained (part 1): structure of the technical sheet

Documentation – whether you love it or hate it, you still have to negotiate it. Microcontrollers have a lot of documentation because, compared to other simpler semiconductor devices, they are really complex. In this series of articles, we’ll take a look at the microcontroller documentation, what’s in the datasheet, what’s not, and where to find the missing details.

Microcontroller datasheets can easily be over 600 pages today. Fortunately, Elektor has a lot of resources, such as articles for beginners and books to get you started. However, at some point you will need to familiarize yourself with the actual microcontroller documentation.

Although the microcontroller datasheet is so many pages long, you are unlikely to find all the information you are looking for. To complete the datasheet, you will also need to find documentation on tools that turn source code into firmware, code development and debugging tools, and serial programming tools. If you are new to the world of microcontrollers, this guide will help you understand where things are documented, how to read hieroglyphics in their contents, and where to find out if there have been any errors in what you are reading.

Microcontroller documentation example: PIC16F18877

To kick off the first part of this three-part series on microcontroller documentation, let’s focus on a simple, 8-bit microcontroller such as Microchip Technology PIC16F18877, and what documentation is available. Open this link, then click on “Documents”. You will see that we are offered the datasheet, errata, “collateral materials” covering some application specific elements and evaluation boards, programming specifications and a long list of application notes. Further down, you’ll find source code to accompany some of the application notes, sales brochures, and a white paper on analog-to-digital converters (ADCs).

What is in the microcontroller datasheet?

We will start by downloading the PIC16F18877 datasheet. Datasheets for microcontrollers can be quite intimidating, and perhaps surprisingly, not everything you need to know is included. Figure 1 shows what you should find at a minimum.

Figure 1: The opening pages list the features built into the microcontroller. (Source: Microchip Technology)
  • Detailed information on one or more microcontrollers – Often several different microcontrollers with different numbers of pins and packages will be created from a single silicon chip. Rather than creating and maintaining documentation for each variant, you are more likely to find multiple devices covered in a single datasheet. This is the case here, as explained on Page 1, with two variants covered: the PIC16F18857 and the PIC16F18877.
  • Functional diagram of the microcontroller – This generally includes the processing core (the level of detail varies; the more complex the core, the simpler its schematic implementation), memories, buses and peripherals. From there, you can quickly determine the basic capabilities of the microcontroller. The functional diagram of the microcontroller (Figure 2) Appears on page 18, while a functional diagram of the processing heart is activated page 33.
Functional diagram of PIC16F1877 microcontroller
Figure 2: The block diagram is a good starting point for determining the overall capabilities of the microcontroller (left) and sometimes also of the processing core (right). (Source: Microchip Technology)
  • Packing options – These range from through-hole types (if still available) to a range of surface mount options. In this example, they start on page 4.
  • Memory size options – The microcontroller can very well be offered with different sizes of RAM, flash, EEPROM and any other type of memory, such as caches. In our example, we get a quick look at page 3. The table lists the memory sizes as well as the number of implemented devices (figure 3).
Memory options for PIC16F1877
Figure 3: Take a look at the memory options for the PIC16F18x7 variants, as well as the implemented peripherals. (Source: Microchip Technology)
  • Block diagrams of devices on a chip – Device-on-chip functionality is more easily explained by diagrams than by words. Block diagrams provide a vital source of understanding as well as clarity on pin connections and clock sources, where the microcontroller has multiple clock outputs from its oscillator and, if implemented, PLL (locking loop). phase). We’ll look at a few examples shortly in Part 2 of the series.
  • Description of registers – Each device can be configured in a specific way. For example, a UART (Universal Asynchronous Receive / Transmit Serial Interface) can often be configured for different baud rates, number of bits, etc. The description of the register explains how to configure the device and how to determine its state after something happens, such as receiving a byte of data. How these are deciphered is covered later in Part 2 of the series.
  • Electrical specifications – These inform the user of the voltage and current limits that can be applied or drawn from the pins of the microcontroller. These are usually set twice: once as absolute maximum values ​​and once more as minimum, typical and maximum values ​​during normal operation. There are also timing features, as shown in Figure 4, and can be found from page 592 in this datasheet.
PIC16F1877 electrical characteristics tables
Figure 4: Electrical specifications are provided as absolute limits, as well as minimum, typical and maximum values ​​for DC and AC values, as well as time limits. (Source: Microchip Technology)
  • Tool recommendations – You will need tools to convert source code to assembler and tools to debug the results. Most datasheets provide some sort of recommendation of the tools available. Here they are briefly covered on page 638.

Looking to the future for block diagrams

With the basic structure of a microcontroller datasheet understood, we will next look at how registers are described and how to decipher block diagrams. We will also take a detailed look at the two most important blocks of any microcontroller – the clock and the oscillator – and the implementation of the reset circuit.


Editor’s Note: Read Full microcontroller documentation series.


Source link

Sam D. Gomez