MicroPython is a reimplementation of the Python programming language that targets
microcontrollers and embedded systems.
Microcontrollers are computers shrunk onto a single, very small chip. Embedded systems
are computers that function within a larger mechanical or electrical system.
Embedded systems often use microcontrollers.
This book introduces, explores, and explains MicroPython through four typical yet
different devices,1 all of which have a microcontroller at their core.
Such devices are very different to other sorts of computer. Most computers contain
lots of parts: memory, storage, and processing are physically separate components
containing various specialist chips. They may also contain additional parts for sound,
graphics, and networking capabilities. Such computers are significantly more powerful
than the resource-constrained, microcontroller-based devices used in this book.
Internet of Things (IOT) solutions are not nearly as complicated as the name may seem
to indicate. Indeed, the IOT is largely another name for what we have already been doing.
You may have heard of “connected devices” or “Internet-ready” or even “cloud-enabled.”
All of these refer to the same thing — be it a single device such as a toaster or a plant
monitor or a complex, multidevice product like home automation solutions. They all
share one thing in common: they can be accessed via the Internet to either display data
or interact with the devices directly. The trick is applying knowledge of technologies
to leverage them to the best advantages for your IOT solution. In this book, we explore
how to build IOT solutions using an easy-to-understand programming language named
MicroPython running on small, dedicated microcontroller boards.
The Raspberry Pi is amazing at two levels—the advanced functionality that
you get in a credit card-sized SBC (Single Board Computer) and its price.
Even with today’s Pi competitors, the Raspberry Pi reigns supreme because
few can beat its price. Further, it enjoys great software and community
support.
Price is an important advantage of the Pi that competitors don’t
always appreciate. Hobbyists and makers are applying the Pi in new and
sometimes risky ways. Someone starting out doesn’t want to lose their
SBC because of a rookie mistake. At the low Pi price point, the loss can be
absorbed without losing heart. Imagine a student buying an Intel Joule1
(when it was offered) for $349 USD and toasting it by accident. That would
be enough to make most people give up right there! Price allows everyone
to proceed fearlessly in their learning.
The fundamental difference between analog and digital
is ‘‘information.’’ With digital information the output is
always the same: a set of ones and zeros that represents
the information. This information is independent of the
supply voltages or the circuitry that is used to generate it.
With analog, the output information is basic electrical
values—volts, current, charge—and is always related to
some real world parameters.With analog, the methodology
used to arrive at the answers is intrinsic to the quality of
those answers. Errors such as temperature, noise, delay and
time stability can all affect the analog output and all are a
function of the circuitry that generates the output. It is this
analog output that is difficult to derive and requires experience
and circuit design talent.
During the last decades much has been prophesized that there will be little need
for analog circuitry in the future because digital electronics is taking over. Far from
having proven true, this contention has provoked controversial rebuttals, as epitomized
by statements such as “If you cannot do it in digital, it’s got to be done in
analog.” Add to this the common misconception that analog design, compared to
digital design, seems to be more of a whimsical art than a systematic science, and
what is the confused student to make of this controversy? Is it worth pursuing some
coursework in analog electronics, or is it better to focus just on digital?
When I submitted proposals to publishers for the first edition of this book, they posed two questions to
me: (1) What is the future demand for analog books in a digital world? and (2) Is it wise to publish a book
dealing solely with CMOS? The words “analog” and “CMOS” in the book’s title were both in question.
Fortunately, the book resonated with students, instructors, and engineers. It has been adopted by
hundreds of universities around the world, translated to five languages, and cited 6,500 times.
While many fundamentals of analog design have not changed since the first edition was introduced,
several factors have called for a second: migration of CMOS technologies to finer geometries and lower
supply voltages, new approaches to analysis and design, and the need for more detailed treatments of
some topics. This edition provides:
• Greater emphasis on modern CMOS technology, culminating in a new chapter, Chapter 11, on
design methodologies and step-by-step op amp design in nanometer processes
• Extensive study of feedback through the approaches by Bode and Middlebrook
• A new section on the analysis of stability using Nyquist’s approach—as the oft-used Bode method
falls short in some common systems
• Study of FinFETs
• Sidebars highlighting important points in nanometer design
• A new section on biasing techniques
• Study of low-voltage bandgap circuits
• More than 100 new examples
Some instructors ask why we begin with square-law devices. This is for two reasons: (1) such a path
serves as an intuitive entry point and provides considerable value in the analysis of amplifiers in terms of
allowable voltage swings, and (2) despite their very short channel lengths, FinFETs—the devices used
in 16-nm nodes and below—exhibit nearly square-law characteristics.
This book is accompanied with a solutions manual and a new set of PowerPoint slides, available at
www.mhhe.com/razavi.
Microcontrollers are computers on a chip. When they power up they start running a program
from internal program memory, also called ROM for read only memory, or Flash.
Microcomputers are found in appliances, toys, automobiles, and computer peripherals, such
as a keyboard or mouse, and are finding their way in as support electronics for almost everything
electronic from battery chargers to RADAR systems.
The Microchip PIC® microcontrollers have become the most popular choice for new designs
based on their high speed, of up to 70 million instructions per second as of this writing; low
cost, some under $1; and large number of interfaces like USB, Ethernet, and analog signals.
This book was written for anyone interested in learning more about the Arduino and robotics in general.
Though some projects are geared toward college students and adults, several early chapters cover
robotics projects suitable for middle-school to high-school students. I will not, however, place an age
restriction on the material in this book, since I have seen some absolutely awesome projects created by
makers both young and old.
PostgreSQL bills itself as the world’s most advanced open source database. We
couldn’t agree more.
What we hope to accomplish in this book is to give you a firm grounding in the concepts
and features that make PostgreSQL so impressive. Along the way, we should
convince you that PostgreSQL does indeed stand up to its claim to fame. Because the
database is advanced, no book short of the 3500 pages of documentation can bring
out all its glory. But then again, most users don’t need to delve into the most abstruse
features that PostgreSQL has to offer. So in our shorter 300-pager, we hope to get you,
as the subtitle proclaims, Up and Running.
Each topic is presented with some context so you understand when to use it and what
it offers. We assume you have prior experience with some other database so that we
can jump right to the key points of PostgreSQL. We generously litter the pages of this
book with links to references so you can dig deeper into topics of interest. These links
lead to sections in the manual, to helpful articles, to blog posts of PostgreSQL vanguards.
We also link to our own site at Postgres OnLine Journal, where we have collected
many pieces that we have written on PostgreSQL and its interoperability with
other applications.
This book focuses on PostgreSQL versions 9.5, 9.6, and 10, but we will cover some
unique and advanced features that are also present in prior versions
Programming and Interfacing ATMEL AVR Microcontrollers introduces you to ATMEL’s
AVR microprocessors—the same chip used in the Arduino. You’ll learn how to use the
AVR to interact with devices such as motors, LCD screens, GPS sensors, touch pads,
temperature sensors, accelerometers, distance sensors, and other interesting hardware.
Other topics covered include analog to digital conversion, digital I/O, interrupts, serial
peripheral interface, and serial communications.