Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <REGX52.H>
- #define _A 0xC0
- void main(void)
- {
- while(1)
- {
- P2 = 0xFE;
- if(P2 == 0xEE)
- P1 =0x90;
- if(P2 == 0xDE)
- P1 =0xA1;
- if(P2 == 0xBE)
- P1 =0xF9;
- if(P2 == 0x7E)
- P1 =0x92;
- P2 = 0xFD;
- if(P2 == 0xED)
- P1 =0x88;
- if(P2 == 0xDD)
- P1 =0x86;
- if(P2 == 0xBD)
- P1 =0xA4;
- if(P2 == 0x7D)
- P1 =0x82;
- P2 = 0xFB;
- if(P2 == 0xEB)
- P1 =0x83;
- if(P2 == 0xDB)
- P1 =0x8E;
- if(P2 == 0xBB)
- P1 =0xB0;
- if(P2 == 0x7B)
- P1 =0xF8;
- P2 = 0xF7;
- if(P2 == 0xE7)
- P1 =0xC6;
- if(P2 == 0xD7)
- P1 =0xC0;
- if(P2 == 0xB7)
- P1 =0x99;
- if(P2 == 0x77)
- P1 =0x80;
- else P1 =0xFF;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement