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

正文內(nèi)容

接口技術(shù)課程設(shè)計---基于rs232串口的數(shù)據(jù)采集系統(tǒng)設(shè)計與實現(xiàn)(編輯修改稿)

2024-12-04 09:19 本頁面
 

【文章內(nèi)容簡介】 } //波特率設(shè)置初始化 // void rs232_init() { TMOD=0x20。 TL1=0xFD。 //9600 比特 /秒 for TH1=0xFD。 PCON=0x00。 TR1=1。 SCON=0x50。 ES=1。//允許串行口中斷 EA=1。//開總中斷 } //發(fā)送字符 // void send(uchar i) { SBUF=i。 while(!TI)。 TI=0。 } void rs232_isr() interrupt 4 using 1 { if(RI) { rbuf = SBUF。 RI = 0。 } if(rbuf == 0xF0) start=0。 if(rbuf == 0x80) start=1。 /*===========================================================*/ // 源代碼 include include include define uchar unsigned char define uint unsigned int sfr P1M0=0x91。 sfr P1M1 =0x92。 sfr ADC_CONTR =0XC5。 sfr AUXR = 0x8e。 sfr ADC_DATA =0xC6。 sfr ADC_LOW =0xBE。 uchar rbuf。 uchar start。 uint V。 uint Vref。 delay(uchar count) { uchar m,n。 for(m=0。m=count。m++) for(n=0。n240。n++)。 } /*ADC 初始化 */ void adc_init() { P1M0=0xff。 P1M1=0x00。 ADC_DATA = 0。 //數(shù)據(jù)清 零 ADC_LOW = 0。 ADC_CONTR = 0xe0。 //開 ADC 電源 ,采集速度選擇最高 delay(200)。 } void get_adc(uchar ch) { ADC_CONTR = (0xe8 | ch)。// 開啟轉(zhuǎn)換 while(!(ADC_CONTRamp。0x10))。// 等待轉(zhuǎn)換完成 ADC_CONTRamp。=0xe7。 //清除 start,flag 標志 } void main() { rs232_init()。 adc_init()。 while(1) { get_adc(0x00)。//通道 0 參考 Vref = (uint)((ADC_DATA2)|ADC_LOW)。 get_adc(0x01)。 V = (uint)((ADC_DATA2)|ADC_LOW)。 send(39。A39。)。 //send(39。A39。)。 send(Vref8)。 send(Vref)。 send(V8)。 send(V)。 send(39。z39。)。 delay(250)。 delay(250)。 delay(250)。 delay(250)。 delay(250)。 } } 附錄二: VC程序代碼 定義的成員變量: public: int X。 CDC* pDC1。 int m_BaundRate。 int count。 CWnd* pWndpicture。 void pictureinit(void)。 CDC* pDC。 int m_port。 CWangfei311Dlg(CWnd* pParent = NULL)。 // standard constructor void InitComm()。 添加的成員函數(shù): void CWangfei311Dlg::InitComm() { (m_port)。 (1)。 if(m_BaundRate == 1200) (1200
點擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1