im-me icon indicating copy to clipboard operation
im-me copied to clipboard

RSSI ^ 0x80

Open Ivan275g4 opened this issue 3 years ago • 0 comments

im-me/specan/src/specan.c Line:542 chan_table[ch].ss[sweep] = (RSSI ^ 0x80);

Where does the 0x80 come from? What does it do? Is it a short cut to skip the harder math?

The PDF for the 1110 states: The RSSI value read from the RSSI status register is a 2’s complement number. The following procedure can be used to convert the RSSI reading to an absolute power level (RSSI_dBm).

  1. Read the RSSI status register
  2. Convert the reading from a hexadecimal number to a decimal number (RSSI_dec)
  3. If RSSI_dec ≥ 128 then RSSI_dBm = (RSSI_dec – 256)/2 – RSSI_offset
  4. Else if RSSI_dec < 128 then RSSI_dBm = (RSSI_dec)/2 – RSSI_offset

Ivan275g4 avatar Feb 24 '22 02:02 Ivan275g4