
- English
- ePUB (mobile friendly)
- Available on iOS & Android
eBook - ePub
Practical Microcontroller Engineering with ARM Technology
About this book
The first microcontroller textbook to provide complete and systemic introductions to all components and materials related to the ARM® Cortex®-M4 microcontroller system, including hardware and software as well as practical applications with real examples. This book covers both the fundamentals, as well as practical techniques in designing and building microcontrollers in industrial and commercial applications.
- Examples included in this book have been compiled, built, and tested
- Includes Both ARM® assembly and C codes
- Direct Register Access (DRA) model and the Software Driver (SD) model programming techniques and discussed
If you are an instructor and adopted this book for your course, please email [email protected] to get access to theinstructor files for this book.
Frequently asked questions
Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription.
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
Perlego offers two plans: Essential and Complete
- Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
- Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes! You can use the Perlego app on both iOS or Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app.
Yes, you can access Practical Microcontroller Engineering with ARM Technology by Ying Bai in PDF and/or ePUB format, as well as other popular books in Computer Science & Project Management. We have over one million books available in our catalogue for you to explore.
Information
Chapter 1
Introduction to Microcontrollers and This Book
As the development of Very Large Scale Integrated Circuits (VLSI) in recent years, more and more advanced semiconductor devices and equipments have been built with very high intensity and density. Millions of MOSFETs can be integrated in a very small semiconductor chip to generate multifunction processors, called Microprocessors. Microprocessors can be considered as a very large scale integrated circuit device that can be programmed to perform specific functions or tasks.
One of the most popular and important microprocessors is the Center Processing Unit, or CPU, which is the center of a computer and used to process and coordinate all operations on a computer. Some other popular microprocessors can be categorized into the different groups based on their functions. Some popular microprocessors are:
- CPU—Including the Intel family such as 8080/8085/8086/80286/80386/80486/80586 and Pentium, the Motorola family such as M6800, M68000, M68HC11, and M68HC12, and the Apple family such as 6502.
- Parallel 8-bit I/O ports—Including the Intel family such as 8255 and the Motorola family such as M68230 Parallel Interface and Timer (PIT).
- Parallel-to-Serial Converter—Including the Intel family such as 8251 and the Motorola family such as M68681 dual UART.
- Timer and Counter—Including the Intel family such as 8253 and the Motorola family such as MC1555U timer.
- Interrupt Control Unit—Including the Intel family such as 8259 and the Motorola family such as MC6828 Priority Interrupt Controller.
- Random Access Memory (RAM) Chips—Including the Intel family 28C256 (32 K × 8), 62512 (64 K × 8), and 62158 (1024 K × 8).
- Erasable Programmable Read-Only Memory (EPROM) Chips—Including the Intel family such as 27128 (128 K×8), 27256 (256 K × 8), and 27512 (512 K × 8).
By combining microprocessors with memory units and I/O ports, a Microcontroller system can be built. Sometimes a microcontroller is also called a microcomputer. In fact, a microcontroller is made by embedding processors, a memory unit, and I/O ports into a single semiconductor chip, and this is the current module of a modern microcontroller unit (MCU) used in all aspects in our present-day society. The latest MCU module is the ARM® Cortex®-M4 family.
Let's have a closer look at the structure and configuration of a microcontroller or a microcomputer system.
1.1 Microcontroller Configuration And Structure
As we mentioned, by combining some microprocessors with memory units and I/O ports, a microcontroller can be built. In fact, a microcontroller can be built by combining three basic components with three system buses as shown in Figure 1.1.

Figure 1.1 The basic structure and configuration of a microcontroller system.
Three components are CPU, Memory, and I/O Ports. These three components are connected with three system buses, Address Bus (A.B.), Data Bus (D.B.) and Control Bus (C.B.), to provide the following functions:
- The CPU works as headquarters for the microcontroller to provide all controls to other components and coordinate them to fulfill the desired tasks assigned to the microcontroller.
- The memory unit works as a storage unit to store the user's program, including the user's instructions and data. Some system programs and data are also stored in special memory units such as PROM, EPROM, EEPROM, or flash memory.
- The I/O Ports work as an interface and provide the communications between the CPU and the peripheral devices.
The communications between these three components are performed via three system buses. The Address Bus provides a valid address to the memory to enable the CPU to select and pick up the desired instruction or data from the selected memory space. The Data Bus is used to transfer a valid data item between components. The Control Bus provides valid operational signals to coordinate the information transfer between components. Some popular control signals are Read/Write (RW) signal used to read from or write into the memory, Chip Select (CS) signal used to decode the address to select the desired microprocessor chip, and Enable signal E that is similar to the CS signal.
Three components are connected together via three buses in tri-state mode, which means that the connection between any two components is disconnected or high impedance until a valid address is applied and decoded to enable the selected tri-state gates to turn on.
Regularly, a CPU contains three components: (1) a group of registers made of flip-flops, (2) Arithmetic and Logic Unit (ALU), and (3) control signal generator. The registers are used to assist the instruction's decoding and data operations since most operations between the CPU and memory are performed inside registers in the CPU because of the high execution speed of registers. The ALU is used to perform arithmetic and logic operations, and the control unit provides all timing and control signals required to perform all related operations of the CPU.
Generally the memory space is divided into two separate areas: One is the system memory space that is used to store instructions and data related to the normal operations of the microcontroller, and the other one is the users' memory space that is used to store the users' instructions and data.
The memory spaces also can be divided into the catch and heap areas based on the materials used to build the memory; the former is made of high-speed static RAM (SRAM), and the latter is made of dynamic RAM (DRAM) with relatively slower accessing speeds. The advantage of using the SRAM is that a higher memory accessing speed can be obtained, but much more MOSFETs are utilized for each SRAM unit and therefore makes the memory structure complicated with higher cost. The advantage of using DRAM is that higher memory densities or integration intensities can be obtained with mush simpler MOSFET structure and lower cost for each DRAM unit, but the working speed is relatively slower because of an additional refresh circuit applied on the DRAM. Because of the cost issue, usually the size of SRAM or the catch memory is small but the size of the heap or DRAM is huge.
The memory can also be categorized to the Random Access Memory (RAM), the Read Only Memory (ROM), the Erasable Programmable ROM (EPROM), or Electrically Erased Programmable ROM (EEPROM). Generally, the system instructions and data are stored in the ROM, EPROM, or EEPROM spaces. The users' instructions and data are stored in the RAM space. Based on the functions, the memory can be divided into either volatile memory or nonvolatile memory. The RAM belongs to the volatile memory since all information stored in this kind of memory would be gone when the power is off. However, the ROM, EPROM, and EEPROM belong to the nonvolatile memory since the information stored in this kind of memory would be still in there even the power is off.
Based on the structure, the RAM can be categorized to static RAM (SRAM) or dynamic RAM (DRAM). We will provide more detailed discussion about the static and dynamic RAM in Chapter 6.
The I/O Ports can be divided into two categories: the parallel and the serial I/O ports. Each I/O port can be mapped to a memory address, or each of them can have special I/O address that is different with a normal memory address. The former is called the I/O memory mapping addressing and the latter is called the direct I/O addressing.
1.2 The Arm® Cortex®M4 Microcontroller System
Different embedded systems or MCUs have been developed and built by different vendors in recent years. One of the popular MCUs is the ARM® Cortex®-M MCU family. This kind of MCU provides multifunctions and control abilities, low-power consumptions, high-efficiency signal processing functionality, and low-cost and easy to use advantages. The latest product of the ARM® Cortex®-M family is Cortex®-M4 MCU.
The ARM® Cortex-M is a group of 32-bit...
Table of contents
- Cover
- Series Page
- Title Page
- Copyright
- Dedication
- Preface
- Acknowledgments
- Trademarks and Copyrights
- Copyright Permissions
- About the Companion Website
- Chapter 1: Introduction to Microcontrollers and This Book
- Chapter 2: ARM® Microcontroller Architectures
- Chapter 3: ARM® Microcontroller Development Kits
- Chapter 4: ARM® Microcontroller Software and Instruction Set
- Chapter 5: ARM® Microcontroller Interrupts and Exceptions
- Chapter 6: ARM® Microcontroller Memory System
- Chapter 7: ARM® Cortex®-M4 Parallel I/O Ports Programming
- Chapter 8: ARM® Cortex®-M4 Serial I/O Ports Programming
- Chapter 9: ARM® Cortex®-M4 Timer and USB Programming
- Chapter 10: ARM® Cortex®-M4 Other Peripherals Programming
- Chapter 11: ARM® Floating Point Unit (FPU)
- Chapter 12: ARM® Memory Protection Unit (MPU)
- Index
- About the Author
- End User License Agreement