#include #include "macro_and_const" sbit KeyOut4 = P2^0; //矩阵按键引脚 sbit KeyOut3 = P2^1; sbit KeyOut2 = P2^2; sbit KeyOut1 = P2^3; sbit KeyIn1 = P2^4; sbit KeyIn2 = P2^5; sbit KeyIn3 = P2^6; sbit KeyIn4 = P2^7; signed long beats = 0; uint8 KeySta[4][4] = { //按键状…

2019-09-22 0条评论 367点热度 0人点赞 古月弧 阅读全文

最近在温故一本书,为LPC1765编程打点基础,先用51单片机练练手吧 以下是一个简单的加法器程序 [highlight lanaguage="C"] #include #include "macro_and_const" sbit ADDR0 = P1^0; //数码管片选 sbit ADDR1 = P1^1; sbit ADDR2 = P1^2; sbit ADDR3 = P1^3; sbit ENLED = P1^4; sbit KeyOut4 = P2^0; //矩阵按键引脚 sbit KeyOut3 = …

2019-09-19 0条评论 424点热度 2人点赞 古月弧 阅读全文