Essential Concepts of Microcontroller Terminology

Essential Concepts of Microcontroller Terminology

Bus: Refers to the information transmission line that serves multiple components. In microcomputer systems, various components communicate with each other through the bus. Address Bus (AB): The address bus is unidirectional and is used to transmit address information. The width of the address bus is 16 bits, thus allowing direct addressing of 64K external memory. The lower 8 bits of the address (A0~A7) are provided by the P0 port through an address latch, while the higher 8 bits (A8~A15) are provided directly by the P2 port. Data Bus (DB): Generally bidirectional, it is used for transmitting data information (including actual data and instruction codes) between the CPU and memory, CPU and peripherals, or between peripherals. The data bus width is 8 bits, provided by the P0 port. Control Bus (CB): This refers to all control signals in a computer system, and the control information is transmitted through the control bus. It consists of the second functional state of the P3 port and four independent control lines: RESET, EA, ALE, and PSEN. Memory: Used to store all information in the computer, including programs, raw data, intermediate results of calculations, and final results.

Read-Only Memory (ROM): ROM can only be read and not written to during use. The information in ROM is not lost when power is turned off. Therefore, it is generally used to store fixed programs, such as monitoring programs, subroutines, font libraries, and data tables. ROM can be classified into the following types based on how information is stored: 1. Mask ROM: Also known as fixed ROM, it is programmed by manufacturers and cannot be changed by users, characterized by low cost. 2. Programmable Read-Only Memory (PROM): Its content can be written in one time by the user according to their program. Once written, it can only be read and not changed. This type of memory is now also referred to as OTP (Only Time Programmable). 3. Erasable Programmable Read-Only Memory (EPROM): The first two types of ROM can only be written once, hence they are less commonly used. The currently popular ROM chip is EPROM, as its content can be completely erased by ultraviolet light and rewritten with new programs. 4. Electrically Erasable Programmable Read-Only Memory (EEPROM): EEPROM allows its content to be written and erased electrically, with programming and erasing voltages equal to the microcomputer CPU’s 5V operating voltage, requiring no additional voltage. It combines the ease of read/write operations of RAM with the advantage of data retention during power loss, making it extremely convenient for use. This type of memory is the most widely used today. 5. Random Access Memory (RAM): Also known as read/write memory, it can not only read data stored in memory cells but also write new data at any time, losing the original data after writing. Information in RAM is completely lost when power is turned off, so it is often used to store frequently changing programs or intermediate calculation results. RAM can be classified into static and dynamic types based on how information is stored. ① Static SRAM: Its characteristic is that as long as power is supplied, data can be retained for a long time. ② Dynamic DRAM: Information written can only be retained for several milliseconds, so it must be rewritten periodically to maintain the original information. 6. In-System Programmable Non-Volatile Memory: This type of memory is fundamentally ROM but can rewrite information at any time, functioning similarly to RAM. Therefore, the definitions and classifications of ROM and RAM have gradually lost significance. ① Flash Memory: This type of memory is a non-volatile memory produced based on EPROM and EEPROM technology. It has high integration, lower manufacturing costs than DRAM, and offers the flexibility and fast access speed of SRAM, while retaining information when powered off, leading to rapid development. ② Ferroelectric RAM (FRAM): It utilizes the polarization direction of ferroelectric materials to store data. Its characteristics include high integration, fast read/write speeds, low cost, and short read/write cycles. Clock Cycle: The computer operates in a rhythmic manner under the influence of clock signals. Therefore, a clock generation circuit is necessary, and the period of the clock signal input to the microprocessor is called the clock cycle. Machine Cycle: The time required for the machine to complete an action is called the machine cycle, which generally consists of one or more clock cycles. In the MCS-51 series microcontroller we discussed, one machine cycle consists of 12 clock cycles.

Instruction Cycle: The time required to execute an instruction (e.g., “MOV A, #34H”, which means transferring the immediate value 34H to the microprocessor’s accumulator A) is called the instruction cycle, consisting of one or several machine cycles. The length of the instruction cycle depends on the type of instruction, namely the steps and complexity of the operation the instruction will perform. Assembly: A collection of machine instructions that can accomplish certain tasks. Binary Number: Consists of only two digits, 0 and 1, with a base of two. Hexadecimal Number: Uses 16 digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, where A-F correspond to decimal values 10-15, with a base of 16. Instruction: A description of a basic operation that the computer can execute, which is the fundamental unit of computer software. Byte: Composed of 8 bits of binary data, stored in memory as a unit of bytes. Word: Composed of 2 bytes. Double Word: Composed of 2 words. Two’s Complement: Machine numbers can be represented in different coding systems, and the two’s complement representation is the most commonly used. Positive numbers are represented in sign-magnitude format, meaning the most significant bit is 0, while the remaining bits represent the absolute value of the number; negative numbers are more complex, first writing the two’s complement representation of the corresponding positive number, then inverting each bit, and finally adding 1 to obtain the two’s complement representation of the negative number. Segment Address: The 8086 CPU divides 1MB of memory space into many logical segments, each with a maximum limit of 64KB. The segment address is the starting position of the logical segment in main memory. To represent the segment address with a 16-bit register, the 8086 specifies that segment addresses must be in modulo 16 format, i.e., in xxxx0H form, omitting the lower 4 bits of 0, which allows the segment address to be represented with 16-bit data, usually stored in a 16-bit segment register. Offset Address: The distance from the storage unit to the segment starting position is called the offset address. Since each segment is limited to 64KB, the offset address can also be represented with 16-bit data. Physical Address: In a 1MB memory, each storage unit has a unique 20-bit address known as its physical address. The physical address is formed by left-shifting the segment address by 4 bits and adding the offset address. Code Segment: When programmers compile programs, they must divide memory into segments. The code segment is used to store the sequence of program instructions, and its segment address is stored in CS, while the instruction pointer register IP indicates the offset address of the instruction in the code segment. The processor uses CS:IP to fetch the next instruction to be executed. Data Segment: The data segment stores the data used by the currently running program, and its segment address is stored in DS. Extra Segment: The extra segment is an additional data segment also used for data storage. Additionally, string operation instructions use the extra segment as the storage area for their destination operands. The segment address of the extra segment is stored in ES. Stack Segment: The stack segment is the main memory area where the stack resides, and its segment address is stored in SS. The stack pointer register SP indicates the offset address of the top of the stack, and the processor uses SS:SP to operate on data in the stack. Stack: The stack is a “last in, first out” area of main memory located in the stack segment, recorded by the SS segment register. It has only one entry and exit point, which is the current top of the stack, the lower end (low end) with the smaller address, specified by the stack pointer register SP. The stack has two basic operations, corresponding to two basic instructions: push instruction PUSH and pop instruction POP. Pseudoinstruction: The statements in assembly language programs, besides instructions, also include pseudoinstructions and macro instructions. Pseudoinstructions, also known as pseudo-operations, are not executed by the computer during program runtime like machine instructions; instead, they are processed by the assembler during the assembly of the source program, completing tasks such as data definition, memory allocation, and program termination. Macro Instruction: A macro is a segment of program code with independent functionality defined once in the source program and can be called multiple times. When called, only a macro instruction statement is needed. Macro instructions are user-defined instructions that replace frequently used functions with a single macro instruction. Subroutine: A subroutine, also known as a procedure, is equivalent to procedures and functions in high-level languages. In different parts of a program, similar segments may need to be used, which have the same functionality and structure but differ in some variable assignments. These segments can be written in the form of subroutines for easy calling when needed; certain commonly used specific function segments can also be compiled into subroutine forms for user use. Interrupt: An interrupt is an operation that causes the CPU to suspend the currently executing program to handle special events. Events that trigger interrupts are called interrupt sources, which may be input/output requests from peripherals or some exceptions or other internal reasons within the computer. Interrupt Service Routine: When an interrupt occurs, the processor suspends the currently running program and transfers to a program segment that handles special events. This subroutine that processes the interrupt is called the interrupt service routine, also known as the interrupt handler. The entry address of the interrupt service routine is arranged in the interrupt vector table. BIOS Interrupt: In the memory system, the 8K ROM starting from address 0FE000H contains the BIOS (Basic Input/Output System) routines. The basic input/output program BIOS, residing in ROM, provides functions such as system power-on self-test, boot loading, handling of major I/O device routines, and interface control to manage all system interrupts. BIOS interrupts greatly facilitate programming for programmers, who do not need to understand the characteristics of hardware I/O interfaces but can directly set parameters using instructions and then call the programs in BIOS through interrupts. Temporary Register: Used to temporarily store operands sent by the data bus or general registers and treat them as another operand. Interrupt: An interrupt is an internal mechanism for microcontrollers to process internal or external events in real-time. When an internal or external event occurs, the microcontroller’s interrupt system forces the CPU to pause the currently executing program to handle the interrupt event. After the interrupt is processed, it returns to the point where the program was interrupted and continues execution. Power Failure Protection: Refers to quickly using a backup DC power supply when the normal power supply fails, ensuring that information is not lost for a period of time. When the main power supply is restored, it automatically switches back to the main power supply. Register Addressing: The operand is in a register, selected by the value of the three bits rrr in the instruction opcode and the status of RS1 and RS0 in the PSW, to choose a specific register in a working register area for the corresponding instruction operation. Baud Rate: Refers to the number of bits transmitted per second. The higher the baud rate, the faster the data transmission speed. D/A Conversion: Refers to converting binary quantities into current or voltage signals proportional to their values. A/D Conversion: Refers to converting analog quantities into corresponding digital quantities for processing by the computer. Serial Mode: Refers to transmitting each bit of data in time-sharing, requiring only one data line, one common signal ground line, and several control signal lines. Parallel Mode: Refers to transmitting each bit of data simultaneously, requiring a transmission line for each data bit. Pseudoinstruction: Used to instruct the assembler on how to assemble; it neither controls the machine’s operation nor is assembled into machine code, but is recognized by the assembler to guide the assembly process. SLEEP MODE: A mode that ensures the internal operation of the program while suspending external transmissions and other actions. Linking: The process of merging compiled *.obj files with other *.obj files into a machine-readable machine file. I2C: A serial transmission method where input and output share a transmission line, while the clock is controlled by another line. SFR (Special Function Register Area): The 8051 microcontroller centralizes special registers, parallel port latches, serial ports, and control registers within timers/counters into an area distributed across addresses from 80H to FFH, known as the SFR.

(Source: Mastering Microcontrollers)

Essential Concepts of Microcontroller Terminology

This edition edited by: zeng

Editor: Electronics Department Student Media Office

Leave a Comment