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

正文內(nèi)容

基于delphi的pc機(jī)與單片機(jī)無(wú)線串口通訊--畢業(yè)設(shè)計(jì)(參考版)

2025-01-21 16:13本頁(yè)面
  

【正文】 /。i32。 // Spi enable for write a spi mand SpiWrite(RRP)。 DR ) { TRX_CE=0。 CD amp。 if( AM amp。 TRX_CE=0。 // Spi disable TRX_CE=1。i++) // Write 4 bytes address { SpiWrite([i+5])。 // Write address mand for (i=0。 CSN=0。 // Write 32 bytes Tx data } CSN=1。i32。 // Spi enable for write a spi mand SpiWrite(WTP)。 // Return function parameter}void TxPacket(unsigned char *TxBuf) //發(fā)送數(shù)據(jù)函數(shù){ unsigned char i。 SCK=0。 // Read data else DATA_BUF amp。 // Right shift DATA_BUF SCK=1。i8。 // Set clock line low } }unsigned char SpiRead(void) //讀取nRF905寄存器值函數(shù){ unsigned char i。 // Set clock line high DATA_BUF=DATA_BUF1。 else MOSI=0。i++) // Setup byte circulation bits { if (DATA_BUF amp。s parameter into a bdata variable for (i=0。 DATA_BUF=byte。 } CSN=1。i。 // Spi enable for write a spi mand SpiWrite(WC)。}void Config905(void) //配置nRF905配置寄存器函數(shù){ unsigned char i。 LED6 = 0。 LED4 = 0。 LED2 = 0。 LED7_DDR = 1。 LED5_DDR = 1。 LED3_DDR = 1。 LED1_DDR = 1。 DR_DDR = 0。 CSN_DDR = 1。 MOSI_DDR = 1。 PWR_UP_DDR = 1。 }void InitIO(void) // Initialize IO port{ TX_EN_DDR = 1。j10。i80。RX,TX Address is 4 Bytes, RX TX Payload Width is 32 *//************************************************************/void Delay(unsigned char n) //延時(shí)函數(shù){ unsigned int i,j。433MHZ。Fosc=16MHZ 8 Bits CRC And enable*//*The content of this struct is nRF90539。RFConfig RxTxConf ={ 10, 0x4C, 0x0c, 0x44, 0x20, 0x20, 0xcc, 0xcc, 0xcc,0xcc, 0x5F }。 unsigned char buf[10]。//nRF905驅(qū)動(dòng)程序unsigned char DATA_BUF。unsigned char dat。unsigned char TxBuf[32]。 } 0x12。 // The sfrb as 1 byte struct { // The sfrb as 7 bits unsigned char PORTD_Bit0:1, PORTD_Bit1:1, LED1:1, LED2:1, LED3:1, LED4:1, LED5:1, LED6:1。 } 0x11。 // The sfrb as 1 byte struct { // The sfrb as 7 bits unsigned char DDRD_Bit0:1, DDRD_Bit1:1, LED1_DDR:1, LED2_DDR:1, LED3_DDR:1, LED4_DDR:1, LED5_DDR:1, LED6_DDR:1。 } 0x15。 // The sfrb as 1 byte struct { // The sfrb as 7 bits unsigned char PORTC_Bit0:1, PORTC_Bit1:1, PORTC_Bit2:1, PWR_UP:1, TRX_CE:1, TX_EN:1, PORTC_Bit6:1。 } 0x14。 // The sfrb as 1 byte struct { // The sfrb as 7 bits unsigned char AM_DDR:1, CD_DDR:1, DDRC_Bit2:1, PWR_UP_DDR:1, TRX_CE_DDR:1, TX_EN_DDR:1, DDRC_Bit6:1。 } 0x13。 // The sfrb as 1 byte struct { // The sfrb as 7 bits unsigned char AM:1, CD:1, PINC_Bit2:1, PINC_Bit3:1, PINC_Bit4:1, PINC_Bit5:1, PINC_Bit6:1。 } 0x16。 // The sfrb as 1 byte struct { // The sfrb as 8 bits unsigned char PINB_Bit0:1, DR:1, PINB_Bit2:1, PINB_Bit3:1, MISO:1, PINB_Bit5:1, PINB_Bit6:1, PINB_Bit7:1。 } 0x17。 // The sfrb as 1 byte struct { // The sfrb as 8 bits unsigned char LED7_DDR:1, DR_DDR:1, CSN_DDR:1, MOSI_DDR:1, MISO_DDR:1, SCK_DDR:1, DDRB_Bit6:1, DDRB_Bit7:1。 } 0x18。 // The sfrb as 1 byte struct { // The sfrb as 8 bits unsigned char LED7:1, PORTB_Bit1:1, CSN:1, MOSI:1, PORTB_Bit4:1, SCK:1, PORTB_Bit6:1, PORTB_Bit7:1。參考文獻(xiàn)[1]周潤(rùn)景,景曉松,趙俊奇. OrCADamp。在后繼的設(shè)計(jì)中應(yīng)該注意到這點(diǎn)的應(yīng)用,并將串口無(wú)線通訊擴(kuò)展到USB無(wú)線通訊領(lǐng)域。采用了一有較為成熟的無(wú)線通訊模塊進(jìn)行數(shù)據(jù)的傳輸,采用簡(jiǎn)單易用的單片無(wú)線芯片,研究了無(wú)線芯片的使用和硬件電路的設(shè)計(jì),并且介紹了無(wú)線模塊的使用方法,編寫了無(wú)線模塊基于AVR單片機(jī)的驅(qū)動(dòng)程序,并在試驗(yàn)中證明程序的可靠性和方案的可行性。在單片機(jī)系統(tǒng)中,有硬件和相應(yīng)的軟件實(shí)現(xiàn)控制臺(tái)和單片機(jī)的命令及編碼后信息的傳遞,分析了一些編碼方法的使用,確保了通訊中控制信息的正確性。6 總結(jié)
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評(píng)公示相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1