#include <reg51.h>
typedef unsigned char uint8;
typedef unsigned int uint16;
#define SMG_PORT P2
uint8 code CD4511_74HC138_TAB[]=
{0x00,0x01,0x03,0x04,0x05,0x06,0x07,0x08,0x09};
void main()
{
uint8 i;
while(1)
for(i=0;i<8;i++)
SMG_PORT=i;
}