Révision 343
Ajouté par nibenmbare il y a presque 4 ans
SP4b1.c | ||
---|---|---|
/* NOTE:THIS IS A TYPICAL EXAMPLE. */
|
||
/***********************************************************************/
|
||
|
||
#include "sfr32c87.h"
|
||
|
||
char t;
|
||
|
||
void main(void)
|
||
{
|
||
|
||
}
|
||
pd10 = 0x0F;
|
||
p10=0x00;
|
||
|
||
pu31 = 1;
|
||
while (1){
|
||
p10 = 0x0E;
|
||
t = p10;
|
||
if ((t & 0xF0) != 0xF0){
|
||
touche = p10;
|
||
}
|
||
p10 = 0x0B;
|
||
t = p10;
|
||
if ((t & 0xF0) != 0xF0){
|
||
touche = p10;
|
||
|
||
}
|
||
p10 = 0x0D;
|
||
t = p10;
|
||
if ((t & 0xF0) != 0xF0){
|
||
touche = p10;
|
||
|
||
}
|
||
p10 = 0x07 ;
|
||
t = p10;
|
||
if ((t & 0xF0) != 0xF0)
|
||
{
|
||
touche = p10;
|
||
|
||
|
||
}
|
||
}
|
Formats disponibles : Unified diff
fin tp4