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

正文內(nèi)容

基于單片機(jī)步進(jìn)式pwm信號(hào)輸出畢業(yè)設(shè)計(jì)(參考版)

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

【正文】 TH0=tempt0,TL0=tempt1。 tempt2=(655361000/freq*(100rac)/100)/256。//定時(shí)器工作方式 tempt0=(655361000/freq*rac/100)/256。 LCD_cls()。 //確定輸出,出錯(cuò)檢查 if(KeyValue==4) {Delay1ms(20)。} break。 script=5,KeyValue=0。 LCD_cls()。 if(KeyValue==4) {Delay1ms(20)。 Tout=10,KeyValue=0。 Tout+=10,KeyValue=0。} break。 script=4,KeyValue=0。 LCD_cls()。 } if(KeyValue==4) {Delay1ms(20)。 k=1,KeyValue=0。 k+=1,KeyValue=0。} DcConr(rac)。} if(KeyValue==3) {Delay1ms(20)。 case 3: if(dcac) { if(KeyValue==2) //設(shè)置rac {Delay1ms(20)。 LCD_cls()。 script=3。 LCD_cls()。 if(KeyValue==4) {Delay1ms(20)。 freq,KeyValue=0。 freq++,KeyValue=0。 } break。 //交流模式 KeyValue=0。 if(dcac)script=2。 Manag()。 case 1: while(KeyValue==2)dcac=1,KeyValue=0。 LCD_cls()。 script=1。 TR0=0。 OUTPUT0=0。 rac=50。 k=10。 LCD_prints(Hello)。FLAG=1。OUTPUT0=0。freq=50。KeyValue=0。 EX1=1。 EA=1。//定時(shí)器工作方式 TH1=60。IT1=0。}void main(void){TR0=0。else if(KEY4==0)KeyValue=4。else if(KEY2==0)KeyValue=2。 }}void EXINT1(void) interrupt 2 using 1{EX1=0。 ToutReal。TL1=176。 } }}/**********************T1中斷服務(wù)程序*******************/void timer1(void)interrupt 3 using 1{count1++。 tempt4=((long unsigned int)sine[acj])*k/10。 else OUTPUT1=1。 else OUTPUT0=1。 aci++。 OUTPUT0=0。 TL0=tempt3。 } if(tjump) { TH0=tempt2。//tempt1=(655361000/freq*rac/100)%256。//tempt0=(655361000/freq*rac/100)/256。}/**********************T0中斷服務(wù)程序*******************/void timer0(void)interrupt 1 using 1{if(dcac) { tjump=1tjump。LCD_set_position(0x4c)。LCD_set_position(0x45)。LCD_set_position(0x40)。}void DcStop(void){LCD_set_position(0)。if(dcac)LCD_prints(DC )。//LCD_set_position(0x48)。LCD_prints(Tout:)。 LCD_prints(/10 )。}else{ LCD_prints(k:)。 DispD(rac)。:39。if(dcac){ LCD_write_data(0xe0)。if(dcac)LCD_prints(KHz )。LCD_prints(f:)。LCD_prints(BACK)。LCD_prints(OK)。LCD_prints(OUTPUT NOW?)。LCD_prints(BACK)。LCD_prints(OK)。LCD_prints(S )。LCD_prints(Tout:)。LCD_prints(BACK)。LCD_prints(OK)。 LCD_prints(/10 )。 LCD_prints(k:)。 LCD_prints(% )。)。 LCD_write_data(39。}void DcConr(int dat){if(dcac) {LCD_set_position(0)。LCD_set_position(0x4c)。LCD_set_position(0x40)。if(dcac)LCD_prints(KHz )。LCD_prints(f:)。LCD_prints(OK)。else LCD_prints(SPWM)。LCD_set_position(7)。}void Manag(void){LCD_set_position(0)。LCD_set_position(0X40)。}void error(void){LCD_set_position(0)。 if(i)LCD_write_data(DataArray[j]+48)。j3。DataToChar(dat)。DataArray[1]=(dat/100)%10。DataArray[2]=((datDataArray[3])/10)%10。j++)。i++) for(j=0。 for(i=0。unsigned char code sjb[32]={100,93,87,80,73,67,60,53,47,40,33,27,20,13,7,0,0,7,13,20,27,33,40,47,53,60,67,73,80,87,93,100}。long unsigned int tempt0,tempt1,tempt2,tempt3,tempt4。unsigned int freq,rac,Tout,period,ToutReal。char DataArray[4]。 LCD_cls()。 LCD_write_instruction(LCD_DISPLAY_ON|LCD_CURSOR_OFF)。 i++。}*/void LCD_prints(unsigned char *lcd_string) //輸出一個(gè)字符串到LCD{ unsigned char i=0。}/*void LCD_go_home(void) //LCD光標(biāo)歸位{ LCD_write_instruction(LCD_GO_HOME)。 LCD_EN=0。 LCD_DATA=LCD_data。 LCD_RS=1。 LCD_EN=0。 LCD_DATA=LCD_instruction。 LCD_RS=0。 LCD_EN=0。 LCD_DATA=1。 LCD_RS=0。 } LCD_EN=0。 LCD_EN=1。 LCD_RW=1。 //LCD使能信號(hào)endif/* LCD1602的函數(shù) 作者:Computerlov 創(chuàng)建日期: 最后修改日期: 版本:*/include include void LCD_check_busy(void) //檢測(cè)LCD狀態(tài),看它是不是還在忙呢{ while(1) {LCD_EN=0。 //LCD讀寫控制sbit LCD_RS=P2^1。endif/* 硬件抽取層 作者:Computerlov 創(chuàng)建日期: 最后修改日期: 版本:*/ifndef __HARDWAR_H__define __HARDWAR_H__include /* LCD數(shù)據(jù)、控制口定義*/define LCD_DATA P1 //LCD的數(shù)據(jù)口sbit LCD_BUSY=LCD_DATA^7。sbit OUTPUT1=P3^1。 //確認(rèn)sbit KEY0=P3^2。 //上,加sbit KEY3=P2^5。 endififndef __KEY_H__define __KEY_H__sbit KEY1=P2^3。void LCD_prints(unsigned char *)。void LCD_initial(void)。圖15 電路原理圖附錄2:源程序程序/* LCD1602的一些命令定義 作者:Computerlov 創(chuàng)建日期: 最后修改日期: 版本:*/ifndef __LCD_H__define __LCD_H__define LCD_GO_HOME 0x02 //AC=0,光標(biāo)、畫面回HOME位//輸入方式設(shè)置define LCD_AC_AUTO_INCREMENT 0x06 //數(shù)據(jù)讀、寫操作后,AC自動(dòng)增一define LCD_AC_AUTO_DECREASE 0x04 //數(shù)據(jù)讀、寫操作后,AC自動(dòng)減一define LCD_MOVE_ENABLE 0x05 //數(shù)據(jù)讀、寫操作,畫面平移define LCD_MOVE_DISENABLE 0x04 //數(shù)據(jù)讀、寫操作,畫面不動(dòng)//設(shè)置顯示、光標(biāo)及閃爍開、關(guān)define LCD_DISPLAY_ON 0x0C //顯示開define LCD_DISPLAY_OFF 0x08 //顯示關(guān)define LCD_CURSOR_ON 0x0A //光標(biāo)顯示define LCD_CURSOR_OFF 0x08 //光標(biāo)不顯示define LCD_CURSOR_BLINK_ON 0x09 //光標(biāo)閃爍define LCD_CURSOR_BLINK_OFF 0x08 //光標(biāo)不閃爍//光標(biāo)、畫面移動(dòng),不影響DDRAMdefine LCD_LEFT_MOVE 0x18 //LCD顯示左移一位define LCD_RIGHT_MOVE 0x1C //LCD顯示右移一位define LCD_CURSOR_LEFT_MOVE 0x10 //光標(biāo)左移一位de
點(diǎn)擊復(fù)制文檔內(nèi)容
職業(yè)教育相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1