#include <stc15f2k60s2.h>
#include <intrins.h>
#define GOIP_DIG P2
sbit k1=P3^3;
sbit DIG=P4^4;
unsigned char code GOIP_CODE[]={0x3f,0x06,0x5b,0x4f,
0x66,0x6d,0x7d,0x07,
0x7f,0x6f,0x77,0x7c,
0x39,0x5e,0x79,0x71};
void Delay10ms();
void main()
{
DIG=0;
unsigned char i;
unsigned int j;
while(1)
{
if(k1==0)
{
Delay10ms();
if(k1==0)
{
GOIP_DIG=GOIP_CODE;
while((j<50)&&(k1==0))
{
Delay10ms();
j++;
}
}
}
}
}
void Delay10ms() //@11.0592MHz
{
unsigned char i, j;
i = 108;
j = 145;
do
{
while (--j);
} while (--i);
}
Rebuild target 'Target 1'
compiling 按键控制一位数码管从0到f.c...
按键控制一位事牍艽?到f.c(17): error C141: syntax error near 'unsigned'
按键控制一位事牍艽?到f.c(17): error C202: 'i': undefined identifier
按键控制一位事牍艽?到f.c(18): error C141: syntax error near 'unsigned'
按键控制一位事牍艽?到f.c(18): error C202: 'j': undefined identifier
按键控制一位事牍艽?到f.c(27): error C202: 'i': undefined identifier
按键控制一位事牍艽?到f.c(28): error C202: 'j': undefined identifier
按键控制一位事牍艽?到f.c(31): error C202: 'j': undefined identifier
Target not created.
Build Time Elapsed: 00:00:00
|