C语言编写的基于单片机的计数器程序
计数器C程序
#include<reg52.h> #define uint unsigned int #define uchar unsigned char uchar code table[]="E-Counter"; uchar code table1[]="By Liu Qimeng"; uchar temp,num;
uchar numa,numb,numc,numd,nume,numf,numg,total; sbit lcden=P3^4; sbit lcdrs=P3^5;
void delay(uint z) { }
void write_com(uchar com) {
lcdrs=0; P0=com; uint x,y; for(x=z;x>0;x--)
for(y=110;y>0;y--);