USRP N320 Low Band Center Frequency Shift - gnuradio

I have an USRP N320 SDR and I have an issue with 3 MHz-450 MHz band center frequency value. When I have a signal between 450 MHz and 6 GHz, I can see the actual frequency value of the signal even if I slide the center frequency but below 450 MHz, the signal is shifted negatively when I slide the center frequency. Is there any reason and solution for this issue? Any help?
As you can see in Figure 1, the FM radio signals are correctly seen when I set the Rx Tune Frequency to 100 MHz.
1
But when I slide the Rx Tune Frequency to 110, 120,130 and 140 MHz, the FM radio signals' frequency values are also shifted. As you can see in Figure 2, 3 ,4 and 5.
2
3
4
5
Addition:
The main picture of the blocks and parameters of USRP source are below figures.
Blocks
USRP Source 1
USRP Source 2
USRP Source 3
Also I figured out that when I applied below 450 MHz, for example 100 MHz signal and shifted center frequency with an amount, it shifts the signal double time inverse. I might not explain well but below figures does.
100MHz Signal at 100 MHZ center frequency
100MHz Signal at 95 MHz Center frequency but appeared at 90 MHz
100MHz Signal at 110 MHz Center frequency but appeared at 120MHz
But When I applied a signal above 450 MHz, for example 2 GHz, it does work properly. As you can see in figure below.
2 GHz given signal can correctly seen in any other center frequency

Related

Input capture timer 1 atmega 328p to calculate duty cycle

I am new to MP programming and I am working on a project with codevision program, which requires to:
Connect potentiometer at A0.
Generate a PWM signal with an equivalent average DC voltage to the measured value of the voltage of the potentiometer.
The measured voltage from the DAC is displayed on line 1 of lcd (16*2).
Choose a suitable RC circuit to get a pure DC voltage.
Connect the generated PWM signal to the ICP1 and calculate its duty cycle and display it on line 2 off the screen.
So the screen should be like:
Pot1 = 0.000 V
Duty Cycle = ..%
I made the first line but I don't know how to implement timer1 into this requirement.
Also timer 1 has ICRH and ICRL and I am confused which of them should be used.

GNURadio - WX FFT Plot not showing frequency on the x axis

I'm using WX GUI FFT to display a specific frequency range (38Hz for IR). I can't seem to get the plot to show the frequency range on the x axis. I have it set up like follows:
And here's what it looks like when it runs:
As can be seen there's no frequency range on the x axis.
Any idea what I'm doing wrong?
The display is absolutely correct.
You set the sampling rate, and hence the bandwidth to be displayed, to be nominally 10 MHz, so each of the ten divisions of the x-Axis should be 1 MHz wide.
Now, your center frequency is in fact of course not 0 MHz, but 38 kHz, but WX GUI rounds the numbers for display – it's really not that useful to see "0.038 MHz" as an axis label.
More importantly, you seem to be confused about what the sampling rate and what the center frequency are supposed to be; my gut feeling is that you want to observe an 38 kHz wide channel around 10 MHz. What you do is observe 10 MHz around 38 kHz (which, physically, doesn't make much sense, and you should see very clear warnings about that in the console).
Furthermore, WX is going away with the next release of GNU Radio. Use the Qt GUI instead.

How to get UART to work in PIC32 with correct clock frequency and baud rate?

I am working on UART with pic32mx5xx. All I need is to send a message from pic to terminal (Putty), but it is not working as I would get invalid characters appearing. The baud rate is set to 19200, how do I calculate the clock frequency?
Is it true that the clock frequency of the UART is 16 times the baud rate. If I do the math the clock frequency should be 307200, but this is doesn't seem right.
Can someone help me understand how baud rate and clock frequency relate to each other ? Also how to calculate both?
Thanks!
The baud rate generator has a free-running 16-bit timer. To get the desired baud rate, you must configure its period register UxBRG and prescaler BRGH.
When BRGH is set to 0 (default), the timer is incremented every 16th cycle of peripheral bus clock.
When BRGH is 1, the timer increments every 4th cycle.
It is usually better to set BRGH to 1 to get a smaller baud rate error, as long as the UxBRG value doesn't grow too large to fit into the 16-bit register (on slower baud rates).
The value in the period register UxBRG determines the duration of one pulse on the data line in baud rate generator's timer increments.
See the formulas in section 21.3 - UART Baud Rate Generator in the reference manual to learn how to calculate a proper value for UxBRG.
To compute the period of the 16-bit baud rate generator timer to achieve the desired baud rate:
When BRGH = 0:
UxBRG = FPB / (16 * BAUDRATE) - 1
When BRGH = 1:
UxBRG = FPB / (4 * BAUDRATE) - 1
Where FPB is the peripheral bus clock frequency.
For example, if FPB = 20 MHz and BRGH = 1 and the desired baud rate 19200, you would calculate:
UxBRG = 20000000 / (4 * 19200) - 1
= 259
If you are using some of the latest development libraries and code examples from Microchip you may find that there are already UART methods in the libraries that will set up the PIC for your needs. If you dig deep into the new compiler directory structures you will find help files in the microsoft format (no fear, if you are on a Unix type computer there are Unix utilities that read these types of files.). There you can drill down into the help to find the documentation of various ready made methods you can call from your program to configure the PIC's hardware. Buyer Beware, the code is not that mature. For instance I was working on a PIC project that needed to sample two analog signals. The PIC hardware A/D converter was very complex. But it was clear the ready made code only covered about 10% of that PIC's abilities.
-good luck

Why does my waveform graph display pulses of width 3 ms when I specify them to be 2 ms in LabVIEW?

I am trying to generate pulse waves with a width of 2 milliseconds and frequency of approximately 100 Hz as shown below:
According to this website: http://www.ni.com/white-paper/2991/en#toc1
under the section "Introduction to Pulse Width Modulation" it describes the duty cycle to be 20% if pulse width is 2 ms with a frequency of 100 Hz (or 10 milliseconds).
As you can see in the diagram above the "duty cycle %" indicator correctly computes a percentage close to 20%.
If I perform the calculations correctly, why am I getting a waveform of pulses that have a width of 3 ms instead of 2 ms shown below?
Following is the back panel diagram containing the logic I am using to generate the waveform:
Your generation frequency is 1 kHz, so you are at the minimum resolution.
Your pulse is 2 ms high. I would advise you to make the samplerate higher.

remoteIO input square wave frequency is low

i input to the audioJack a square wave in the frequency of 2-3 khZ for about 5 seconds.
the square wave is 1 and 0 - no negative values.
i get some periodic signal that going between -32000 to 32000 (but my signal is positive!? )
i have check how many times my values are crossing the zero- i get 500 in 5 seconds, which means 100 per second .
what am i missing here ? 3khz is 3000 per second.
my sampling code is in my previous post :
error in audio Unit code -remoteIO for iphone
any explanation on the frequency domain here? am i missing samples ? how can i improve it? should i do :
float bufferLength = 0.005;
AudioSessionSetProperty(kAudioSessionProperty_PreferredHardwareIOBufferDuration, sizeof(bufferLength), &bufferLength);
status = AudioOutputUnitStart(audioUnit);
thanks alot!