Projet

Général

Profil

« Précédent | Suivant » 

Révision 624

Ajouté par beclement2 il y a presque 4 ans

Update Programme du clavier (quasiment fini)

Voir les différences:

SP4b1.c
void main(void){
char touche = 'X';
pd10 = 0xF0;
p10 = 0xFF;
pu30 = 1;
t = p10;
p10 = 0x00;
p10 = 0x00;
while(1){
p10 = 0x0F;
t = p10;
if (t != 0x0F){
p10 = 0xEF; // On d?finit un premier chiffre pour commencer la v?rif
// p10 = 0xEF; // On d?finit un premier chiffre pour commencer la v?rif
t = p10; //On r?cup?re la valeur appuy?e
if (t == 0xE7){ //On change un bit pour voir
......
}
if (t == 0xEB){
// p10 = 0xDF;
touche = '';
touche = '4';
}
if (t == 0xED){
touche = '';
touche = '18';
}
if (t == 0xEE){
touche = '';
touche = '4';
}
//On passe ? la v?rif de la deuxi?me colonne
......
t = p10; //On r?cup?re la valeur appuy?e
if (t == 0xD7){ //On regarde la premi?re colonne
touche = '';
touche = '0'; //V
}
if (t == 0xDB){ //On change un bit pour voir
touche = '';
touche = '8'; //V
}
if (t == 0xDD){
// p10 = 0xDF;
touche = '';
touche = '5'; //V
}
if (t == 0xDE){
touche = '';
touche = '2'; //V
}
//Verif trosi?me colonne
......
t = p10; //On r?cup?re la valeur appuy?e
if (t == 0xB7){ //On regarde la premi?re colonne
touche = '';
touche = '9';
}
if (t == 0xBB){ //On change un bit pour voir
touche = '';
touche = '10';
}
if (t == 0xBD){
// p10 = 0xDF;
touche = '';
touche = '4'; //V
}
if (t == 0xBE){
touche = '';
touche = '1'; //V
}
}
}
}
/*
init_keyboard();
while(1){

Formats disponibles : Unified diff