当前位置:网站首页>STC 32-bit 8051 single chip microcomputer development example tutorial three program compilation setting and download
STC 32-bit 8051 single chip microcomputer development example tutorial three program compilation setting and download
2022-07-01 20:00:00 【Bill66】
Here is the end program STC32G Program source code :
/*main.c
Designed by Bill Liu
Version 0.0
Modified last by Bill Liu on 06/22/2022
*/
#include "main.h"
#include "config.h"
void main()
{
STC32G_P7PinsInit(PIN3, BI_IO, 0, 0, 0, 0, 1, 1);
//P73 = 0;
STC32G_P0PinsInit(0xFF, BI_IO, 1, 0, 0, 0, 1, 1); //init to bidirectional I/O, pull up disable, pull down disable , dive ability enhance disable,
//high speed disable, digital singal input enable, schmitt trigger enable
STC32G_P2PinsInit(0xFF, BI_IO, 0, 0, 0, 0, 1, 1);
P0 = 0xAA;
P2 = 0xFF;
//P73 = 0;
while(1)
{
if(P2 == P0)
P73 = 0;
else
P73 = 1;
}
}
//End of main()Keil C251 Of Target Items are set as follows :

L251 Misc The settings are as follows :

Compile the above program , give the result as follows :

modify Keil C251 Of Target Items are set as follows :

Compile the same program , give the result as follows :

There is 4 individual Warnings. Then modify Keil C251 Of Target Item setting modification , as follows :

Compile the same program , give the result as follows :

nothing Warning. Revise Keil C251 Of Target Item settings , as follows :

Compile the same program , give the result as follows :

nothing Warning. Revise Keil C251 Of Target Item settings , as follows :

Compile the same program , give the result as follows :

nothing Warning. Revise Keil C251 Of Target Item settings , as follows :

Compile the same program , give the result as follows :

nothing Warning. Revise Keil C251 Of Target Item settings , as follows :

Compile the same program , give the result as follows :

nothing Warning. Revise Keil C251 Of Target Item settings , as follows :

Compile the same program , give the result as follows :
There is an error . Revise Keil C251 Of Target Item settings , as follows :

Compile the same program , give the result as follows :

Compile successfully , nothing Warning.
As can be seen from the above example , The same procedure , Choose different settings , Without adjusting the optimization level , Compiled program code The size is different . If you choose some, you may make compilation errors .
Now compile and modify the program with the following settings :

The compilation results are as follows :

Will be compiled to get hex file , download To SCM , Normally red LED It should light . The results after downloading are as follows :

Red LED It does light up , Explain that the program is ok . Re change Keil C251 Of Target Item settings , as follows :

compiler , give the result as follows :
Compile and pass , No, Warning. Will be compiled to get hex file , download To SCM , Normally red LED It should light . The results after downloading are as follows :

Red LED Not lit . Explain the program compiled by changing the settings , Not working properly .
STC 32G Series MCU can still be like STC 8 position 8051 Single chip microcomputer can be used ch340 USB Serial port module to achieve ISP Download program . My download tools are as follows :

In general , Don't mind STC 32G Clock setting of single chip microcomputer , Select the required working frequency when downloading STC_ISP The download tool software will automatically set it to automatic frequency tracking mode . The download interface is as follows :
边栏推荐
- js三元表达式复杂条件判断
- tensorflow报错Could not load dynamic library ‘libcudnn.so.8
- Gaussdb (for MySQL):partial result cache, which accelerates the operator by caching intermediate results
- [untitled]
- Arduino stepper library drive 28byj-48 stepper motor test program
- Modsim basic use (Modbus simulator)
- STC 32位8051单片机开发实例教程 三 程序编译设置与下载
- Remove line breaks from MySQL query results
- Mysql查询结果去除换行
- [research materials] Huawei Technology ICT 2021: at the beginning of the "Yuan" year, the industry is "new" -- download attached
猜你喜欢

产品模块化设计的前世今生

Arduino Stepper库驱动28BYJ-48步进电机测试程序
![[untitled]](/img/6c/df2ebb3e39d1e47b8dd74cfdddbb06.gif)
[untitled]

How to turn off the boot auto start software in win11

Realize pyramids through JS (asterisk pyramid, palindrome symmetric digital pyramid)

实例讲解将Graph Explorer搬上JupyterLab

Oracle physical architecture

振弦采集模塊測量振弦傳感器的流程步驟

Detailed configuration of network security "Splunk" in national vocational college skills competition

Procédure de mesure du capteur d'accord vibrant par le module d'acquisition d'accord vibrant
随机推荐
Sum the amount
New window open page -window open
Object creation
新增订单如何防止重复提交
Difference between redo and undo
Problems encountered in installing MySQL in docker Ubuntu container
docker ubuntu容器中安装mysql遇到的问题
Win11暂停更新点不了怎么办?Win11暂停更新是灰色的如何解决?
想得到股票开户的优惠链接,如何得知?在线开户是安全么?
振弦采集模块测量振弦传感器的流程步骤
C # joint Halcon application - Dahua camera acquisition class
Interview questions shared in today's group
【C语言】详解 memset() 函数用法
Technology T3 domestic platform! Successfully equipped with "Yihui domestic real-time system sylixos"
使用 Kibana Timelion 进行时间序列分析
振弦采集模塊測量振弦傳感器的流程步驟
一个程序员如何快速成长
JS ternary expression complex condition judgment
Modsim basic use (Modbus simulator)
Process steps of vibrating wire acquisition module for measuring vibrating wire sensor