Chapter 2: Fundamental Concepts
Embedded
Systems - Shape
The World
Jonathan
Valvano
and Ramesh Yerraballi
As part of the edX online class, we made some interactive web pages to illustrate fundamental concepts
2. Fundamental Concepts | Number conversions |
5. Introduction to C | Flowcharts, C vs assembly |
6. Microcontroller Ports | Input/output, direction register |
7. Design and Development | Successive refinement, if-then, loops |
10. Finite State Machines | Vending machine and stepper motor |
11. UART Serial Interface | Blind, busy-wait, interrupt, serial port |
12. Interrupts | Mail box, context switch |
13. DAC and Sound | Sampling rate, precision, how a DAC works |
14. ADC and Data Acquisition | How an ADC works, Nyquist Theorem |
You have already learned how to convert from a binary number to its decimal representation. All you need to do is to calculate its value by multiplying each coefficient by its placeholder values and summing all of them together. If you want to practice, first think of an 8-digit binary number, and next type into the box from 1 to 8 binary digits. Try to calculate the decimal representation in your head. Then click "convert" to check your result.
You have already learned how to convert from a hexadecimal number to its decimal representation. All you need to do is to calculate its value by multiplying each coefficient by its placeholder values and summing all of them together. If you want to practice, Choose an 4-digit hexadecimal number number. Try to calculate the decimal representation. Then type the number in the following field and click "convert" to check your result.
There are a few techniques for converting decimal numbers to binaries. One of them is consecutive divisions. We start by dividing the decimal number by 2. Then we iteratively divide the result (the quotient) by 2 until the answer is 0. The equivalent binary is formed by the remainders of the divisions. The last remainder found is the most significant digit. Enter a number between 0 and 255 in the following field and click convert to see an example. Try to convert a decimal number to binary.
The computer does not distinguish between signed and unsigned numbers in memory. The interpretation is yours to make. Enter an 8-bit binary number in the following field and press "show" to see its value if interpreted as signed or unsigned integer. For convenience, you can also enter hexadecimal input with '0x' prefix.
Reprinted with approval from Embedded Systems: Introduction to ARM Cortex-M Microcontrollers, 2016, ISBN: 978-1477508992, http://users.ece.utexas.edu/~valvano/arm/outline1.htm