1、SPI MSB優先,8Bit寄存器地址與內容;
2、寄存器結構與之前使用的LT8900不同,分為R、W寄存器與特殊功能寄存器;
3、特別注意:在TX、RX、RT中斷或者輪詢後置1,必須寫1清零與清除相應的FIFO,否則第二次無法進入中斷(IRQ無法拉低,維持高電平);
4、在多對一工作模式下,RX各管道設定對應唯一的地址,TX的地址統一設定TXADDR與RXPIPE0,詳細設定見:
說明:
The PRX, using multiceiver and Enhanced ShockBurst, receivespackets from more than one PTX. To
ensure that the ACK packet from the PRX is transmitted to the correct PTX, thePRX takes the data pipe
address where it received the packet and uses it as the TX address whentransmitting the ACK packet.
Figure 12. is an example of how address configuration could be for the PRX andPTX. On the PRX the
RX_ADDR_Pn, defined as the pipe address, must be unique. On the PTX the TX_ADDRmust be the same
as the RX_ADDR_P0 and as the pipe address for the designated pipe.
No other data pipe can receivedata until a complete packet is received by a data pipe that has detected its
address. When multiple PTXs are transmitting to a PRX, the ARD canbe used to skew the auto retransmission
so that they only block each other once.
詳細請參見24L01 DS.
附:Demo設定TX ,RX
void SetRF_RX_Mode(void){uint16_t GetCurrRFChNo;Cls_CE();ClearRXFifo();SetRF2G4Reg(SETUP_AW,ADDR_WIDTH); SetRF2G4Reg(RX_PW_P0,32);SetRF2G4Reg(RX_PW_P1,32);WriteRFADDR(RX_ADDR_P0,TX_ADDRESS,5);WriteRFADDR(RX_ADDR_P1,TX_ADDRESS1,5); SetRF2G4Reg(EN_AA,0x003); SetRF2G4Reg(EN_RXADDR,0x03);
SetRF2G4Reg(FEATURE, 0x04); SetRF2G4Reg(DYNPD,0x03); SetRF2G4Reg(RF_CH,0x40);SetRF2G4Reg(RF_SETUP,0x07); SetRF2G4Reg(CONFIG,0x0f);Set_CE();#ifndef RF_Debugprintf("Set RF to RX mode!\n");#endif}void SetRF_TX_mode(void){ uint16_t GetCurrRFChNo;Cls_CE();ClearTXFifo(); SetRF2G4Reg(SETUP_AW,ADDR_WIDTH); SetRF2G4Reg(FEATURE, 0x04); #if 0 WriteRFADDR(TX_ADDR,TX_ADDRESS,5); WriteRFADDR(RX_ADDR_P0,TX_ADDRESS,5);#else WriteRFADDR(TX_ADDR,TX_ADDRESS1,5); WriteRFADDR(RX_ADDR_P0,TX_ADDRESS1,5);#endifSetRF2G4Reg(EN_AA,0x01); SetRF2G4Reg(EN_RXADDR,0x01); SetRF2G4Reg(DYNPD,0x01); SetRF2G4Reg(RF_CH,0x40);SetRF2G4Reg(SETUP_RETR,0x13); SetRF2G4Reg(RF_SETUP,0x07); SetRF2G4Reg(CONFIG,0x0e);CurrentRF_Mode = RFTXD_Mode;Set_CE();#ifndef RF_Debugprintf("Set RF to TX mode!\n");#endif}