资源描述:
《公历阳历转阴历农历C51程序键盘数码管成功》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、/********************************************************************************实验名:动态显示数码管实验*使用的IO:数码管使用P0,P2.2,P2.3,P2.4*实验效果:数码管显示76543210。*注意:*******************************************************************************/#include#include#defineG
2、PIO_DIGP0//数码管显示#defineGPIO_KEYP1//键盘sbitLSA=P2^2;sbitLSB=P2^3;sbitLSC=P2^4;sbitK3=P3^2;//外部中断unsignedcharcodeDataTab[404]={//日期差//上大小月//下大小月//闰月月份及大小0x46,0x43,0x21,0x00,//19990x35,0x15,0x51,0x00,//20000x23,0x11,0x52,0x41,0x42,0x12,0x65,0x00,0x31,0x11,0x32,0x00,0x21,0x
3、42,0x52,0x21,0x39,0x52,0x25,0x00,//20050x28,0x25,0x04,0x71,0x48,0x66,0x42,0x00,0x37,0x33,0x22,0x00,0x25,0x15,0x24,0x51,0x44,0x25,0x52,0x00,//20100x33,0x22,0x65,0x00,0x22,0x21,0x25,0x41,0x40,0x24,0x52,0x00,0x30,0x52,0x42,0x91,0x49,0x55,0x05,0x00,//20150x38,0x26,0x44,0x0
4、0,0x27,0x53,0x50,0x60,0x46,0x53,0x24,0x00,0x35,0x25,0x54,0x00,0x24,0x41,0x52,0x41,//20200x42,0x45,0x25,0x00,0x31,0x24,0x52,0x00,0x21,0x51,0x12,0x21,0x40,0x55,0x11,0x00,0x28,0x32,0x21,0x61,//20250x47,0x26,0x61,0x00,0x36,0x13,0x31,0x00,0x25,0x05,0x31,0x51,0x43,0x12,0x54,
5、0x00,0x33,0x51,0x25,0x00,//20300x22,0x42,0x25,0x31,0x41,0x32,0x22,0x00,0x30,0x55,0x02,0x71,0x49,0x55,0x22,0x00,0x38,0x26,0x62,0x00,//20350x27,0x13,0x64,0x60,0x45,0x13,0x32,0x00,0x34,0x12,0x55,0x00,0x23,0x10,0x53,0x51,0x42,0x22,0x45,0x00,//20400x31,0x52,0x22,0x00,0x21,0
6、x52,0x44,0x21,0x40,0x55,0x44,0x00,0x29,0x26,0x50,0x71,0x47,0x26,0x64,0x00,//20450x36,0x25,0x32,0x00,0x25,0x23,0x32,0x50,0x44,0x44,0x55,0x00,0x32,0x24,0x45,0x00,0x22,0x55,0x11,0x30,//20500x41,0x33,0x10,0x00,0x31,0x55,0x40,0x81,0x49,0x55,0x50,0x00,0x38,0x46,0x64,0x00,0x2
7、7,0x45,0x65,0x60,//20550x45,0x05,0x32,0x00,0x34,0x45,0x15,0x00,0x23,0x26,0x23,0x40,0x42,0x25,0x21,0x00,0x32,0x33,0x21,0x00,//20600x20,0x43,0x21,0x31,0x39,0x15,0x51,0x00,0x28,0x12,0x52,0x71,0x47,0x12,0x65,0x00,0x35,0x11,0x32,0x00,//20650x25,0x50,0x52,0x51,0x44,0x52,0x25
8、,0x00,0x33,0x26,0x22,0x00,0x22,0x52,0x42,0x41,0x41,0x53,0x22,0x00,//20700x30,0x25,0x44,0x81,0x49,0x25,0x52,0x00,0x37,