上一页 1 2 3 4 5 6 7 ··· 20 下一页
摘要: Capture_Init(59999,120-1); // 可捕获最小频率 72M/(120*60000)= 17*0.6=10Hz PA1 // TIM2_CH2 PA7 做为捕获通道 // 输入捕获能捕获到的最小的频率为 72M/{ (ARR+1)*(PSC+1) } void Capture_ 阅读全文
posted @ 2024-06-04 17:19 不折不扣 阅读(28) 评论(0) 推荐(0) 编辑
摘要: #include "led.h" #include "delay.h" #include "key.h" #include "sys.h" #include "usart.h" #include "timer.h" //ALIENTEK战舰STM32开发板实验9 //PWM输出实验 //技术支持:w 阅读全文
posted @ 2024-06-04 16:29 不折不扣 阅读(27) 评论(0) 推荐(0) 编辑
摘要: if(myusart.reflag>0) { Com_Handle(); myusart.recount=0; myusart.reflag=0; } main #define _maxbuf 100 typedef struct { u8 myadd; u8 rcbuf[_maxbuf]; u16 阅读全文
posted @ 2024-06-03 17:38 不折不扣 阅读(30) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2024-05-30 20:42 不折不扣 阅读(6) 评论(0) 推荐(0) 编辑
摘要: 准确的延时只能做到定时器中断延时; 阅读全文
posted @ 2024-05-30 14:56 不折不扣 阅读(18) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2024-05-30 14:09 不折不扣 阅读(11) 评论(0) 推荐(0) 编辑
摘要: https://jingyan.baidu.com/article/4f7d5712d1491c1a201927bd.html 阅读全文
posted @ 2024-05-29 21:47 不折不扣 阅读(23) 评论(0) 推荐(0) 编辑
摘要: PA3 STM8S003F3 timer2_init(); //初始化 #define PUL_COUNT 4000 void timer2_init(void) { TIM2_DeInit(); TIM2_TimeBaseInit(TIM2_PRESCALER_8, PUL_COUNT-1); / 阅读全文
posted @ 2024-05-29 14:23 不折不扣 阅读(80) 评论(0) 推荐(0) 编辑
摘要: #define _maxbuf 100 typedef struct { u8 rcbuf[_maxbuf]; //MODBUS接收缓冲区 u16 timout;//MODbus的数据断续时间 u8 recount;//MODbus端口已经收到的数据个数 u8 reflag;//收到一帧数据的标志 阅读全文
posted @ 2024-05-29 11:22 不折不扣 阅读(26) 评论(0) 推荐(0) 编辑
摘要: 最重要的下载程序的option bety 设置; 函数1: void Init_Timer1(void) { GPIO_Init(GPIOC, GPIO_PIN_6, GPIO_MODE_IN_PU_NO_IT); //输入浮动,没有外部中断 TIM1_DeInit(); //tim1 定时器寄存器 阅读全文
posted @ 2024-05-29 10:22 不折不扣 阅读(97) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 20 下一页