Home  >  Article  >  Is stm32 and 51 programming the same?

Is stm32 and 51 programming the same?

(*-*)浩
(*-*)浩Original
2019-06-12 09:14:0015218browse

51 MCU core, using 8bit, CISC architecture, from INTEL.

STM32 core, using 32bit, RISC architecture, comes from ARM.

Is stm32 and 51 programming the same?

Compared with the 51 microcontroller, stm32 has high code efficiency (32 bits contain a large amount of information, most instructions can be completed in one byte) and fast execution speed (the 72MHz system clock is not a cover) ), powerful functions (rich peripherals, many pins, and remappable pin functions), and many advantages. (Recommended learning: PHP video tutorial)

Differences in programming:

stm32STM32 basically does not choose assembly language, because engineering The amount is huge, there are too many registers, and there are many bits, and the 51 microcontroller mostly uses assembly language. As for C language programming, the difference is not big.

The difference in C language programming is not big. Moreover, stm32 has excellent technical support in China, rich information (the key is that not only E-text, but also Chinese information has been translated), and there is a complete library. Function support, switching from 51 is not too difficult. There are 51 similar circuit programs. Many of them do not need to be modified if transplanted. They only modify the registers, IO ports, interrupts, etc. The software process and control logic basically do not need to be changed.

The main differences are as follows:

Library functions:

ST manufacturer has provided a rich function library, use the library directly Functions can basically do everything, saving time and effort.

Speed:

STM32 main frequency is 72MHZ, flying speed. Basically, there is no need to consider the issue of processing power. No matter how clumsy your algorithm is, STM32 will execute it for you in an instant.

Pin:

The address latch and 3-8 decoder required for 51 programming are no longer needed on STM32. STM32 has sufficient IO interface.

Peripherals:

STM32 has 3 serial ports, 2 SPI, 3 CAN, two USB, and n Timers. The 51 microcontroller basically has no peripherals.

For more PHP related technical articles, please visit the PHP Graphic Tutorial column to learn!

The above is the detailed content of Is stm32 and 51 programming the same?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn