This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

error C132: 'interrupt1': not in formal parameter list

Good Day, i am a novice programmer and am trying to compiler a code for micro controller AT89C52 using a reference code but i keep running to an error which seems to be causing other errors.

        #include <reg52.h>                                                                //header file

        sbit TSTART_1 = P1^2;
        sbit TSTART_2 = P1^3;
        sbit INP_1 = P1^0;
        sbit INP_2 = P1^1;

        sbit door_en = P2^5;
        sbit door_in1 = P2^4;
        sbit door_in2 = P2^1;
        sbit door_sw1 = P2^2;
        sbit door_sw2 = P2^3;

        sbit in1 = P3^1;
        sbit in2 = P3^2;
        sbit en1 = P3^0;
        sbit en2 = P3^3;
        sbit in3 = P3^4;
        sbit in4 = P3^5;

        sbit BUZZER = P3^6;
        sbit digit1 = P2^7;
        sbit digit2 = P2^6;
        sbit red_led = P1^4;
        sbit green_led = P1^5;

        sbit seg_A = P0^0;
        sbit seg_B = P0^1;
        sbit seg_C = P0^2;
        sbit seg_D = P0^3;
        sbit seg_E = P0^4;
        sbit seg_F = P0^5;
        sbit seg_G = P0^6;

        bit time_count_flag = 0x01;

        void delay1();
        void delay_3sec();
        void delay_buzzer();
        void timer0_init();
        void timer1_init();
        void display_led(unsigned char);

        int time_count=0, count, count1=0;



Parents
  • I could post the full code due to character limits, here is the continuation

    
            void main()
            {
                    P1=0XFF;
                    BUZZER=0;
                    P0=0X00;
                    timer0_init();
    
                            while(1)
                            {
                                    while(1)
                                    {
                                                    if(TSTART_1==0)
                                                    {
                                                                    red_led=1;
                                                                    green_led=0;
                                                                    en1=0;
                                                                    en2=0;
                                                                    BUZZER=1;
                                                                    delay_buzzer();
                                                                    BUZZER=0;
                                                                    delay1();
    
                                                                    door_en=1;
                                                                    door_in1=1;
                                                                    door_in2=0;
                                                                    delay1();
                                                                    door_en =0;
                                                                    timer1_init();
    
                                    while(1)
                                    {
                                                    if(INP_1==1)
                                                    {
                                                                    while(INP_2 ==1);
                                                                    count = count+1;
    
                                                                    if(count >=25)
                                                                    {
                                                                                    BUZZER=1;
                                                                                    delay_buzzer();
                                                                                    BUZZER=0;
                                                                                    delay_3sec();
                                                                                    door_en=1;
                                                                                    door_in1=0;
                                                                                    door_in2=1;
                                                                                    delay1();
                                                                                    door_en=0;
    
                                                                                    }
                                                                                    delay1();
    
                                                                                    }
    
                                                                                    if(INP_2 ==1)
                                                                                    {
                                                                                                    while(INP_1==1);
                                                                                                    count = count-1;
    
                                                                                                    if(count <= 0)
                                                                                                    {
                                                                                                                    count = 0;
                                                                                                                    }
    
                                                                                            delay1();
                                                                                            }
    
                                                            if(time_count_flag ==1)
                                                            {
                                                                            TR1=0;
    
                                                                            time_count_flag = 0;
                                                                            TH1=0X00;
                                                                            TL1=0X00;
                                                                            ET1=1;
                                                                            TR1=1;
    
                                                                            BUZZER=1;
                                                                            delay_buzzer();
                                                                            BUZZER=0;
                                                                            delay_3sec();
                                                                            door_en=1;
                                                                            door_in1=0;
                                                                            door_in2=1;
                                                                            while(door_sw2==1);
                                                                            door_en=0;
                                                                            }
    
                                                                    }//end while
    
    
    
    
    
    

Reply
  • I could post the full code due to character limits, here is the continuation

    
            void main()
            {
                    P1=0XFF;
                    BUZZER=0;
                    P0=0X00;
                    timer0_init();
    
                            while(1)
                            {
                                    while(1)
                                    {
                                                    if(TSTART_1==0)
                                                    {
                                                                    red_led=1;
                                                                    green_led=0;
                                                                    en1=0;
                                                                    en2=0;
                                                                    BUZZER=1;
                                                                    delay_buzzer();
                                                                    BUZZER=0;
                                                                    delay1();
    
                                                                    door_en=1;
                                                                    door_in1=1;
                                                                    door_in2=0;
                                                                    delay1();
                                                                    door_en =0;
                                                                    timer1_init();
    
                                    while(1)
                                    {
                                                    if(INP_1==1)
                                                    {
                                                                    while(INP_2 ==1);
                                                                    count = count+1;
    
                                                                    if(count >=25)
                                                                    {
                                                                                    BUZZER=1;
                                                                                    delay_buzzer();
                                                                                    BUZZER=0;
                                                                                    delay_3sec();
                                                                                    door_en=1;
                                                                                    door_in1=0;
                                                                                    door_in2=1;
                                                                                    delay1();
                                                                                    door_en=0;
    
                                                                                    }
                                                                                    delay1();
    
                                                                                    }
    
                                                                                    if(INP_2 ==1)
                                                                                    {
                                                                                                    while(INP_1==1);
                                                                                                    count = count-1;
    
                                                                                                    if(count <= 0)
                                                                                                    {
                                                                                                                    count = 0;
                                                                                                                    }
    
                                                                                            delay1();
                                                                                            }
    
                                                            if(time_count_flag ==1)
                                                            {
                                                                            TR1=0;
    
                                                                            time_count_flag = 0;
                                                                            TH1=0X00;
                                                                            TL1=0X00;
                                                                            ET1=1;
                                                                            TR1=1;
    
                                                                            BUZZER=1;
                                                                            delay_buzzer();
                                                                            BUZZER=0;
                                                                            delay_3sec();
                                                                            door_en=1;
                                                                            door_in1=0;
                                                                            door_in2=1;
                                                                            while(door_sw2==1);
                                                                            door_en=0;
                                                                            }
    
                                                                    }//end while
    
    
    
    
    
    

Children