Arithmetic unit of single chip microcomputer system

Publisher:CelestialGardenLatest update time:2017-12-21 Source: eefocus Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

  The 8051 chip has a CPU, i.e. a controller, and an arithmetic unit.

  It also includes 128 bytes of on-chip data memory RAM, which is used to store readable and writable data, such as intermediate calculation results, final results, and data to be displayed.

  The on-chip program memory is 4KB, which is used to store tables, some raw data and tables.

  Four 8-bit parallel input and output interfaces P0-P3, each port can be used as input or output.

  Two timers, each timer counter can be set to count mode, used to count external events, or set to timing mode, and can realize computer control according to the counting or timing results.

  Interrupt control system with five interrupt sources.

  A full-duplex UART serial IO port can realize serial communication between MCU and other microcomputers.

  The oscillator and clock generation circuit are built-in, but the quartz crystal and fine-tuning capacitor need to be connected externally, and the maximum allowable oscillation frequency is 24 MHz.

  The above parts are connected through the internal system, and the system bus includes the data bus, the low 8-bit address bus, the high 8-bit address bus and the control bus.

  The following are the components of 8051:

  The arithmetic unit consists of several parts, such as the arithmetic logic unit ALU, the accumulator and the register. The function of the ALU is to perform arithmetic or logical operations on the data transmitted to the microprocessor. The ALU has two main input sources, one from the accumulator and the other from the data register.

  ALU can add or subtract the two input data, and can also perform certain logical operations. The different operations performed by ALU are determined by the information on different control lines.

  Usually, the ALU receives two groups of 8-bit binary numbers from register 1 and register 2. Because some operations are to be performed on these data, the two input data are called operands. The ALU can perform operations such as addition, subtraction, AND, OR, and size comparison on the two operands, and finally store the result in the accumulator.

  For example, when adding two numbers 12 and 31, the operand 12 is placed in one register and 31 is placed in another register before the addition. The control line that performs the addition operation sends an addition signal, and the ALU adds the two numbers and stores the result 43 in the accumulator, replacing the number previously stored in the accumulator. In short, the arithmetic unit has two main functions:

  1. Perform various arithmetic operations;

    2. Perform various logical operations and perform logical tests, such as zero value testing or comparison of two values. Usually, an arithmetic operation produces an operation result, while a logical operation produces a judgment.


Reference address:Arithmetic unit of single chip microcomputer system

Previous article:Talk about the RETI instruction of 51 single chip microcomputer
Next article:MCU system resources—instruction register, instruction decoder

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号