freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

基于單片機(jī)步進(jìn)式pwm信號(hào)輸出畢業(yè)設(shè)計(jì)-資料下載頁(yè)

2025-06-27 19:59本頁(yè)面
  

【正文】 (int dat){i=j=0。DataToChar(dat)。for(j=0。j3。j++) {if(DataArray[j])i=1。 if(i)LCD_write_data(DataArray[j]+48)。 }LCD_write_data(DataArray[j]+48)。}void error(void){LCD_set_position(0)。LCD_prints(WRONG!)。LCD_set_position(0X40)。DispD(script)。}void Manag(void){LCD_set_position(0)。LCD_prints(MODE:)。LCD_set_position(7)。if(dcac)LCD_prints(DC )。else LCD_prints(SPWM)。LCD_set_position(0x40)。LCD_prints(OK)。}void DcConf(int dat){LCD_set_position(0)。LCD_prints(f:)。DispD(dat)。if(dcac)LCD_prints(KHz )。else LCD_prints(Hz )。LCD_set_position(0x40)。LCD_prints(OK)。LCD_set_position(0x4c)。LCD_prints(BACK)。}void DcConr(int dat){if(dcac) {LCD_set_position(0)。 LCD_write_data(0xe0)。 LCD_write_data(39。:39。)。 DispD(dat)。 LCD_prints(% )。 }else{LCD_set_position(0)。 LCD_prints(k:)。 DispD(dat)。 LCD_prints(/10 )。 }LCD_set_position(0x40)。LCD_prints(OK)。LCD_set_position(0x4c)。LCD_prints(BACK)。}void DcCont(int dat){LCD_set_position(0)。LCD_prints(Tout:)。DispD(dat)。LCD_prints(S )。LCD_set_position(0x40)。LCD_prints(OK)。LCD_set_position(0x4c)。LCD_prints(BACK)。}void DcConok(void){LCD_set_position(3)。LCD_prints(OUTPUT NOW?)。LCD_set_position(0x40)。LCD_prints(OK)。LCD_set_position(0x4c)。LCD_prints(BACK)。}void Dcmont(void){LCD_set_position(0)。LCD_prints(f:)。DispD(freq)。if(dcac)LCD_prints(KHz )。else LCD_prints(Hz )。if(dcac){ LCD_write_data(0xe0)。 LCD_write_data(39。:39。)。 DispD(rac)。 LCD_prints(% )。}else{ LCD_prints(k:)。 DispD(k)。 LCD_prints(/10 )。}LCD_set_position(0x40)。LCD_prints(Tout:)。DispD(ToutReal)。//LCD_set_position(0x48)。LCD_prints(S )。if(dcac)LCD_prints(DC )。else LCD_prints(SPWM )。}void DcStop(void){LCD_set_position(0)。LCD_prints(What do you want?)。LCD_set_position(0x40)。LCD_prints(STOP)。LCD_set_position(0x45)。LCD_prints(MODP)。LCD_set_position(0x4c)。LCD_prints(BACK)。}/**********************T0中斷服務(wù)程序*******************/void timer0(void)interrupt 1 using 1{if(dcac) { tjump=1tjump。 if(tjump==0) { TH0=tempt0。//tempt0=(655361000/freq*rac/100)/256。 TL0=tempt1。//tempt1=(655361000/freq*rac/100)%256。 OUTPUT0=1。 } if(tjump) { TH0=tempt2。//tempt2=(655361000/freq*(100rac)/100)/256。 TL0=tempt3。//tempt3=(655361000/freq*(100rac)/100)%256。 OUTPUT0=0。 } }else { TH0=tempt0,TL0=tempt1。 aci++。 if(FLAG) { if(sjb[aci]tempt4)OUTPUT0=0。 else OUTPUT0=1。 } else { if(sjb[aci]tempt4)OUTPUT1=0。 else OUTPUT1=1。 } if(aci==31) { aci=0,acj++。 tempt4=((long unsigned int)sine[acj])*k/10。 if(acj==31)acj=0,OUTPUT0=0,OUTPUT1=0,FLAG=1FLAG。 } }}/**********************T1中斷服務(wù)程序*******************/void timer1(void)interrupt 3 using 1{count1++。TH1=60。TL1=176。if(count1==20) {count1=0。 ToutReal。 if(ToutReal==0)TR0=TR1=0,OUTPUT0=0。 }}void EXINT1(void) interrupt 2 using 1{EX1=0。 //關(guān)中斷if(KEY1==0)KeyValue=1。else if(KEY2==0)KeyValue=2。else if(KEY3==0)KeyValue=3。else if(KEY4==0)KeyValue=4。EX1=1。}void main(void){TR0=0。TR1=0。IT1=0。 //INT1負(fù)跳變觸發(fā) //TMOD=0x11。//定時(shí)器工作方式 TH1=60。 TL1=176。 EA=1。 //CPU開(kāi)中斷總允許 ET1=1。 EX1=1。//開(kāi)外部INT1中斷 LCD_initial()。KeyValue=0。dcac=1。freq=50。rac=50。OUTPUT0=0。OUTPUT1=0。FLAG=1。 while(1) { switch(script) {case 0: LCD_set_position(5)。 LCD_prints(Hello)。 dcac=1。 k=10。 freq=1。 rac=50。 Tout=100。 OUTPUT0=0。 OUTPUT1=0。 TR0=0。 if(KeyValue) {Delay1ms(20)。 script=1。 KeyValue=0。 LCD_cls()。 } break。 case 1: while(KeyValue==2)dcac=1,KeyValue=0。 //交直流選擇 while(KeyValue==3)dcac=0,KeyValue=0。 Manag()。 if(KeyValue==1) {Delay1ms(20)。 if(dcac)script=2。 //直流模式 else script=15。 //交流模式 KeyValue=0。 LCD_cls()。 } break。 case 2: if(KeyValue==2) //設(shè)置f {Delay1ms(20)。 freq++,KeyValue=0。} if(KeyValue==3) {Delay1ms(20)。 freq,KeyValue=0。} DcConf(freq)。 if(KeyValue==4) {Delay1ms(20)。 script=1,KeyValue=0。 LCD_cls()。} if(KeyValue==1) {Delay1ms(20)。 script=3。 KeyValue=0。 LCD_cls()。 } break。 case 3: if(dcac) { if(KeyValue==2) //設(shè)置rac {Delay1ms(20)。 rac+=10,KeyValue=0。} if(KeyValue==3) {Delay1ms(20)。 rac=10,KeyValue=0。} DcConr(rac)。 } else { if(KeyValue==2) //設(shè)置k {Delay1ms(20)。 k+=1,KeyValue=0。} if(KeyValue==3) {Delay1ms(20)。 k=1,KeyValue=0。} DcConr(k)。 } if(KeyValue==4) {Delay1ms(20)。 script=2,KeyValue=0。 LCD_cls()。} if(KeyValue==1) {Delay1ms(20)。 script=4,KeyValue=0。 LCD_cls()。} break。 case 4: if(KeyValue==2) //設(shè)置Tout {Delay1ms(20)。 Tout+=10,KeyValue=0。} if(KeyValue==3) {Delay1ms(20)。 Tout=10,KeyValue=0。} DcCont(Tout)。 if(KeyValue==4) {Delay1ms(20)。 script=3,KeyValue=0。 LCD_cls()。} if(KeyValue==1) {Delay1ms(20)。 script=5,KeyValue=0。 LCD_cls()。} break。 case 5: DcConok()。 //確定輸出,出錯(cuò)檢查 if(KeyValue==4) {Delay1ms(20)。 script=4,KeyValue=0。 LCD_cls()。} if(dcac) { TMOD=0x11。//定時(shí)器工作方式 tempt0=(655361000/freq*rac/100)/256。 tempt1=(655361000/freq*rac/100)%256。 tempt2=(655361000/freq*(100rac)/100)/256。 tempt3=(655361000/freq*(100rac)/100)%256。 TH0=tempt0,TL0=tempt1。
點(diǎn)擊復(fù)制文檔內(nèi)容
職業(yè)教育相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1