1.4 Microcontroller Architectures

Two types of architectures are conventional in microcontrollers (see Figure 1.4). Von Neumann architecture, used by a large percentage of microcontrollers, places all memory space on the same bus; instruction and data also use the same bus.

Figure 1.4: Von Neumann and Harvard architectures

In Harvard architecture (used by PIC microcontrollers), code and data are on separate buses, which allows them to be fetched simultaneously, resulting in an improved performance.

1.4.1 RISC and CISC

RISC (reduced instruction set computer) and CISC (complex instruction computer) refer to the instruction set of a microcontroller. In an 8-bit RISC microcontroller, data is 8 bits wide but the instruction words are more than 8 bits wide (usually 12, 14, or 16 bits) and the instructions occupy one word in the program memory. Thus the instructions are fetched and executed in one cycle, which improves performance.

In a CISC microcontroller, both data and instructions are 8 bits wide. CISC microcontrollers usually have over two hundred instructions. Data and code are on the same bus and cannot be fetched simultaneously.

1.5 Number Systems

To use a microprocessor or microcontroller efficiently requires a working knowledge of binary, decimal, and hexadecimal numbering systems. This section provides background information about these numbering systems for readers who are unfamiliar with them or do not know how to convert from one number system to another. Number systems are classified according to their bases. The numbering system used in everyday life is base 10, or the decimal number system. The numbering system most commonly used in microprocessor and microcontroller applications is base 16, or hexadecimal. Base 2, or binary, and base 8, or octal, number systems are also used.



16 из 499