ARM-based Microcontroller Projects Using mbed gives readers a good understanding of the basic architecture and programming of ARM-based microcontrollers using ARM's mbed software. The book presents the technology through a project-based approach with clearly structured sections that enable readers to use or modify them for their application. Sections include: Project title, Description of the project, Aim of the project, Block diagram of the project, Circuit diagram of the project, Construction of the project, Program listing, and a Suggestions for expansion. This book will be a valuable resource for professional engineers, students and researchers in computer engineering, computer science, automatic control engineering and mechatronics.- Includes a wide variety of projects, such as digital/analog inputs and outputs (GPIO, ADC, DAC), serial communications (UART, 12C, SPI), WIFI, Bluetooth, DC and servo motors- Based on the popular Nucleo-L476RG development board, but can be easily modified to any ARM compatible processor- Shows how to develop robotic applications for a mobile robot- Contains complete mbed program listings for all the projects in the 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.
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. 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.
Both plans are available with monthly, semester, or annual billing cycles.
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.
Yes, you can access ARM-based Microcontroller Projects Using mbed by Dogan Ibrahim in PDF and/or ePUB format, as well as other popular books in Technology & Engineering & Computer Engineering. We have over one million books available in our catalogue for you to explore.
Microcontrollers are single chip computers that include a minimum of a microprocessor, memory, and input-output module. Depending on the complexity, some microcontrollers include additional components such as counters, timers, interrupt control circuits, serial communication modules, analog-to-digital converters, digital signal processing modules, and so on. Thus, a microcontroller can be anything from a tiny single chip embedded controller to a large computer system having keyboard, monitor, hard disk, printer, and so on. A microprocessor is different from a microcontroller in many different ways with the main difference being that a microprocessor requires several additional external support chips such as memory and input-output circuits before it can be used as a digital controller. This chapter is an introduction to the principles of microcontrollers where several examples of microcontroller-based systems are described.
Keywords
Microprocessor; Microcontroller; Assembly language; High-level language; ARM; Microcontroller control system; STM32-Nucleo development board
1.1 Overview
Microcontrollers are single chip computers that include a minimum of a microprocessor, memory, and input-output module. Depending on the complexity, some microcontrollers include additional components such as counters, timers, interrupt control circuits, serial communication modules, analog-to-digital converters, digital signal processing modules, and so on. Thus, a microcontroller can be anything from a tiny single chip embedded controller to a large computer system having keyboard, monitor, hard disk, printer, and so on.
A microprocessor is different from a microcontroller in many different ways. The main difference is that a microprocessor requires several additional external support chips such as memory and input-output circuits before it can be used as a digital controller. A microcontroller on the other hand includes all these support chips on the same chip and that is why it is called a single chip computer. As a result, multiple chip microprocessor-based computer systems consume considerably more power than microcontroller-based systems. The costs of the single chip microcontroller systems are also much lower than the costs of the multiple chip-based microprocessor systems.
Microprocessors and microcontrollers operate by executing user programs. These programs are stored in the program memory of the device and consist of instructions that can be understood and obeyed by the device. The device fetches these instructions from its program memory one by one and then implements the required operations. Under the control of the user program data is received from external input devices (inputs), manipulated as requested, and then sent to external devices (outputs).
Microcontrollers (and microprocessors) have traditionally been programmed using the assembly language of the target device. The assembly language consists of many mnemonics where each mnemonic describes a basic instruction that can be carried out by the device. Although the assembly language is very fast, it has many disadvantages. Firstly, because of the syntax of the assembly language, it is difficult to learn this language. Secondly, processors developed by different manufacturers have different sets of assembly language instructions. Even in most cases the processors manufactured by the same manufacturer may have different assembly language instruction sets. As a result, the programmer may be required to learn a different assembly language every time a new processor is to be used. Thirdly, in general, it is difficult to maintain a program written using the assembly language.
Although the assembly language is still in use in some real-time applications, nowadays most applications are developed using a high-level language, such as BASIC, C, C ++, C#, Visual BASIC, PASCAL, JAVA, and so on. Perhaps the greatest advantage of the high-level languages is the ease of learning and fast program development. Large and complex programs can be developed in much shorter times compared to the assembly language. For example, to write a piece of assembly language program code to multiply two floating point numbers can take several hours or even more time and mistakes can easily be made. On the other hand, using a high-level language we just multiply the two numbers. Additionally, it is much easier to maintain a program written using a high-level language. High-level languages also have the benefit that in general the same user program can easily be transported to work on a different processor with little or no modifications. High-level languages are supported by large number of built-in libraries that make it easy to develop very complex programs in relatively short times. Finally, another advantage of using the high-level languages is that the developed program can easily be tested and this feature shortens the development time considerably.
In this book we shall be using the C language which is perhaps currently the most popular language used in microcontroller-based applications. As we shall see in the later chapters, the Mbed integrated development environment will be used to develop our projects. Mbed is an online integrated development environment that is used to develop ARM (Advanced RISC Machines) processor-based applications. Using Mbed we can write a program in C, then compile the program, and upload the executable code to the target ARM processor. The advantage of using Mbed is that it is easy to learn and use and is supported by very large number of library functions. The projects in this book are all based on the ARM processor. There are many ARM development boards available in the market. In this book we shall be using a model of the STM32-Nucleo development boards manufactured by STMicroelectronics. As will be discussed in detail in the later chapters, STM32-Nucleo boards are complete microcontroller development boards incorporating fast 32-bit ARM processors together with all the support circuitry to help develop complex projects. The STM32-Nucleo development boards are Mbed compatible which makes them ideal boards for developing complex applications in relatively short times.
1.2 Example Microcontroller-Based Control System
In this section we shall see how a microcontroller can be used in a simple control system application. Fig. 1.1 shows a liquid control system where the aim is to control the level of the liquid in the reservoir at a specified point. Water is pumped from the reservoir to the tank using a pump and pipes. In Fig. 1.1 the level of the liquid is controlled manually without using a microcontroller. Here, the person in charge observes the liquid level inside the tank and turns the pump off when the liquid level reaches the required prespecified level.
Fig. 1.1 Manual liquid level control system.
The system shown in Fig. 1.1 is manual and requires constant attention of a person. A simple microcontroller version of this system is shown in Fig. 1.2. Here, the liquid level is read by the microcontroller via a liquid level sensor device. The program running inside the microcontroller compares the actual liquid level with the desired level and then actuates the pump automatically in order to keep the liquid at the desired level. If the liquid inside the tank is low, the microcontroller operates the pump to draw more liquid from the reservoir.
Fig. 1.2 Microcontroller-based liquid level control system.
The system shown in Fig. 1.2 is a very simplified liquid level control system with no user interaction. In a more sophisticated system we may include a keypad to set the desired liquid level and an LCD (liquid crystal display) to see the desired and/or the actual liquid levels in the tank. Fig. 1.3 shows the block diagram of our upgraded system. Notice that here we are using two inputs and two outputs from our microcontroller.
Fig. 1.3 Adding a keypad and an LCD.
We can make our system even more sophisticated as shown in Fig. 1.4 by adding an audible alarm to indicate when the water level is above the desired point. Also, a PC can be interfaced to the microcontroller so that, for example, the actual liquid leve...
Table of contents
Cover image
Title page
Table of Contents
Copyright
About the Author
Preface
Acknowledgments
Chapter 1: Introduction
Chapter 2: Microcontroller-Based Project Development Cycle
Chapter 3: The ARM Microcontrollers
Chapter 4: STM32 Nucleo Development Boards
Chapter 5: The Nucleo-F411RE Development Board
Chapter 6: Architecture of the STM32F411RET6 Microcontroller