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>
This commit is contained in:
Steve Markgraf
2012-09-13 21:53:51 +02:00
parent 1533422f98
commit fc5881d4cd
3 changed files with 84 additions and 12 deletions

View File

@ -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);

View File

@ -5,6 +5,8 @@
#define R820T_CHECK_ADDR 0x00
#define R820T_CHECK_VAL 0x69
#define R820T_IF_FREQ 3570000
//***************************************************************
//* INCLUDES.H
//***************************************************************