Statistics
| Revision:

root / branch / CHAMBELLON / sp4b1 / SP4b1 / SP4b1.c @ 618

History | View | Annotate | Download (1.59 KB)

1
/***********************************************************************/
2
/*                                                                     */
3
/*  FILE        :SP4b1.c                                               */
4
/*  DATE        :Wed, May 26, 2021                                     */
5
/*  DESCRIPTION :main program file.                                    */
6
/*  CPU GROUP   :87B                                                   */
7
/*                                                                     */
8
/*  This file is generated by Renesas Project Generator (Ver.4.18).    */
9
/*  NOTE:THIS IS A TYPICAL EXAMPLE.                                    */
10
/***********************************************************************/
11
#include "sfr32c87.h"
12

    
13
char t;
14
char touche;
15
void main(void){  
16

    
17
        pd10= 0x0F;
18
        pu31=1;
19
        p10=0x00;
20
        while (1){ 
21
                        t=p10;
22
                        p10= 0xFe;
23
                        t=p10; 
24
                        if (t==0xDe){
25
                        touche ='2';
26
                }
27
                          
28
                          if (t==0xbe){
29
                        touche ='1';
30
                }
31
                        if (t==0x7e){
32
                        touche ='3';
33
                }
34
                         
35
                        
36
                        
37
                        p10= 0xFd;
38
                        t=p10;
39
                        if (t==0xdd){
40
                        touche ='5';
41
                }
42
                          if (t==0xbd){
43
                        touche ='4';
44
                }
45
                        if (t==0x7d){
46
                        touche ='6';
47
                }
48
                          
49
                        
50
                        
51
                        p10= 0xFb;
52
                        t=p10;
53
                        if (t==0xdb){
54
                        touche ='8';
55
                }
56
                          if (t==0xeb){
57
                        touche ='7';
58
                }
59
                        if (t==0x7b){
60
                        touche ='9';
61
                }
62
                          
63
                        p10= 0xF7;
64
                        t=p10;
65
                        if (t==0xd7){
66
                        touche ='0';
67
                }
68
                    if (t==0x77){
69
                        touche ='#';
70
                }
71
                         if (t==0xe7){
72
                        touche ='#';
73
                }
74
                        
75
                          
76
                        
77
        }
78
}
79