Digital Arithmetic and Conversions
E.1 Microcontroller Arithmetic
Microcontrollers are not designed for intensive numeric processing; therefore, they are not equipped with many arithmetic operators usually found in microprocessors. A typical mid-range microcontroller has instructions to add and subtract integers and perhaps to increment and decrement. Hardware multiplication is rarely available and even more rare is division. Likewise, there is usually no hardware support for decimal and floating-point arithmetic. For this reason the microcontroller programmer is often challenged to provide most arithmetic and data processing operations in software.
In this discussion we assume a mid-range microcontroller, such as the PIC 16f8x. These ...
Get Embedded Systems Circuits and Programming now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.