摘要: PIT定时器 初始化 void pit_init(CCU6N_enum ccu6n, CCU6_CHN_enum pit_ch, uint32 time); PIT中断初始化函数 ccu6n 设置模块号 pit_ch 选择通道号 (可选择模块号和通道号各两个,也就是可以设置4个PIT中断) time 阅读全文
posted @ 2022-01-04 20:17 寥若辰星 阅读(941) 评论(0) 推荐(0) 编辑
摘要: 自己做的答案,疏漏之处在所难免,代码仅供参考 mian.c #include "stc15f2k60s2.h" #include "hc138.h" #include "display.h" #include "key.h" #include "pcf8591.h" void S6_display( 阅读全文
posted @ 2022-01-04 12:03 寥若辰星 阅读(177) 评论(0) 推荐(0) 编辑
摘要: 希望不要鸽,继续更新(手动滑稽) #include "stc15f2k60s2.h" sbit S7=P3^0; sbit S6=P3^1; sbit S5=P3^2; sbit S4=P3^3; unsigned char POS=0; unsigned char smgdat[8]={21,21 阅读全文
posted @ 2022-01-04 11:46 寥若辰星 阅读(85) 评论(0) 推荐(0) 编辑
摘要: 1.显示原理: (1)静态显示 静态显示方式是指当显示器显示某一字符时,发光二极管的位选始终被选中。在这种显示方式下,每一个LED数码管显示器都需要一个8位的输出口进行控制。采用这种方法的缺点是,采用的IO口较多,因为单片机的IO口资源有限,通常需要扩展IO口。 (2)动态显示 动态显示的特点是将所 阅读全文
posted @ 2022-01-04 11:22 寥若辰星 阅读(928) 评论(0) 推荐(0) 编辑