7segment

 

 

 

// 以下 code 是有 common cathode (共陰)

unsigned char code LED_tab[10]={
  0x3f,    //0B00111111,      //0
  0xf6,    //0B00000110,      //1
  0x5b,    //0B01011011,      //2
  0x4f,    //0B01001111,      //3
  0x66,    //0B01100110,      //4
  0x6d,    //0B01101101,      //5
  0x7d,    //0B01111101,      //6
  0x07,    //0B00000111,      //7
  0x7f,    //0B01111111,      //8
  0x6f,    //0B01101111,      //9                                
};