当前位置:网站首页>SCM is now overwhelming, a wide variety, so that developers are overwhelmed
SCM is now overwhelming, a wide variety, so that developers are overwhelmed
2022-07-03 09:55:00 【Brother gun plays embedded】
The single chip computer is now overwhelming , A wide variety , It's overwhelming for developers , Development is also quite rapid , From the last century 80 years , By then 4 position 8 Bit development to the present all kinds of high-speed MCU ……

Every manufacturer is also in speed 、 Memory 、 One after another in function , uneven ~~ At the same time, a large number of manufacturers with representative single-chip computers have emerged :Atmel、TI、ST、MicroChip、ARM… Hongjing in China STC The single chip computer is also worth mentioning …
Let's bring you 51、MSP430、TMS、STM32、PIC、AVR、STC The advantages and disadvantages comparison and function embodiment between single chip microcomputer ……
The biggest weakness of single chip microcomputer is the limited computing power , If the encryption requirements are not high , A simple encryption logic can be designed by using a random generator , It is sent after the software completes the calculation in the single chip microcomputer , For example, random numbers can be used to XOR with the content sent , But you need to package and send random numbers , The receiver then reverses the operation in the way of the single chip microcomputer . Design the message format by yourself , Add some simple redundancy verification .

The article is relatively long , More words , You can first open the avatar and pay attention to me , Then take your time ,/// Insert a : At the beginning of this year, I recorded a set of systematic introductory single chip microcomputer tutorial , If you want, just ask me for it. It's free , I can send a private message ~ Click the black font in the lower left corner of my avatar and I can also get it . I've been relatively idle recently , Take me to finish the design , Take students to provincial or above competitions ///
Of course , There must be many defects in the above method , The great God gate doesn't need to clap bricks , Since the subject said “ Simple encryption ”, Let's use it as a reference .
If you want to be more standardized , You can refer to SM4(SM1、2、3 I don't recommend it ), However, as mentioned earlier, the computing power of single chip microcomputer is limited , It is not suitable to implement too complex operations .
STC SCM and STM32 Single chip computers are Haval computer structures that use independent data and address buses to access data and program memory .STC SCM is based on MCS-51 Kernel 8 Bit MCU ,STM32 Is based on Cortex-M3 Kernel 32 Bit MCU .

Both have the core operation processor of the computer integrated in a single chip and peripherals with different functions .STC SCM and STM32 SCM is widely used in China , There's a lot of information , Information for getting started 、 resources 、 Tools and software are relatively rich . These characteristics and reality of these two chips , Determines a very important reality at present : It is necessary for hardware R & D engineers to master and adopt STC SCM and STM32 SCM product development skills .
Ordinary single chip microcomputer and STM32 The difference of stack in SCM
When ordinary single chip microcomputer starts , Don't need to use bootloader Remove the code from the ROM Move to RAM. however STM32 SCM needs .
Here we can first look at the single-chip program execution process , There are three steps for single-chip microcomputer :
Take command
Analysis instructions
Execution instruction
according to PC To read instructions from program memory , Send to instruction register . Then analyze the execution execution . In this way, the single-chip microcomputer will remove code instructions from the internal program memory , from RAM Access to relevant data .

RAM The speed of fetching is much higher than ROM Of , But ordinary single-chip computers run at a low frequency , So from ROM Slow fetching does not affect .
and STM32 Of CPU High frequency of operation , Far greater than from ROM The speed of reading and writing . So we need to use bootloader Remove the code from the ROM Move to RAM.
Using a stack is like eating in a restaurant , Just order ( Issue an application )、 pay 、 And eating ( Use ), When you are full, go , Don't pay attention to cutting vegetables 、 Prepare for dishes and dishes 、 Brush the pot and finish the work , His advantage is fast , But the freedom is small . Using heaps is like making your own favorite dishes , More trouble , But more in line with their own taste , And there's a lot of freedom .
In fact, the stack is some memory units in the single chip microcomputer , These storage units are designated to hold some special information , Like the address ( Protect breakpoints ) And data ( Protection site ).
If you have to add a few characteristics to him, it's :
The contents of these storage units are interrupted during program execution , Some relevant parameters of the accident site . If you don't save these parameters , The single chip computer can't go back to the main program to continue after executing the interrupt function .

The addresses of these storage units are recorded in a stack pointer (SP) The place of .
combination STM32 Development of stack
It can be seen from the above description , How to occupy heap and stack in code . Maybe many people still can't understand , Combine here STM32 Stack related content in the development process of .
Friends interested in MCU can come to me , I recorded some introductory tutorials about MCU , If you need children's shoes, just ask me for them , Free of charge , Private confidence in me “ Miss Lin ” You can take ~ Click to open my avatar to receive
边栏推荐
猜你喜欢

JMX、MBean、MXBean、MBeanServer 入门

In third tier cities and counties, it is difficult to get 10K after graduation

Stm32-hal library learning, using cubemx to generate program framework

一个可执行的二进制文件包含的不仅仅是机器指令

开学实验里要用到mysql,忘记基本的select语句怎么玩啦?补救来啦~

【男保姆式】教你打开第一个微信小程序

Oracle database SQL statement execution plan, statement tracking and optimization instance

MySQL data manipulation language DML common commands

Characteristics of PUCCH formats
![[CSDN]C1训练题解析_第二部分_Web基础](/img/91/72cdea3eb3f61315595330d2c9016d.png)
[CSDN]C1训练题解析_第二部分_Web基础
随机推荐
[CSDN] C1 training problem analysis_ Part II_ Web Foundation
2020-08-23
2.Elment Ui 日期选择器 格式化问题
SSB Introduction (PbCH and DMRs need to be supplemented)
编程思想比任何都重要,不是比谁多会用几个函数而是比程序的理解
Chromium Embedded Framework (CEF) 介绍
03 FastJson 解决循环引用
MySQL的简单使用(增删改查)
MySQL environment variable configuration
Introduction to chromium embedded framework (CEF)
[combinatorics] Introduction to Combinatorics (context of combinatorics | skills of combinatorics | thought of combinatorics 1: one-to-one correspondence)
Gpiof6, 7, 8 configuration
Uniapp realizes global sharing of wechat applet and custom sharing button style
[combinatorics] Introduction to Combinatorics (combinatorial thought 2: mathematical induction | mathematical induction promotion | multiple induction thought)
STM32 external interrupt experiment
IDEA远程断点调试jar包项目
[Li Kou brush question notes (II)] special skills, module breakthroughs, classification and summary of 45 classic questions, and refinement in continuous consolidation
手机都算是单片机的一种,只不过它用的硬件不是51的芯片
JMX、MBean、MXBean、MBeanServer 入门
Quelle langue choisir pour programmer un micro - ordinateur à puce unique