#1223·hackrf

[Question]: What is the granularity of sample rate?

Author: BenHut1Created Nov 9, 2022Updated Jul 14, 2026
Labelsquestiondocumentation

What would you like to know?

How precisely can I set the HackRF's sample rate? To the nearest MHz? Or to the nearest Hz? Or something in between?

I'm asking because I was wondering if I could set the sample rate to 4,800,000 MHz. This would be ideal for audio, as it's an exact power-of-ten multiple of 48kHz (a common sound card sample rate) which would greatly simplify the algorithm used to upscale audio data from my microphone to the HackRF sample rate, so as to be able to transmit live audio coming into my sound card from the microphone.

Likewise if I could set the sample rate of the HackRF to exactly 14,318,180Hz (14.31880MHz) this would be great, as this is an exact multiple (4 times, specifically) of the chroma carrier frequency in NTSC TV. This sample rate would put the chroma carrier exactly half way between the 0Hz and the nyquist limit. If this exact sample rate (accurate to 1Hz precision) could be used with the HackRF, it would greatly simplify software I'm writing to transmit or receive NTSC video. With both transmitting and receiving, it would allow my image frame's full width (including all sync and blanking) to be an integer number (so it can be measured in pixels, and I don't have to worry about fractions of a pixel in the width of the image). Specifically the image width would be 910 pixels in this case. For receiving specifically, it would also make it much easier to separate the luma and chroma signals, using simply a horizontal kernel filter of (1, 0, 1) for extracting luma and a horizontal kernel filter of (-1, 0, 1) for extracting chroma.

Source: greatscottgadgets/hackrf