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

正文內(nèi)容

基于無(wú)線網(wǎng)絡(luò)的溫度檢測(cè)器課程設(shè)計(jì)-資料下載頁(yè)

2024-08-28 17:36本頁(yè)面

【導(dǎo)讀】輸、溫度顯示和超限報(bào)警功能的儀器。系統(tǒng)由發(fā)送端和接收端兩部分組成。本設(shè)計(jì)利用軟件Keil進(jìn)行系統(tǒng)程序設(shè)計(jì),利用單片機(jī)學(xué)習(xí)板進(jìn)行硬。文中詳細(xì)介紹了溫度采集模塊、無(wú)線傳輸模塊、顯示模塊、溫度限設(shè)置模塊。和報(bào)警電路的設(shè)計(jì)方法和過(guò)程。當(dāng)采樣點(diǎn)的溫度值超出規(guī)定值時(shí),系統(tǒng)通過(guò)報(bào)警。電路提醒監(jiān)測(cè)人員。同時(shí),檢測(cè)人員可以通過(guò)鍵盤(pán)對(duì)具體報(bào)警點(diǎn)的溫度值進(jìn)行設(shè)。另外,該系統(tǒng)溫度檢測(cè)具有較高的精度,無(wú)線數(shù)據(jù)傳輸穩(wěn)定,而且傳輸距離。并通過(guò)無(wú)線網(wǎng)絡(luò)發(fā)送。當(dāng)溫度到達(dá)規(guī)定值時(shí),主機(jī)通過(guò)蜂鳴器報(bào)警。采用單片集成電路AT89C52結(jié)合數(shù)字型溫度傳感器DS18B20設(shè)計(jì)實(shí)現(xiàn)。其中AT89C52及其外圍電路實(shí)。完全兼容8051單片機(jī),增加了新的功能,新增兩級(jí)中斷優(yōu)先級(jí),多一個(gè)外中斷,考慮到快速開(kāi)發(fā)以及本系統(tǒng)的應(yīng)用要求,最后。采用了最常用的STC89C52單片機(jī)。和750ms內(nèi)完成9位和12位的數(shù)字量讀取。NRF24L01是NORDIC公司最近生產(chǎn)的一款無(wú)線通信芯片,采用FSK調(diào)制,內(nèi)部集成NORDIC自己的EnhancedShortBurst協(xié)議。文件,可以直接加工生產(chǎn)。

  

【正文】 e NRF24L01_CONFIG 0x00 define NRF24L01_EN_AA 0x01 define NRF24L01_EN_RXADDR 0x02 define NRF24L01_SETUP_AW 0x03 define NRF24L01_SETUP_RETR 0x04 define NRF24L01_RF_CH 0x05 define NRF24L01_RF_SETUP 0x06 define NRF24L01_STATUS 0x07 define NRF24L01_OBSERVE_TX 0x08 define NRF24L01_CD 0x09 define NRF24L01_RX_ADDR_P0 0x0A define NRF24L01_RX_ADDR_P1 0x0B define NRF24L01_RX_ADDR_P2 0x0C define NRF24L01_RX_ADDR_P3 0x0D define NRF24L01_RX_ADDR_P4 0x0E define NRF24L01_RX_ADDR_P5 0x0F define NRF24L01_TX_ADDR 0x10 define NRF24L01_RX_PW_P0 0x11 define NRF24L01_RX_PW_P1 0x12 define NRF24L01_RX_PW_P2 0x13 define NRF24L01_RX_PW_P3 0x14 define NRF24L01_RX_PW_P4 0x15 define NRF24L01_RX_PW_P5 0x16 define NRF24L01_FIFO_STATUS 0x17 define NRF24L01_TX_ADR_WIDTH 5 define NRF24L01_RX_ADR_WIDTH 5 define NRF24L01_TX_PLOAD_WIDTH 20 define NRF24L01_RX_PLOAD_WIDTH 20 extern unsigned char NRF24L01_SPI_RW(unsigned char byte)。 extern unsigned char NRF24L01_SPI_Read(unsigned char reg)。 extern unsigned char NRF24L01_SPI_RW_Reg(unsigned char reg, unsigned char value)。 extern unsigned char NRF24L01_SPI_Write_Buf(unsigned char reg, unsigned char *pBuf, unsigned char uchars)。 //extern unsigned char NRF24L01_SPI_Read_Buf(unsigned char reg, unsigned char *pBuf, unsigned char uchars)。 //extern void SetRX_Mode()。 //extern unsigned char NRF24L01_RxPacket(unsigned char *rx_buf)。 extern void NRF24L01_TxPacket(unsigned char *tx_buf)。 extern void NRF24L01_Init()。 extern unsigned char NRF24L01_TX_Buffer[3]。 extern unsigned char NRF24L01_RX_Buffer[3]。 extern unsigned char bdata STA。 endif 、 include include unsigned char NRF24L01_TX_Buffer[32]。 unsigned char NRF24L01_RX_Buffer[32]。 unsigned char const NRF24L01_TX_ADDRESS[NRF24L01_TX_ADR_WIDTH]= {0xCF,0xCF,0xCF,0xCF,0xCF}。 unsigned char const NRF24L01_RX_ADDRESS[NRF24L01_RX_ADR_WIDTH]= {0x37,0x43,0x10,0x10,0xFF}。 unsigned char const NRF24L01_RX1_ADDRESS[NRF24L01_RX_ADR_WIDTH]= {0x35,0x43,0x10,0x10,0x03}。 unsigned char const NRF24L01_RX2_ADDRESS[1]= {0x36}。 unsigned char const NRF24L01_RX3_ADDRESS[1]= {0x34}。 unsigned char const NRF24L01_RX4_ADDRESS[1]= {0x38}。 unsigned char const NRF24L01_RX5_ADDRESS[1]= {0x39}。 unsigned char bdata STA。 sbit STAbits_RX_DR =STA^6。 sbit STAbits_TX_DS =STA^5。 sbit STAbits_MAX_RT =STA^4。 unsigned char NRF24L01_SPI_RW(unsigned char byte) { unsigned char i。 for( i = 0。 i 8 。 i++ ) { NRF24L01_MOSI = (byte amp。 0x80)。 _nop_()。 byte = 1。 NRF24L01_SCK = 1。 _nop_()。 byte |= NRF24L01_MISO。 // capture current MISO bit _nop_()。 NRF24L01_SCK = 0。 _nop_()。 } return(byte)。 } unsigned char NRF24L01_SPI_Read(unsigned char reg) { unsigned char reg_val。 NRF24L01_CSN = 0。 _nop_()。 NRF24L01_SPI_RW(reg)。 reg_val = NRF24L01_SPI_RW(0)。 NRF24L01_CSN = 1。 _nop_()。 return(reg_val)。 } unsigned char NRF24L01_SPI_RW_Reg(unsigned char reg, unsigned char value) { unsigned char status。 NRF24L01_CSN = 0。 _nop_()。 status = NRF24L01_SPI_RW(reg)。 NRF24L01_SPI_RW(value)。 NRF24L01_CSN = 1。 _nop_()。 return(status)。 } unsigned char NRF24L01_SPI_Read_Buf(unsigned char reg, unsigned char *pBuf, unsigned char uchars) { unsigned char status,i。 NRF24L01_CSN = 0。 _nop_()。 status = NRF24L01_SPI_RW(reg)。 for( i = 0 。 i uchars 。 i++ ) pBuf[i] = NRF24L01_SPI_RW(0)。 NRF24L01_CSN = 1。 _nop_()。 return(status)。 } unsigned char NRF24L01_SPI_Write_Buf(unsigned char reg, unsigned char *pBuf, unsigned char uchars) { unsigned char status,i。 NRF24L01_CSN = 0。 _nop_()。 status = NRF24L01_SPI_RW(reg)。 for( i = 0 。 i uchars 。 i++ ) NRF24L01_SPI_RW(*pBuf++)。 NRF24L01_CSN = 1。 _nop_()。 return(status)。 } unsigned char NRF24L01_RxPacket(unsigned char *rx_buf) { unsigned char revale = 0 , i = 130。 NRF24L01_CE = 0。 _nop_()。 NRF24L01_SPI_RW_Reg( NRF24L01_WRITE_REG + NRF24L01_CONFIG, 0x0f)。 NRF24L01_CE = 1。 while(i)。 STA=NRF24L01_SPI_Read( NRF24L01_STATUS )。 if(STAbits_RX_DR) { NRF24L01_CE = 0。 NRF24L01_SPI_Read_Buf( NRF24L01_RD_RX_PLOAD , rx_buf , NRF24L01_RX_PLOAD_WIDTH )。// read receive payload from RX_FIFO buffer revale =1。 } NRF24L01_SPI_RW_Reg( NRF24L01_WRITE_REG + NRF24L01_STATUS , STA )。 return revale。 } void NRF24L01_Init() { unsigned char i = 100。 while(i)。 NRF24L01_CE = 0。 NRF24L01_CSN = 1。 NRF24L01_SCK = 0。 NRF24L01_SPI_Write_Buf(NRF24L01_WRITE_REG + NRF24L01_TX_ADDR, NRF24L01_TX_ADDRESS, NRF24L01_TX_ADR_WIDTH)。 NRF24L01_SPI_Write_Buf(NRF24L01_WRITE_REG + NRF24L01_RX_ADDR_P0,NRF24L01_RX_ADDRESS, NRF24L01_RX_ADR_WIDTH)。 NRF24L01_SPI_Write_Buf(NRF24L01_WRITE_REG + NRF24L01_RX_ADDR_P1,NRF24L01_RX_ADDRESS, NRF24L01_RX_ADR_WIDTH)。 NRF24L01_SPI_Write_Buf(NRF24L01_WRITE_REG + NRF24L01_RX_ADDR_P2,NRF24L01_RX_ADDRESS, 1)。 NRF24L01_SPI_Write_Buf(NRF24L01_WRITE_REG + NRF24L01_RX_ADDR_P3,NRF24L01_RX_ADDRESS, 1)。 NRF24L01_
點(diǎn)擊復(fù)制文檔內(nèi)容
高考資料相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1