diff --git a/ADF7021.h b/ADF7021.h index 023cb12..bca0df6 100644 --- a/ADF7021.h +++ b/ADF7021.h @@ -44,10 +44,10 @@ www.analog.com/media/en/technical-documentation/data-sheets/ADF7021.pdf #define ADF7021_PFD 3686400.0 // Deviation of modulator (REG 02) -#define ADF7021_DEV_DSTAR 42U -#define ADF7021_DEV_DMR 24U +#define ADF7021_DEV_DSTAR 43U +#define ADF7021_DEV_DMR 23U #define ADF7021_DEV_YSF 32U -#define ADF7021_DEV_P25 22U +#define ADF7021_DEV_P25 21U // TX/RX CLOCK register (REG 03) #define ADF7021_REG3_DSTAR 0x2A4C4193 @@ -129,6 +129,52 @@ www.analog.com/media/en/technical-documentation/data-sheets/ADF7021.pdf #define ADF7021_SLICER_TH_YSF 59U #define ADF7021_SLICER_TH_P25 45U +/****** Support for 12.2880 MHz TCXO ******/ +#elif defined(ADF7021_12_2880) + +// R = 4 +#define ADF7021_PFD 3072000.0 + +// Deviation of modulator (REG 02) +#define ADF7021_DEV_DSTAR 51U +#define ADF7021_DEV_DMR 28U +#define ADF7021_DEV_YSF 38U +#define ADF7021_DEV_P25 26U + +// TX/RX CLOCK register (REG 03) +#define ADF7021_REG3_DSTAR 0x29EC4153 +#define ADF7021_REG3_DMR 0x29ECA093 +#define ADF7021_REG3_YSF 0x29ECA093 +#define ADF7021_REG3_P25 0x29ECA093 + +// Discriminator bandwith, demodulator (REG 04) +// Bug in ADI evaluation software, use datasheet formula (4FSK) +#define ADF7021_DISC_BW_DSTAR 522U // K=85 +#define ADF7021_DISC_BW_DMR 492U // K=32 +#define ADF7021_DISC_BW_YSF 430U // K=28 +#define ADF7021_DISC_BW_P25 492U // K=32 + +// Post demodulator bandwith (REG 04) +#define ADF7021_POST_BW_DSTAR 10U +#define ADF7021_POST_BW_DMR 65U +#define ADF7021_POST_BW_YSF 65U +#define ADF7021_POST_BW_P25 65U + +// IF filter (REG 05) +#define ADF7021_REG5 0x00001ED5 + +// IF CAL (fine cal, defaults) (REG 06) +#define ADF7021_REG6 0x0505EBB6 + +// AFC (off, defaults) (REG 10) +#define ADF7021_REG10 0x3296556A + +// Slicer threshold for 4FSK demodulator (REG 13) +#define ADF7021_SLICER_TH_DSTAR 0U +#define ADF7021_SLICER_TH_DMR 51U +#define ADF7021_SLICER_TH_YSF 59U +#define ADF7021_SLICER_TH_P25 45U + #endif #define bitRead(value, bit) (((value) >> (bit)) & 0x01) diff --git a/Config.h b/Config.h index c27d925..1e11576 100644 --- a/Config.h +++ b/Config.h @@ -24,6 +24,7 @@ // TCXO of the ADF7021: #define ADF7021_14_7456 +// #define ADF7021_12_2880 // #define ADF7021_19_6800 // Host communication selection: