Alx09

tast SBMM

May 10th, 2021
589
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  PORTC = 0x08;
  2.   switch (PINB & 0x0F){
  3.     case 0x01: UDR0 = '1'; break;
  4.     case 0x02: UDR0 = '2'; break;
  5.     case 0x04: UDR0 = '3'; break;
  6.     case 0x08: UDR0 = 'A'; break;
  7.   }
  8.  
  9.   PORTC = 0x04;
  10.   switch (PINB & 0x0F){
  11.     case 0x01: UDR0 = '4'; break;
  12.     case 0x02: UDR0 = '5'; break;
  13.     case 0x04: UDR0 = '6'; break;
  14.     case 0x08: UDR0 = 'B'; break;
  15.   }
  16.  
  17.   PORTC = 0x02;
  18.   switch (PINB & 0x0F){
  19.     case 0x01: UDR0 = '7'; break;
  20.     case 0x02: UDR0 = '8'; break;
  21.     case 0x04: UDR0 = '9'; break;
  22.     case 0x08: UDR0 = 'C'; break;
  23.   }
  24.  
  25.   PORTC = 0x01;
  26.   switch (PINB & 0x0F){
  27.     case 0x01: UDR0 = '*'; break;
  28.     case 0x02: UDR0 = '0'; break;
  29.     case 0x04: UDR0 = '#'; break;
  30.     case 0x08: UDR0 = 'D'; break;
  31.   }
RAW Paste Data