Advertisement
Guest User

Przedpelski

a guest
Mar 28th, 2020
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. #include <REGX52.H>
  2.  
  3. #define _A 0xC0
  4.  
  5. void main(void)
  6. {
  7. while(1)
  8. {
  9. P2 = 0xFE;
  10. if(P2 == 0xEE)
  11. P1 =0x90;
  12. if(P2 == 0xDE)
  13. P1 =0xA1;
  14. if(P2 == 0xBE)
  15. P1 =0xF9;
  16. if(P2 == 0x7E)
  17. P1 =0x92;
  18.  
  19. P2 = 0xFD;
  20. if(P2 == 0xED)
  21. P1 =0x88;
  22. if(P2 == 0xDD)
  23. P1 =0x86;
  24. if(P2 == 0xBD)
  25. P1 =0xA4;
  26. if(P2 == 0x7D)
  27. P1 =0x82;
  28.  
  29. P2 = 0xFB;
  30. if(P2 == 0xEB)
  31. P1 =0x83;
  32. if(P2 == 0xDB)
  33. P1 =0x8E;
  34. if(P2 == 0xBB)
  35. P1 =0xB0;
  36. if(P2 == 0x7B)
  37. P1 =0xF8;
  38.  
  39. P2 = 0xF7;
  40. if(P2 == 0xE7)
  41. P1 =0xC6;
  42. if(P2 == 0xD7)
  43. P1 =0xC0;
  44. if(P2 == 0xB7)
  45. P1 =0x99;
  46. if(P2 == 0x77)
  47. P1 =0x80;
  48. else P1 =0xFF;
  49.  
  50. }
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement