本帖最后由 keer_zu 于 2014-5-16 15:34 编辑
全局变量部分: bit FUN,Shift_on,Add_on,Sub_on,fun_flag; bit dspflagz1,dspflagz2,dspflagz3; unsigned char z1,z2,td3,working,DSP_m,DSP_n; unsigned char l1,l2,r,m; bitflagv,flagy,flags,flag0,flagx,beepflag1,beepflag2,flagt,flagw; bit working_on,function_on, AINTSYR_on,AINTSYW_on,BINTSYR_on,BINTSYW_on ; bitprogram_on,program_woking,up_flag,down_flag,up_on,down_on; unsigned char AINTSY_state, BINTSY_state, function_state; unsigned char tx1,tx2,tx3,tw,TX,t; unsigned char display_state ,x1,x2,w1,w2; unsigned char program_state,program_working; unsigned char clk_number; unsigned char code DS[]={0,33,63,86,100,86,63,33}; unsigned chards_curtime[6]={0x05,0x03,0x02,0x01,0x07,0x06}; unsigned char clk_data[6]={06,1,1,0,0,1}; unsigned char set_time[6]; sbit switch_work= 0xB0; sbit switch_function=0xB1; sbit switch_program=0xB2; sbit switch_up=0x90; sbit switch_down=0x91; sbit switch_AINTSYR=0x92; sbit switch_AINTSYW=0x93; sbit switch_BINTSYR=0x94; sbit switch_BINTSYW=0x95; sbit RS=0xA2; sbit RW=0xA1; sbit E=0xA0; sbit CS2=0xA3; sbit CS1=0xA4; sbit DACS1=0xA7; sbit DACS2=0xA6; sbit DACS3=0xA5; sbit ds_sclk=0xB3 ; /*初始化变量*/ sbit ds_io=0xB4; sbit ds_rst=0xB5; 初评:除了最后是管脚定义外,前边都是全局的标志位或全局变量。 |