当前位置:网站首页>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 :
边栏推荐
- HLS4ML进入方法
- 较真儿学源码系列-InheritableThreadLocal(逐行源码带你分析作者思路)
- 通过js实现金字塔(星号金字塔,回文对称数字金字塔)
- Servlet knowledge points
- 开发那些事儿:EasyCVR平台添加播放地址鉴权功能
- [Blue Bridge Cup web] analysis of the real topic of the 13th Blue Bridge Cup web university group match in 2022
- [research materials] national second-hand housing market monthly report January 2022 - Download attached
- SQL 入门计划-1-选择
- New window open page -window open
- 【C语言】详解 memset() 函数用法
猜你喜欢
Gaussdb (for MySQL):partial result cache, which accelerates the operator by caching intermediate results
1592 example 1 King (sgu223 loj10170 luogu1896 increase + / provincial election -) violent thinking pressure DP 01 Backpack
Related concepts of cookies and sessions
今日群里分享的面试题
漏洞复现-.Net-ueditor上传
再回顾集合容器
振弦采集模块测量振弦传感器的流程步骤
Arduino Stepper库驱动28BYJ-48步进电机测试程序
Easycvr accesses the equipment through the national standard gb28181 protocol. What is the reason for the automatic streaming of the equipment?
Interesting! Database is also serverless!
随机推荐
开发那些事儿:EasyCVR集群设备管理页面功能展示优化
JS的Proxy
JVM memory model
P2433 [deep foundation 1-2] primary school mathematics n in one
DS transunet: Dual Swing transformer u-net for medical image segmentation
Time series analysis using kibana timelion
#yyds干货盘点#SQL聚合查询方法总结
How to use console Log print text?
Arduino stepper library drive 28byj-48 stepper motor test program
Wechat applet realizes keyword highlighting
Interesting! Database is also serverless!
ModSim基本使用(Modbus模拟器)
The large list set is divided into multiple small list sets in equal proportion
GC garbage collection
Leetcode 1380 lucky numbers in matrix [array] the leetcode path of heroding
windows环境 redis安装和启动(后台启动)
HLS4ML进入方法
[research data] observation on the differences of health preservation concepts among people in 2022 - Download attached
Flask 常用组件
docker ubuntu容器中安装mysql遇到的问题