diff options
author | Steve Markgraf <steve@steve-m.de> | 2012-09-13 21:53:51 +0200 |
---|---|---|
committer | Steve Markgraf <steve@steve-m.de> | 2012-09-13 21:53:51 +0200 |
commit | fc5881d4cd6f778b080a3008dbcf4157ae1e13a2 (patch) | |
tree | fa0ead2f95c413692285cfa05b873cc312a3bbb8 /include | |
parent | 1533422f982b66b340da26357608cb479b3ff7dd (diff) |
add support for direct sampling mode
This commit adds the function rtlsdr_set_direct_sampling()
which can be used to enable/disable a mode where the
RTL2832 acts as a direct sampling receiver.
This mode disables the tuner, and by attaching a long
wire, or better, a 50Ω to 200Ω transformer and a lowpass-
filter to the In-phase ADC input (pin 1 or 2 of the RTL2832,
whereas pin 1 is at the molded dot) it is possible to listen to
shortwave radio stations. The coupling capacitors can be
left in place, but for better results they should be removed.
Tuning in this mode is done with the DDC, and since the
ADC samples with 28.8 MHz, tuning is possible from 0 to
28.8 MHz.
Signed-off-by: Steve Markgraf <steve@steve-m.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/rtl-sdr.h | 12 | ||||
-rw-r--r-- | include/tuner_r820t.h | 2 |
2 files changed, 14 insertions, 0 deletions
diff --git a/include/rtl-sdr.h b/include/rtl-sdr.h index 2b9fff0..98c9992 100644 --- a/include/rtl-sdr.h +++ b/include/rtl-sdr.h @@ -229,6 +229,18 @@ RTLSDR_API int rtlsdr_set_testmode(rtlsdr_dev_t *dev, int on); */ RTLSDR_API int rtlsdr_set_agc_mode(rtlsdr_dev_t *dev, int on); +/*! + * Enable or disable the direct sampling mode. When enabled, the IF mode + * of the RTL2832 is activated, and rtlsdr_set_center_freq() will control + * the IF-frequency of the DDC, which can be used to tune from 0 to 28.8 MHz + * (xtal frequency of the RTL2832). + * + * \param dev the device handle given by rtlsdr_open() + * \param direct sampling mode, 1 means enabled, 0 disabled + * \return 0 on success + */ +RTLSDR_API int rtlsdr_set_direct_sampling(rtlsdr_dev_t *dev, int on); + /* streaming functions */ RTLSDR_API int rtlsdr_reset_buffer(rtlsdr_dev_t *dev); diff --git a/include/tuner_r820t.h b/include/tuner_r820t.h index 058a9f2..5d15bfe 100644 --- a/include/tuner_r820t.h +++ b/include/tuner_r820t.h @@ -5,6 +5,8 @@ #define R820T_CHECK_ADDR 0x00 #define R820T_CHECK_VAL 0x69 +#define R820T_IF_FREQ 3570000 + //*************************************************************** //* INCLUDES.H //*************************************************************** |