ARM-based Microcontroller Projects Using mbed
5/5
()
About this ebook
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
Dogan Ibrahim
Dogan Ibrahim graduated from the University of Salford with First Class Honours in Electronic Engineering. He then completed an MSc course in Automatic Control Engineering at the University of Manchester, and PhD in Digital Signal Processing at the City University in London. Prof Ibrahim worked at several companies and gained industrial experience before returning to the academic life. Prof Ibrahim is currently a Fellow of the IET, and a Chartered Electrical Engineer. His interests are in the fields of microcontroller based automatic control, digital signal processing, and computer aided design. Dogan Ibrahim has been a lecturer at South Bank University, London, and Principal Research Engineer at GEC Hirst Research Centre. Prof Ibrahim is the author of over 70 technical books in the fields of microcontrollers and electronic engineering. He is currently a systems consultant, carrying out consultancy work to various firms in London.
Read more from Dogan Ibrahim
ARM-Based Microcontroller Multitasking Projects: Using the FreeRTOS Multitasking Kernel Rating: 5 out of 5 stars5/5PIC Microcontroller Projects in C: Basic to Advanced Rating: 5 out of 5 stars5/5Microcontroller Projects in C for the 8051 Rating: 5 out of 5 stars5/5Advanced PIC Microcontroller Projects in C: From USB to RTOS with the PIC 18F Series Rating: 5 out of 5 stars5/5Designing Embedded Systems with 32-Bit PIC Microcontrollers and MikroC Rating: 5 out of 5 stars5/5PIC Basic Projects: 30 Projects using PIC BASIC and PIC BASIC PRO Rating: 1 out of 5 stars1/5PIC32 Microcontrollers and the Digilent Chipkit: Introductory to Advanced Projects Rating: 5 out of 5 stars5/5PIC BASIC: Programming and Projects Rating: 3 out of 5 stars3/5Microcontroller-Based Temperature Monitoring and Control Rating: 4 out of 5 stars4/5SD Card Projects Using the PIC Microcontroller Rating: 0 out of 5 stars0 ratings
Related to ARM-based Microcontroller Projects Using mbed
Related ebooks
The Designer's Guide to the Cortex-M Processor Family: A Tutorial Approach Rating: 5 out of 5 stars5/5PIC32 Microcontrollers and the Digilent Chipkit: Introductory to Advanced Projects Rating: 5 out of 5 stars5/5Fast and Effective Embedded Systems Design: Applying the ARM mbed Rating: 5 out of 5 stars5/5Real-Time Embedded Systems: Design Principles and Engineering Practices Rating: 4 out of 5 stars4/5Embedded Computing and Mechatronics with the PIC32 Microcontroller Rating: 5 out of 5 stars5/5Embedded C Programming: Techniques and Applications of C and PIC MCUS Rating: 3 out of 5 stars3/5Programming 8-bit PIC Microcontrollers in C: with Interactive Hardware Simulation Rating: 3 out of 5 stars3/5Programming 16-Bit PIC Microcontrollers in C: Learning to Fly the PIC 24 Rating: 4 out of 5 stars4/5Design Recipes for FPGAs: Using Verilog and VHDL Rating: 2 out of 5 stars2/5The Definitive Guide to the ARM Cortex-M3 Rating: 4 out of 5 stars4/5PIC Projects and Applications using C: A Project-based Approach Rating: 4 out of 5 stars4/5Interfacing PIC Microcontrollers: Embedded Design by Interactive Simulation Rating: 0 out of 5 stars0 ratingsModern Assembly Language Programming with the ARM Processor Rating: 0 out of 5 stars0 ratingsSoftware Engineering for Embedded Systems: Methods, Practical Techniques, and Applications Rating: 3 out of 5 stars3/5Embedded Systems Architecture: A Comprehensive Guide for Engineers and Programmers Rating: 5 out of 5 stars5/5The Art of Assembly Language Programming Using PIC® Technology: Core Fundamentals Rating: 0 out of 5 stars0 ratingsDesigning Embedded Systems with PIC Microcontrollers: Principles and Applications Rating: 2 out of 5 stars2/5Digital Video Processing for Engineers: A Foundation for Embedded Systems Design Rating: 0 out of 5 stars0 ratingsC Programming for the Pc the Mac and the Arduino Microcontroller System Rating: 0 out of 5 stars0 ratingsPIC Microcontrollers: An Introduction to Microelectronics Rating: 5 out of 5 stars5/5Analog Electronics: Circuits, Systems and Signal Processing Rating: 0 out of 5 stars0 ratingsESP32 Programming for the Internet of Things: JavaScript, AJAX, MQTT and WebSockets Solutions Rating: 5 out of 5 stars5/5Practical Design and Application of Model Predictive Control: MPC for MATLAB® and Simulink® Users Rating: 3 out of 5 stars3/5Analog Design and Simulation Using OrCAD Capture and PSpice Rating: 0 out of 5 stars0 ratingsReal-Time Systems Development Rating: 0 out of 5 stars0 ratingsDSP for Embedded and Real-Time Systems Rating: 5 out of 5 stars5/5Programming Microcontrollers in C Rating: 5 out of 5 stars5/5ARM® Cortex® M4 Cookbook Rating: 4 out of 5 stars4/5Programming with STM32: Getting Started with the Nucleo Board and C/C++ Rating: 3 out of 5 stars3/5GNU/Linux Rapid Embedded Programming Rating: 0 out of 5 stars0 ratings
Computers For You
The Insider's Guide to Technical Writing Rating: 0 out of 5 stars0 ratingsMastering ChatGPT: 21 Prompts Templates for Effortless Writing Rating: 5 out of 5 stars5/5SQL QuickStart Guide: The Simplified Beginner's Guide to Managing, Analyzing, and Manipulating Data With SQL Rating: 4 out of 5 stars4/5CompTIA Security+ Get Certified Get Ahead: SY0-701 Study Guide Rating: 5 out of 5 stars5/5Creating Online Courses with ChatGPT | A Step-by-Step Guide with Prompt Templates Rating: 4 out of 5 stars4/5Artificial Intelligence: The Complete Beginner’s Guide to the Future of A.I. Rating: 4 out of 5 stars4/5Deep Search: How to Explore the Internet More Effectively Rating: 5 out of 5 stars5/5How to Create Cpn Numbers the Right way: A Step by Step Guide to Creating cpn Numbers Legally Rating: 4 out of 5 stars4/5Grokking Algorithms: An illustrated guide for programmers and other curious people Rating: 4 out of 5 stars4/5CompTIA IT Fundamentals (ITF+) Study Guide: Exam FC0-U61 Rating: 0 out of 5 stars0 ratingsThe ChatGPT Millionaire Handbook: Make Money Online With the Power of AI Technology Rating: 0 out of 5 stars0 ratingsElon Musk Rating: 4 out of 5 stars4/5Procreate for Beginners: Introduction to Procreate for Drawing and Illustrating on the iPad Rating: 0 out of 5 stars0 ratingsRemote/WebCam Notarization : Basic Understanding Rating: 3 out of 5 stars3/5CompTIA Security+ Practice Questions Rating: 2 out of 5 stars2/5Network+ Study Guide & Practice Exams Rating: 4 out of 5 stars4/5Ultimate Guide to Mastering Command Blocks!: Minecraft Keys to Unlocking Secret Commands Rating: 5 out of 5 stars5/5Mindhacker: 60 Tips, Tricks, and Games to Take Your Mind to the Next Level Rating: 4 out of 5 stars4/5The Professional Voiceover Handbook: Voiceover training, #1 Rating: 5 out of 5 stars5/5Slenderman: Online Obsession, Mental Illness, and the Violent Crime of Two Midwestern Girls Rating: 4 out of 5 stars4/5The Invisible Rainbow: A History of Electricity and Life Rating: 4 out of 5 stars4/5Everybody Lies: Big Data, New Data, and What the Internet Can Tell Us About Who We Really Are Rating: 4 out of 5 stars4/5
Reviews for ARM-based Microcontroller Projects Using mbed
2 ratings0 reviews
Book preview
ARM-based Microcontroller Projects Using mbed - Dogan Ibrahim
book.
Chapter 1
Introduction
Abstract
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 levels can be sent to the PC at regular intervals and graphs of liquid level variations can be plotted on the PC between the required