root/branch/moisan/sp4b1/SP4b1/SP4b1.c @ 397
388 | mamoisan | /***********************************************************************/
|
|
/* */
|
|||
/* FILE :SP4b1.c */
|
|||
/* DATE :Thu, May 20, 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. */
|
|||
/***********************************************************************/
|
|||
397 | mamoisan | #include "sfr32c87.h"
|
|
char t;
|
|||
char touche;
|
|||
388 | mamoisan | void main(void)
|
|
{
|
|||
397 | mamoisan | pd10 = 0x0F;
|
|
pu31 = 1;
|
|||
p10 = 0;
|
|||
while(1)
|
|||
{
|
|||
t = p10;
|
|||
if(t !=0xf0)
|
|||
{
|
|||
p10 = 0xfe;
|
|||
t = p10;
|
|||
if (t==0xbe)
|
|||
{
|
|||
touche = '1';
|
|||
}
|
|||
if (t==0xde)
|
|||
{
|
|||
touche = '2';
|
|||
}
|
|||
if (t==0x7e)
|
|||
{
|
|||
touche = '3';
|
|||
}
|
|||
p10 = 0xfd;
|
|||
t = p10;
|
|||
if (t==0xbd)
|
|||
{
|
|||
touche = '4';
|
|||
}
|
|||
if (t==0xdd)
|
|||
{
|
|||
touche = '5';
|
|||
}
|
|||
if (t==0x7d)
|
|||
{
|
|||
touche = '6';
|
|||
}
|
|||
p10 = 0xfb;
|
|||
t = p10;
|
|||
if (t==0x7b)
|
|||
{
|
|||
touche = '9';
|
|||
}
|
|||
if (t==0xdb)
|
|||
{
|
|||
touche = '8';
|
|||
}
|
|||
if (t==0xeb)
|
|||
{
|
|||
touche = '7';
|
|||
}
|
|||
p10 = 0xf7;
|
|||
t = p10;
|
|||
if (t==0xd7)
|
|||
{
|
|||
touche = '0';
|
|||
}
|
|||
if (t==0x77)
|
|||
{
|
|||
touche = '#';
|
|||
}
|
|||
if (t==0xe7)
|
|||
{
|
|||
touche = '*';
|
|||
}
|
|||
p10 = 0xf;
|
|||
t = p10;
|
|||
if (t==0xbe)
|
|||
{
|
|||
touche = '1';
|
|||
}
|
|||
if (t==0xde)
|
|||
{
|
|||
touche = '2';
|
|||
}
|
|||
if (t==0x7e)
|
|||
{
|
|||
touche = '3';
|
|||
}
|
|||
}
|
|||
}
|
|||
388 | mamoisan | }
|