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

正文內(nèi)容

測(cè)控技術(shù)與儀器測(cè)控技術(shù)實(shí)驗(yàn)報(bào)告-資料下載頁(yè)

2024-10-21 17:55本頁(yè)面

【導(dǎo)讀】硬件使用的是單片機(jī)SS-8051高級(jí)單片機(jī)實(shí)驗(yàn)儀,軟件使用的是Keiluv2軟件開(kāi)發(fā)環(huán)境。在出現(xiàn)的對(duì)話框中選。↙,建立一個(gè)新文件,在打開(kāi)的窗口下輸入程序,取文件名并存盤(pán)。SourceGroup1點(diǎn)擊鼠標(biāo)右鍵,在出現(xiàn)的菜單中選中AddFilestoGroup`SourceGroup1`,將文件加入到項(xiàng)目中。在出現(xiàn)的對(duì)話框中打開(kāi)output項(xiàng)的對(duì)話框,選中`GreatHEXFile`,以保證編譯時(shí)能生成.HEX文件,為后續(xù)下載程序做準(zhǔn)備。,編譯所輸入的程序,檢查語(yǔ)法錯(cuò)誤,更改錯(cuò)誤直至無(wú)錯(cuò)為止。,存盤(pán)并加入項(xiàng)目中。連線并編制程序,完成單片機(jī)與PC機(jī)通信的功能。該程序的功能是將PC機(jī)中發(fā)來(lái)的數(shù)據(jù)接收之后又發(fā)送出來(lái),在PC機(jī)端則在接收之后在窗口中顯示。連線并編制程序:使用定時(shí)器和計(jì)數(shù)器完成LM331脈沖輸出信號(hào)的采集功能,對(duì)采集的數(shù)據(jù)進(jìn)行處理,最終得到頻率值。學(xué)習(xí)定時(shí)器中斷間隔時(shí)間的計(jì)算;

  

【正文】 Tian // 20200717 include // Hardware configuration define PRINTER_DATA P0 // 定義打印機(jī)數(shù)據(jù)線端口 sbit BUSY = P3^2。 // 定義打印機(jī)忙信號(hào)引腳 sbit nSTB = P3^7。 // 定義打印機(jī) nSTB 信號(hào)引腳 sbit PE = P3^3。 // 定義打印機(jī)紙狀態(tài)檢測(cè)信號(hào)引腳 sbit nACK = P3^2。 // 定義打印機(jī)應(yīng)答信號(hào)引腳 sbit nERR = P3^1。 // 定義打印機(jī)錯(cuò)誤檢測(cè)信號(hào)引腳 sbit nSEL = P3^0。 // 定義打印機(jī)在線檢測(cè) 信號(hào)引腳 define CR 0x0d define LF 0x0a void PrintByte(unsigned char byte_data)。 void PrintString(char* str)。 void PrintByteN(unsigned char* data_src,unsigned char N)。 void main(void) { char str[] = Printer demo。 PrintString(北京煒煌 WH)。 PrintByte(CR)。 while(1)。 } /* PrintByte() * Send a byte to printer * Nocky Tian @ 2020717 */ include void PrintByte(unsigned char byte_data) { while( BUSY == 1 ){ } PRINTER_DATA = byte_data。 nSTB = 0。 _nop_()。 // 調(diào)整 nSTB 信號(hào)脈寬 nSTB = 1。 } /* PrintString() * Print a string which is ending with a 39。\039。 character * To Excuted the print mand a addition CR character is needed * Nocky Tian @ 2020717 */ void PrintString(char* str) { while( *str ){ PrintByte( *(str++))。 } } /* PrintByteN() * Print N bytes through printer * no more than 255 bytes could be printed by the function * If more than 255 bytes need printing, the type of N need changing * to unsigned int, even unsigned long if necessary. * Nocky Tian @ 20200717 */ void PrintByteN( unsigned char* data_src, // pointer to data source unsigned char N) // number of data(byte) { while( N){ PrintByte(*(data_src++))。 } } // 北京煒煌科技打印機(jī)示例程序 // Nocky Tian // 20200717 include // Hardware configuration define PRINTER_DATA P0 // 定義打印機(jī)數(shù)據(jù)線端口 sbit BUSY = P3^2。 // 定義打印機(jī)忙信號(hào)引腳 sbit nSTB = P3^7。 // 定義打印機(jī) nSTB 信號(hào)引腳 sbit PE = P3^3。 // 定義打印機(jī)紙狀態(tài)檢測(cè)信號(hào)引腳 sbit nACK = P3^2。 // 定義打印機(jī)應(yīng)答信號(hào)引腳 sbit nERR = P3^1。 // 定義打印機(jī)錯(cuò)誤檢測(cè)信號(hào)引腳 sbit nSEL = P3^0。 // 定義打印機(jī)在線檢測(cè)信號(hào)引腳 define CR 0x0d define LF 0x0a void PrintByte(unsigned char byte_data)。 void PrintString(char* str)。 void PrintByteN(unsigned char* data_src,unsigned char N)。 void main(void) { char str[] = Printer demo。 PrintString(北京煒煌 WH)。 PrintByte(CR)。 PrintByte(LF)。 PrintByte(LF)。 while(1)。 } /* PrintByte() * Send a byte to printer * Nocky Tian @ 2020717 */ include void PrintByte(unsigned char byte_data) { while( BUSY == 1 ){ } PRINTER_DATA = byte_data。 nSTB = 0。 _nop_()。 // 調(diào)整 nSTB 信號(hào)脈寬 nSTB = 1。 } /* PrintString() * Print a string which is ending with a 39。\039。 character * To Excuted the print mand a addition CR character is needed * Nocky Tian @ 2020717 */ void PrintString(char* str) { while( *str ){ PrintByte( *(str++))。 } } /* PrintByteN() * Print N bytes through printer * no more than 255 bytes could be printed by the function * If more than 255 bytes need printing, the type of N need changing * to unsigned int, even unsigned long if necessary. * Nocky Tian @ 20200717 */ void PrintByteN( unsigned char* data_src, // pointer to data source unsigned char N) // number of data(byte) { while( N){ PrintByte(*(data_src++))。 } } 六.實(shí)驗(yàn)結(jié)果
點(diǎn)擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1