Kód pro 4 * 4keypad a lcd nefunguje - potřebují pomoc

keycodes, co tím chceš říct?prosím, po nějaké výsledky

 
M

minal1

Guest
já mít kód pro 4 * 4keypad a lcd, ale i práci doesnot prosím, pomoz mi.
lcd pátku 17.dubna 2009
Zdrojový kód "LCD plus klávesnice propojení s Atmel 8051 v C"
Klávesnice a LCD Propojení# Include
# Include

int g;
sbit row1 = P3 ^ 0;
sbit row2 = P3 ^ 1;
sbit row3 = P3 ^ 2;
sbit row4 = P3 ^ 3;

char scan_key (void)
(
P3 = 15;
while (1)
(
if (P3! = 15) break;
)
P3 = 239;
if (row1 == 0) (g = 1 return '1 ';)
if (row2 == 0) (g = 4; návrat '4 ';)
if (row3 == 0) (g = 7; návrat '7 ';)
if (row4 == 0) (return'*';}
P3 = 223;
if (row1 == 0) (g = 2; návrat '2 ';)
if (row2 == 0) (g = 5; návrat '5 ';)
if (row3 == 0) (g = 8; návrat '8 ';)
if (row4 == 0) (g = 0; návrat '0 ';)
P3 = 191;
if (row1 == 0) (g = 3; návrat '3 ';)
if (row2 == 0) (g = 6; návrat '6 ';)
if (row3 == 0) (g = 9; návrat '9 ';)
if (row4 == 0) (return'#';}

)

int main ()
(
int i, c, f = 0, ali = 0;
char;
P1 = 56, P2_1 = 0, P2_2 = 0, P2_3 = 1;
P2_3 = 0;
for (i = 0; I <255; i );
P1 = 15, P2_1 = 0, P2_2 = 0, P2_3 = 1;
P2_3 = 0;
for (i = 0; I <255; i );
P1 = 1, P2_1 = 0, P2_2 = 0, P2_3 = 1;
P2_3 = 0;
for (i = 0; i <255; i );
P1 = 28, P2_1 = 0, P2_2 = 0, P 2_3 = 1;
P2_3 = 0;
for (i = 0; i <255; i );
P1 = 129, P2_1 = 0, P2_2 = 0, P2_3 = 1;
P2_3 = 0;
for (i = 0; i <255; i );
while (1)
(
scan_key = ();
if (a == '*')
(
P1 = 1, P2_1 = 0, P2_2 = 0, P2_3 = 1;
P2_3 = 0;
f = 0;
g = 0;
for (c = 0, c <32000; c );
)
if (! = '*' & &! = '#')
(
P1 =, P2_1 = 1, P2_2 = 0, P2_3 = 1;
P2_3 = 0;
for (c = 0, c <32000; c );
f = f g;
f = f * 10;
)
if (a == '#')
(
f = f/10;
= f;
P1 ='=', P2_1 = 1, P2_2 = 0, P2_3 = 1;
P2_3 = 0;
for (c = 0, c <32000; c );
f = 0;
g = 0;
goto label;
)
while (0)
(
label:
P1 =, P2_1 = 1, P2_2 = 0, P2_3 = 1;
P2_3 = 0;
for (c = 0, c <32000; c );
P1 = '', P2_1 = 1, P2_2 = 0, P2_3 = 1;
P2_3 = 0;
for (c = 0, c <32000; c );
)
)
)

 

Welcome to EDABoard.com

Sponsor

Back
Top