What is the meaning of this GNUradio exam question? - gnuradio

GNUradio Section 3 - Signal reception using the polyphasic clock synchronization algorithm.
In this section, we will use an algorithm that corrects the delays in the clock that allows or synchronism between sender and receiver. In this diagram, the received signals appear on the left and on the right appears the sign after processing the algorithm.
Change the noise levels, frequency difference and clock difference and the directors effects.
What am I supposed to do in this question?

The Tutorials have been revised. Take a look at https://wiki.gnuradio.org/index.php/Guided_Tutorial_PSK_Demodulation and in particular "Using the Polyphase Clock Sync Block in Our Receiver".

Related

How does DMA work? What is the workflow of DMA? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I am trying to learn the basics of DMA. I watched certain videos on YouTube for the same.
I have got a few queries:
Can we set/reset bits of registers using DMA? Like if I want to set the 4th bit of GPIO_ODR, can I do it using DMA?
Does DMA follow polling method or interrupt method?
If incase I want to set and reset bits of the registers of the GPIO (general purpose input-output) peripheral, then what would be the workflow of DMA?
Will it be:
CPU->DMA->Peripheral->Register
and then for reverting back
Register->Peripheral->DMA->CPU
Is this workflow correct?
Please help me with this. Also, it would be great if you explain in simple words because I am completely new to this topic.
Thanks!
-Aditya Ubarhande
Disclaimer: My answer is based on my experience on DMA hardware of STM32 microcontrollers.
If the DMA you're using have access to the memory region where hardware registers reside (like GPIO), then yes, you can move data to these registers and change the bits. But be aware that this doesn't give you bit-wise read-modify-write access. DMA writes (or reads) the memory region (can be 8, 16 or 32 bits etc.) all at once. On STM32, Timer triggered DMA driven GPIO access can be used for synchronous parallel port implementations. On the other hand, DMA is generally used for event triggered bulk memory transfers, so using it for one time manipulation of hardware registers makes little sense.
In general, you arm the DMA and it generates an interrupt when its job is done (or half complete) or when some error occurs. DMA has its own control & status registers, so you can poll them instead of enabling & using interrupts. But most of the time, using interrupts is a better idea. It's also an option (probably a bad one) to fire & forget it, if you don't need to be notified when the transfer is complete.
In general, for any DMA transfer you configure source address, destination address, data length & width and the triggering condition (unless it's a memory-to-memory transfer). Of course, there can be additional settings like enabling interrupts etc.

Measure power from a USB calbe using an oscilloscope [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 2 years ago.
Improve this question
I would like to measure power from a USB cable. This needs to be very exact and the data should be recorded, so I cannot use any of these fancy devices that show the data on a display. One end of the USB cable will be plugged into a laptop and the other into some microcontroller.
As far as I know (and I know very little about this) it should be possible to cut a USB cable open and just connect the oscilloscope to the exposed wires. Sadly I have no idea how I should connect it.
Thank you very much for any help!
The thing you need is a so called shunt resistor. A resistor can be thought of as a device, which turns voltage into current and vice versa. So if a certain amount of current (I) flows through the resistor, a proportional voltage (U) occurs across the resistor. An oscilloscope only measures voltage so in order to measure current we need the resistor to turn it into a voltage. The value of the resistor should be quite small in order to not impact the measurement too much. Usually 0.1Ω or smaller is used. The accuracy of the resistor directly affects the accuracy of the measurement so get a decent one.
Why measure current?
Power (P), what you want to measure, is calculated as voltage times current. Since oscilloscopes can't measure it directly we need to calculate it. The complete formula is in the bottom of the picture.
What is the second probe for?
USB is usually 5V which we could simply plug into the formula and call it a day. But since you want to use a computer as the power supply, which output voltage can vary quite a lot, it is best to measure it as well.
What do the colors of the wires mean?
A USB cable generally has four wires. The green and the white wire are data wires, which you should simply leave connected. The back wire is the ground or negative wire and the red is the positive wire.
Is there anything else to keep in mind?
In general there is not so much you can do wrong here but when you are using a mains powered oscilloscope the probe ground is tied to the mains ground. This can cause a ground loop when the laptop is also plugged into the mains, which you generally want to avoid. So just leave you laptop on battery during the measurement and everything should be fine.

Max number encoder pulses through interrupt change on PorB

I am using a 16F877A pic with 20MHz crystal and a change interruption on portB, pin 6-7 connected to an encoder. I'm using the encoder to calculate the velocity of a wheel and I have a doubt about the maximum ppr that I can use to avoid the program to stop or freeze? Thanks
I watched a student have this problem in a lab next to me.
Without interrupt shadow registers, you'll find the maximum quadrature decoding rate probably slower than you want. IIRC under 100000pps
You can measure it easily by running your wheel backwards and forwards with a motor and going faster until the counts for forward and reverse passes no longer line up.
Microchip recommend using the PIC16F18877 in new designs, which has automatic register shadowing on interrupt. All the 18 series PIC have this feature too and it raises the rate significantly to IIRC over 200000pps.
I'm sorry I can't give hard numbers, the exact figures are at an earlier employer.

two analog channel affect each other in pic

Iam doing a project to recognize gestures by reading adc values in pic 16f73 using embedded c. Everything works fine while using single adc channel. When i use multiple channels, values are affected each other. is this a hardware error or software problem?
Probably. It's very likely to be one, or the other, or both. Split problem in half.
Eliminate one at a time. Scope/meter on both analog inputs. Change one input - does the other change too? If it does, there is a hardware issue at least. If not, it's software.
This is debugging 101.
It's a hardware effect, but not an error.
From the datasheet:
11.1 A/D Acquisition Requirements
For the A/D converter to meet its specified accuracy,
the charge holding capacitor (CHOLD) must be allowed
to fully charge to the input channel voltage level. The
analog input model is shown in Figure 11-2. The source
impedance (RS) and the internal sampling switch (RSS)
impedance directly affect the time required to charge
the capacitor CHOLD. The sampling switch (RSS)
impedance varies over the device voltage (VDD), see
Figure 11-2. The source impedance affects the offset
voltage at the analog input (due to pin leakage current).
The maximum recommended impedance for analog sources is 10 kΩ. After the analog input channel is
selected (changed), the acquisition period must pass
before the conversion can be started.
To calculate the minimum acquisition time, TACQ, see
the PICmicro™ Mid-Range MCU Family Reference
Manual (DS33023). In general, however, given a maximum source impedance of 10 kΩ and at a temperature
of 100°C, TACQ will be no more than 16 µsec.
It will likely be because you have high impedance sources driving all the ADC pins. When the multiplexer switches from one input to the next, any charge that is stored on the sampling capacitor of the ADC from the previous input will still be there.
If you drive each input with the output of a suitable op amp, when the ADC's multiplexer switches, the op amp is able to drive charge in or suck charge out of the sampling capacitor and the time needed for the new input you are reading can be significantly reduced. Plus, with this method you are not loading the voltage you are wanting to read.
If you cannot drive with a low impedance source, then ensure you have plenty of time for the new input's value to settle.

DDS frequency synthesizer digital phase lock loop

I am working on a project about a frequency-hopping tranceiver. I want to implement a phase lock loop on FPGA i.e. a digital PLL. I am multiplying the incoming signal with a certain frequency and passing it through a LPF. Now I give this low frequency to DDS. I want my DDS to work like a VCO and lock to incoming phase/frequency. How can I do that?
I also need to know that how the phase accumulator in a DDS works: how or what input they are getting to generate corresponding frequency?
The datasheets of the Xilinx DDS Compiler have some information about the theory of operation. You may want to have a look at them.