We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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;
Continuation
BUZZER=1; delay_buzzer(); BUZZER=0; delay_3sec(); door_en=1; door_in1=0; door_in2=1; while(door_sw2==1); door_en=0; green_led=1; red_led=0; en1=1; in1=1; in2=0; en2=1; in3=1; in4=0; while(TSTART_2==1); while(TSTART_2==0); break; }//end if }//end while } //end while
Ignore this post, found the problem.... can the mods delete this post