程序出现问题

1313213
免费
来自:单片机
2019-05-06

#include<reg52.h> 

#include<stdio.h>

#include"1602.h"

#include"delay.h"

#include"ZD_init.h" 

#include"AD.h" 

#define uchar unsigned char 

#define uint unsigned int 

sbit KK_i=P2^0;

sbit KK_k=P1^1;

sbit KK_g=P1^2; 

sbit JD_i=P1^3; 

sbit JD_k=P1^4;

sbit JD_g=P1^5; 

unsigned char code table[]={'0','1','2','3','4','5','6','7','8','9'};

uint i,i1,i2,k,k1,k2,g,g1,g2,j;

long int JS_t2,SS1; 

uchar flag,flagi,flagk,flagg,aa;

void main() 

KK_i=0; KK_g=0; 

KK_k=0; 

i=0; 

i1=0; 

i2=0; 

LCD_Init(); 

LCD_Clear(); LCD_Write_Char(4,0,'r'); 

LCD_Write_Char(5,0,'/'); 

LCD_Write_Char(6,0,'m'); 

LCD_Write_Char(7,0,'i'); 

LCD_Write_Char(8,0,'n');

LCD_Write_Char(0,1,'A'); 

LCD_Write_Char(1,1,'D'); 

LCD_Write_Char(2,1,'C'); LCD_Write_Char(3,1,':'); 

LCD_Write_Char(5,1,'.'); 

LCD_Write_Char(9,1,'V'); 

Init_Timer0(); 

Init_Timer1(); 

Init_Timer2(); 

Init_INT0(); 

Init_INT1(); 

EA=1; 

PT0=1; 

while(1) 

  if(flag==1) 

flag=0; 

JS_t2=(TH2*256+TL2)*60; 

TH2=0;

TL2=0; 

LCD_Write_Char(0,0,table[JS_t2/1000%10]); 

LCD_Write_Char(1,0,table[JS_t2/100%10]); 

LCD_Write_Char(2,0,table[JS_t2/10%10]); 

LCD_Write_Char(3,0,table[JS_t2%10]); 

SS1=((TLC549_0()*20));

LCD_Write_Char(8,1,table[SS1%10]); 

LCD_Write_Char(7,1,table[SS1/10%10]);

LCD_Write_Char(6,1,table[SS1/100%10]); 

LCD_Write_Char(4,1,table[SS1/1000%10]);}} 

void Timer0_isr(void) interrupt 1 using 1 

TH0=(65536-200)/256; 

TL0=(65536-200)%256;

j++; 

if(j==2310) 


j=0; 

flag=1; 

if(flagi==1)

i++; 

if(i>=48) 

i=0; 

if(i<(48-i1)) 

  KK_i=0; 

if(i>=(48-i1)) 

KK_i=1; 

  if(flagk==1)

  {

  k++; 

if(k>=48) 

k=0; 

if(k<(48-k1)) 

KK_k=0; 

if(k>=(48-k1))

KK_k=1; 

if(flagg==1) 

g++; 

if(g>=48) 

g=0; 

if(g<(48-g1)) { 

KK_g=0; 

if(g>=(48-g1)) { 

KK_g=1; 

void Timer1_isr(void) interrupt 3 using 1 

{

TH1=(65536-1)/256; 

TL1=(65536-1)%256; 

flagi=1; 

i2++; 

if(i2==32) 

i2=0; 

i1++; 

if(i1==48) 

i1=0; 

TR1=0; flagi=0; 

JD_i=0 

}

void INT0_isr(void) interrupt 0 using 1 

k2++; 

flagk=1; if(k2==32) 

k2=0; 

k1++;

if(k1==48)

k1=0; 

EX0=0; 

flagk=0;

JD_k=0; }

void INT1_isr(void) interrupt 2 using 1

 g2++; 

}

然后出现了ABc.c(9): error C141: syntax error near 'sbit'

ZD_init.h(3): error C132: 'Init_Timer0': not in formal parameter list

ZD_init.h(4): error C132: 'Init_Timer1': not in formal parameter list

ZD_init.h(5): error C132: 'Init_Timer2': not in formal parameter list

ZD_init.h(6): error C132: 'Init_INT0': not in formal parameter list

ZD_init.h(7): error C132: 'Init_INT1': not in formal parameter list

我的ZD.h 是

void Init_Timer0(void);

void Init_Timer1(void);

void Init_Timer2(void);

void Init_INT0(void);

void Init_INT1(void);

请大神告知怎么改啊

我来回答
0 条回答