- 博客(22)
- 资源 (3)
- 收藏
- 关注
原创 用ch340烧录stm32
我用的是stm32f103c8t6最小系统板首先用下载器USB_TTL连接stm32,如图然后把最小系统上的短接帽如图插好,boot0置1,boot1置0。这样就进入了下载模式。然后打开软件FlyMcu。如果没有的话点这下载提取码:azxy打开后如下设置:1、搜索串口,找到usb-ttl对应con的串口2、选择搜索到的串口3、波特率一般默认为1152004、点击…,选择你要下载的hex文件5、编程后执行打勾6、选择不使用RTS和DTR然后点击开始编程,出开始连接后,按下复位键。
2022-06-04 15:24:15
10586
5
原创 蓝桥杯单片机第六届国赛(智能物料传送系统)
先看题目。全部文件:提取码:azxymain.c#include "stc15f2k60s2.h"#include "intrins.h"#include "iic.h"typedef unsigned char u8;typedef unsigned int u16;sbit TX=P1^0;//超声波发射sbit RX=P1^1;//超声波接收u8 code duan[12]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x9
2022-05-11 23:43:37
1042
原创 蓝桥杯单片机国赛第三届(超级详细注释)
直接看题目先。全部程序:提取码:azxy#include "STC15F2K60S2.h"#include "intrins.h"#include "ds1302.h" #include "iic.h"typedef unsigned char u8;typedef unsigned int u16;sbit TX=P1^0;//超声波发射引脚sbit RX=P1^1;//超声波接收引脚sbit H1=P3^0;sbit H2=P3^1;sbit H3=P3^2;sbi
2022-05-06 20:59:17
1071
4
原创 蓝桥杯万能模板
此模板包括锁存器选择,数码管显示,独立按键,矩阵按键,ne555,pcf8591,eeprom,ds18b20,ds1302。每个模块都能使用,记住此模板轻松拿省奖。全部文件:提取码:azxy#include "stc15f2k60s2.h"#include "onewire.h"#include "iic.h"#include "ds1302.h"typedef unsigned char u8;typedef unsigned int u16;u8 code duan[12]={0xc
2022-04-07 20:59:45
772
4
原创 蓝桥杯eeprom读写和储存上电次数
图片中前面两位数由按下S5加一,按下S4减一,最后按下S6储存在eeprom中,不按不储存。而图片后面两位数是自动储存上电次数,每上电加一,按下S7清零。main.c文件#include "stc15f2k60s2.h"#include "iic.h"typedef unsigned char u8;typedef unsigned int u16;u8 code duan[12]={0xc0,0xf9,0xa4,0xb0,0x99,0x92, 0x82,0xf8,0x80,0x9
2022-04-04 15:22:30
1306
原创 蓝桥杯pcf8591读和写
读取的是通道3,通过电位器2调节电压。然后输出的是5V电压,用万能表测量。main.c文件#include "stc15f2k60s2.h"#include "iic.h"typedef unsigned char u8;typedef unsigned int u16;u8 code duan[12]={0xc0,0xf9,0xa4,0xb0,0x99,0x92, 0x82,0xf8,0x80,0x90,0xff,0xbf};u16 Rb2=0;void delay(u
2022-04-03 20:52:40
391
原创 蓝桥杯ds1302时分秒显示
这次我只让它显示时分秒,如果有需要显示年月日的,自行修改。main.c文件#include "stc15f2k60s2.h"#include "ds1302.h"typedef unsigned char u8;typedef unsigned int u16;u8 code duan[12]={0xc0,0xf9,0xa4,0xb0,0x99,0x92, 0x82,0xf8,0x80,0x90,0xff,0xbf};extern unsigned char time[3].
2022-04-03 20:09:05
652
原创 蓝桥杯ds18b20显示小数和整数
main.c文件#include "stc15f2k60s2.h"#include "onewire.h"typedef unsigned char u8;typedef unsigned int u16;u8 code duan[12]={0xc0,0xf9,0xa4,0xb0,0x99,0x92, 0x82,0xf8,0x80,0x90,0xff,0xbf};u16 temp=0;void delay(u16 i){ while(i--);}void Chan_h.
2022-04-03 19:50:32
3576
7
原创 蓝桥杯单片机第五届模拟题(模拟灌溉)
全部文件:提取码:azxy#include "STC15F2K60S2.h"#include "ds1302.h"#include "iic.h"typedef unsigned char u8;typedef unsigned int u16;sbit S4=P3^3;sbit S5=P3^2;sbit S6=P3^1;sbit S7=P3^0;u8 code duan[15]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90
2022-03-24 15:27:34
672
2
原创 蓝桥杯单片机第五届
全部文件:提取码:azxy这一届我感觉的难点应该是温度设置时的按键处理吧。不过每个人的理解不一样,难点感觉也不一样。还是直接看题目吧。#include "stc15f2k60s2.h"#include "onewire.h"typedef unsigned char u8;typedef unsigned int u16;sbit H1=P3^0;sbit H2=P3^1;sbit H3=P3^2;sbit H4=P3^3;sbit L1=P4^4;sbit L2=P4^2;
2022-03-16 16:46:12
1642
原创 蓝桥杯单片机第四届
全部文件:提取码:azxy这一届太简单了,没啥好说的,直接看题目吧。#include<STC15F2K60S2.h>#include"intrins.h"#include "iic.h"typedef unsigned char u8;typedef unsigned int u16;sbit S7=P3^0;sbit S6=P3^1;u8 code duan[15]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90,0
2022-03-14 22:54:06
615
原创 蓝桥杯单片机第六届
全部文件:提取码:azxy直接看题目吧。我感觉这一届的主要考点是如何用定时器读取10个温度值。#include "STC15F2K60S2.h"#include "intrins.h"#include "ds1302.h"#include "onewire.h"typedef unsigned char u8;typedef unsigned int u16;sbit S4=P3^3;sbit S5=P3^2;sbit S6=P3^1;sbit S7=P3^0;extern un
2022-03-13 17:54:40
1327
原创 蓝桥杯单片机第七届
全部文件:提取码:azxy直接看题目吧,这一届主要的考点应该是用定时器控制PWM输出。#include "STC15F2K60S2.h"#include "intrins.h"#include "onewire.h"typedef unsigned char u8;typedef unsigned int u16;sbit S4=P3^3;sbit S5=P3^2;sbit S6=P3^1;sbit S7=P3^0;// 0 1 2 3 4 5
2022-03-13 14:40:14
1004
3
原创 蓝桥杯单片机第九届
陪女朋友玩了三天,收心继续干。全部文件:提取码:azxy#include "STC15F2K60S2.h"#include "intrins.h"#include "iic.h"typedef unsigned char u8;typedef unsigned int u16;sbit S4=P3^3;sbit S5=P3^2;sbit S6=P3^1;sbit S7=P3^0;// 0 1 2 3 4 5 6 7 8 9
2022-03-13 03:53:49
658
4
原创 蓝桥杯单片机第八届
全部文件:提取码:azxy#include "STC15F2K60S2.h"#include "ds1302.h"#include "onewire.h"typedef unsigned char u8;typedef unsigned int u16;sbit S4=P3^3;sbit S5=P3^2;sbit S6=P3^1;sbit S7=P3^0;extern unsigned char Time[3];// 0 1 2 3 4 5
2022-03-09 21:47:51
589
原创 蓝桥杯单片机第十届
全部文件:提取码:azxy#include "STC15F2K60S2.h"#include "intrins.h"#include "iic.h"typedef unsigned char u8;typedef unsigned int u16;sbit S4=P3^3;sbit S5=P3^2;sbit S6=P3^1;sbit S7=P3^0;// 0 1 2 3 4 5 6 7 8 9 u8 code duan[1
2022-03-08 17:21:06
942
2
原创 蓝桥杯单片机第十一届
全部文件:提取码:azxy#include "STC15F2K60S2.h"#include "intrins.h"#include "iic.h"typedef unsigned char u8;typedef unsigned int u16;sbit H3=P3^2;sbit H4=P3^3;sbit L3=P3^5;sbit L4=P3^4;// 0 1 2 3 4 5 6 7 8 9 u8 code duan[1
2022-03-07 20:51:44
814
原创 蓝桥杯单片机第十二届
临近第十三届比赛,趁着最后一月时间,重新刷一下真题,巩固一下知识。这些程序参考一下思路就行,最好自己写,所以我就直接上图片,不支持复制。HEX文件:链接:https://pan.baidu.com/s/18BK6mv5UNse8wZRZe6m3fQ?pwd=azxy提取码:azxy主程序底层驱动文件iic.c#include "reg52.h"#include "intrins.h"#include "iic.h"#define DELAY_TIME 27#d
2022-03-06 18:32:53
861
原创 51单片机数码管密码锁
矩阵键盘数值表 原密码12345678 可修改密码P1控制数码管采用74hc138控制 P0输出P2^5—AP2^6—BP2^7—CLED指示灯 初始状态红灯亮 锁开绿灯亮 输错三次 键盘锁定30S 红灯和黄灯亮等输入状态输入中状态密码正确状态密码错误状态修改密码状态#include"main.h"void delay(u16 i){ while(i--);}void main(){ while(1) { All_password();
2021-11-18 15:46:35
2921
1
原创 基于51单片机交通灯
废话少说直接上图[程序和仿真点击这里]提取码:azxy#include"reg52.h" //头文件typedef unsigned char u8;typedef unsigned int u16;sbit P10=P1^0; //黄色灯sbit P11=P1^1; //红色灯 勇敢牛牛路前面3个灯sbit P12=P1^2; //绿色灯sbit P13=P1^3; //黄色灯sbit P14=P1^4; //红色灯 不怕困难路右面3个灯sbit P15=P1^
2021-07-11 22:45:46
1323
6
原创 51单片机简单时钟
仿真仿真和程序请点这里提取码:azxy#include<reg52.h>#include<intrins.h>typedef unsigned char u8;typedef unsigned int u16;sbit P20=P2^0; //时,分,秒切换sbit P21=P2^1; //根据stan的值分别对时,分,秒加一sbit P22=P2^2; //根据stan的值分别对时,分,秒减一
2021-06-05 13:25:22
2972
2
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人