Appendix A – Sample Firmware
The following sample firmware allows an application to use a frequency agility
algorithm to allow the receiver to listen on an optimal frequency. In this sample,
there are three channel frequencies used: channel 27 (909.37MHZ), channel 51
(915.36MHz) and channel 75 (921.37MHz).
The application will periodically poll the receiver’s RSSI for each channel
frequency, selecting the frequency with the lowest RSSI. This will be the
listening channel of the receiver. When the application needs to transmit data,
it will send the same data message at each of the three channel frequencies.
When done transmitting, the application will put the NT module back into
receive mode, listening on the selected quietest channel.
//******************************************************************************
/*
--------------------------------------------------------------------------------
Overview: This function reads RSSI from the NT module on each of three
channel frequencies. The channel with the lowest value for RSSI
is selected as the active listening channel.
The order for serial communication is as follows:
1. Set the NT to software control for channel and RX/TX select.
2. Set the NT to receive mode.
3. Set the NT to each channel frequency while reading RSSI.
4. Set the NT to the 1st channel frequency.
5. Read RSSI from the NT module.
6. If RSSI is lower than the previous RSSI, use this channel.
7. Set the NT to the 2nd channel frequency.
8. Read RSSI from the NT module.
9. If RSSI is lower than the previous RSSI, use this channel.
10. Set the NT to the 3rd channel frequency.
11. Read RSSI from the NT module.
12. If RSSI is lower than the previous RSSI, use this channel.
13. Set the NT channel to the quietest frequency selected.
Input:
none
Output: none
--------------------------------------------------------------------------------
*/
//******************************************************************************
void Select_RX_Channel(void)
{
static unsigned int8 i, rx_ch, temp;
static unsigned int8 nt_rply[4] = {0,0,0,0};
static unsigned int8 channel[3] = {27,51,75};
static signed int8 prev_rssi;
static signed int8 rssi_val;
// Initialize the previous RSSI value to 0dBm
prev_rssi = 0;
// Initialize the RX channel to the 1st channel in the sequence
rx_ch = channel[0];
// Set the NT module for software control of Channel and RX/TX Select.
printf(“ %c%c%c%c ”, 0x02, 0x14, 0x05, 0xFF);
// Flush the NT ACK response by waiting for the terminating character
while (getc() != 0xFF);
– 8 –
NT Series Command Data Interface
Reference Guide RG-00101
相关PDF资料
TRX08GVP2540 TXRX OPT SCFF 8.5GB/S 850NM
TS-320240BRNO TCH PANEL 140X104 RESISTIVE MONO
TS-TFT3.5Z TOUCH PANEL 140X1.4.0 TFT
TS3-75B3 SENSOR THERMAL MOXIE NTC 75C
TSL26711FN IC PROXIMITY DETECTOR 6-DFN
TSOP57238TT1 IC IR RCVR MODULE 38KHZ
TSOP6238TT IR RECEIVER 38KHZ 40M TSOP6238
TSTFT3.5I# TOUCH PANEL 140X1.4.0 TFT
相关代理商/技术参数
TRM-900-TT 制造商:Linx Technologies Inc 功能描述:M2M ACCESSORY
TRM-900-TT-250 制造商:Linx Technologies Inc 功能描述:M2M ACCESSORY
TRM-915-DP1203 功能描述:射频模块 915 MHz Wireless Module DP1203 RoHS:否 制造商:Linx Technologies 产品:Transceiver Modules 频带:902 MHz to 928 MHz 输出功率:- 15.5 dBm to + 12.5 dBm 接口类型:UART 工作电源电压:- 0.3 VDC to + 5.5 VDC 传输供电电流:38.1 mA 接收供电电流:22.7 mA 天线连接器类型:U.FL 最大工作温度:+ 85 C 尺寸:1.15 mm x 0.63 mm x 0.131 mm
TRM-915-DP1205 功能描述:射频模块 915 MHz Wireless Module DP1205 RoHS:否 制造商:Linx Technologies 产品:Transceiver Modules 频带:902 MHz to 928 MHz 输出功率:- 15.5 dBm to + 12.5 dBm 接口类型:UART 工作电源电压:- 0.3 VDC to + 5.5 VDC 传输供电电流:38.1 mA 接收供电电流:22.7 mA 天线连接器类型:U.FL 最大工作温度:+ 85 C 尺寸:1.15 mm x 0.63 mm x 0.131 mm
TRM-915-DTS 功能描述:射频模块 915 MHz Wireless Module DTS North Am RoHS:否 制造商:Linx Technologies 产品:Transceiver Modules 频带:902 MHz to 928 MHz 输出功率:- 15.5 dBm to + 12.5 dBm 接口类型:UART 工作电源电压:- 0.3 VDC to + 5.5 VDC 传输供电电流:38.1 mA 接收供电电流:22.7 mA 天线连接器类型:U.FL 最大工作温度:+ 85 C 尺寸:1.15 mm x 0.63 mm x 0.131 mm
TRM-915-DTS-BRZ 功能描述:射频模块 Module DTS Brazil RoHS:否 制造商:Linx Technologies 产品:Transceiver Modules 频带:902 MHz to 928 MHz 输出功率:- 15.5 dBm to + 12.5 dBm 接口类型:UART 工作电源电压:- 0.3 VDC to + 5.5 VDC 传输供电电流:38.1 mA 接收供电电流:22.7 mA 天线连接器类型:U.FL 最大工作温度:+ 85 C 尺寸:1.15 mm x 0.63 mm x 0.131 mm
TRM-915-DTS-FCC 功能描述:射频模块 915 MHz Wireless Mod DTS FCC ST conn RoHS:否 制造商:Linx Technologies 产品:Transceiver Modules 频带:902 MHz to 928 MHz 输出功率:- 15.5 dBm to + 12.5 dBm 接口类型:UART 工作电源电压:- 0.3 VDC to + 5.5 VDC 传输供电电流:38.1 mA 接收供电电流:22.7 mA 天线连接器类型:U.FL 最大工作温度:+ 85 C 尺寸:1.15 mm x 0.63 mm x 0.131 mm
TRM-915-DTS-FCC-RA 功能描述:射频模块 915 MHz Wireless Mod DTS FCC RA conn RoHS:否 制造商:Linx Technologies 产品:Transceiver Modules 频带:902 MHz to 928 MHz 输出功率:- 15.5 dBm to + 12.5 dBm 接口类型:UART 工作电源电压:- 0.3 VDC to + 5.5 VDC 传输供电电流:38.1 mA 接收供电电流:22.7 mA 天线连接器类型:U.FL 最大工作温度:+ 85 C 尺寸:1.15 mm x 0.63 mm x 0.131 mm