一 开关检测器程序编写:ORG 00HSTART: MOV A,P1ANL A,#0F0HRR ARR ARR ARR AORl A,#0F0HMOV P1,ASJMP STARTORG 00HSTART: MOV A,P1ANL A,#0F0HRR ARR ARR ARR AORl A,#0F0HMOV P1,ASJMP START二:节日彩灯控制器编程:#include #define uchar unsigned char #define uint unsigned intsbit key=P12; uchar code table_P0= 0xfc,0xf9,0xf3,0xe7,0xcf,0x9f,0x3f,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, 0xe7,0xdb,0xbd,0x7e,0xbd,0xdb,0xe7,0xff,0xe7,0xc3,0x81,0x00,0x81,0xc3,0xe7,