Projet

Général

Profil

/***********************************************************************/
/* */
/* FILE :SP4b1.c */
/* DATE :Tue, May 18, 2021 */
/* DESCRIPTION :main program file. */
/* CPU GROUP :87B */
/* */
/* This file is generated by Renesas Project Generator (Ver.4.18). */
/* NOTE:THIS IS A TYPICAL EXAMPLE. */
/***********************************************************************/
#include "sfr32c87.h"
void init_keyboard(void);
void tpo_50ms(void) ;
unsigned char touche = 0;
char t;
void main(void)
{
pd10 = 0x0F;pu31=1;
p10=0x00;
while(1)
{
char touche;
char c;
p10=0x07; // bits de pooid fort de la forme 0111
t=p10;
c = t & 0xf0;
if ((t&0xf0)!=0xf0) //test les bits de poids forts. Si le bit de poid for de t est != de f, alors t&0xF0 sera != de 0xF0
{
touche=p10;
switch (t)
{
case 0b11100111:
touche ='*';
break;
}
}
p10=0x0B;
t=p10;
if((t&0xf0)!=0xf0)
{
touche=p10;
}
p10=0x0D;
t=p10;
if((t&0xf0)!=0xf0)
{
touche=p10;
}
p10=0x0E;
t=p10;
if((t&0xf0)!=0xf0)
{
touche=p10;
}
}

}
(2-2/9)