#include <reg52.h>
code unsigned char P09[2][4]= { // 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 {0x01,0x02,0x03,0x04},//显示位数 {2,2,2,2}//最小 };
void DispInit() { P2 = 0xFF; P0 = 0xFF; P1 = 0XFF; }
void Menu_P(unsigned char(*P0X)[110]) {
unsigned char i,j; P0 = 0xEF; P1=*(*(P0X+i)+j);//显示位数 i++; P2=*(*(P0X+i)+j);//小数点 i++; j++;
}
void main() { for(;;) { DispInit(); Menu_P(P09); }
} |