To contact :
a pokud pouziju maticovou klavecnici dalo by se menu resit takto?
char text[];
DDRE=0x0F;
PORTE=0x0F;
while(1)
{
//prvni sloupec
PORTE =0b00001110;
//1
if (bit_is_clear(PINE, 4)) {
text[]="Uroven 1";
PORTE =0b00001101;
if (bit_is_clear(PINE, 4)) {
text[]="Poduroven 1";
}
PORTE =0b00001011;
if (bit_is_clear(PINE, 4)) {
text[]="Poduroven 2";
}
PORTE =0b00001110;
if (bit_is_clear(PINE, 4)) {
text[]="Poduroven 3";
}
}
//4
if (bit_is_clear(PINE, 5)) {};
//7
if (bit_is_clear(PINE, 6)) {};
//*
if (bit_is_clear(PINE, 7)) {};
//druhy sloupec
PORTE =0b00001101;
//2
if (bit_is_clear(PINE, 4)) {};
//5
if (bit_is_clear(PINE, 5)) {};
//8
if (bit_is_clear(PINE, 6)) {};
//0
if (bit_is_clear(PINE, 7)) {};
//treti sloupec
PORTE =0b00001011;
//3
if (bit_is_clear(PINE, 4)) {};
//6
if (bit_is_clear(PINE, 5)) {};
//9
if (bit_is_clear(PINE, 6)) {};
//#
if (bit_is_clear(PINE, 7)) {};
//ctvrty sloupec
PORTE =0b00000111;
//ESC
if (bit_is_clear(PINE, 4)) {};
//F1
if (bit_is_clear(PINE, 5)) {};
//F2
if (bit_is_clear(PINE, 6)) {};
//ENTER
if (bit_is_clear(PINE, 7)) {};
}