discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] Question Concerning Custom Modulator Block


From: Martin Braun
Subject: Re: [Discuss-gnuradio] Question Concerning Custom Modulator Block
Date: Tue, 18 Feb 2014 11:30:47 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

On 02/18/2014 12:28 AM, Jonathan Fox wrote:
> Dear List,
> 
> I am writing a custom QPSK modulator block (demod is next) and I am
> caught up on figuring out the output.
> 
> I am taking the byte data type (which I am using C++ char) and for each
> bit of the byte I  would have a custom symbol per bit rate. For an
> absolute minimum in a successful PSK system, I would need about two
> symbols per bit. So the sequence of data to be passed through is growing.

Always use uint8_t or unsigned char when handling bytes. I don't
understand the rest--minimum for PSK would be 1 bit/byte (BPSK). Are you
adaptively changing the modulation?

> Now for where I am getting confused, when I come up with the I and Q
> data as a complex number I can only send out one sample at a time,
> right? So for each time my general_work executes it can send out only
> one sample at a time while having even more samples calculated
> representing just one value of input_items which upon modulation would
> have quite a bit output samples. At least that is how I am interpreting
> the process.

Have you read the tutorial on how to write a block?
I don't understand what you're writing. In any block, you can output as
much items as is space in the output buffer (and should).

> How do I get out all these samples before I get the next value of the
> input? Should I write the sample values to a buffer that the block
> should check whether it is full before processing the next char sample?
> Anyone with experience writing modulator code have any tips? Can I keep
> updating the value of out in the general_work and it will pass on to the
> flowgraph?

OK, I really don't know what you're trying to do. Can you please make
sure you've read the tutorial on how to write blocks, and then tell us
exactly what your application is meant to do. Code snippets would also help.

> I have tried looking at what I believe is the PSK modulator source code,
> gr_constellation.cc but it is a pretty hard piece of code to follow.

gr_constellation is just the mapping logic bits <-> symbols.

> I appreciate any help and feedback.

MB



reply via email to

[Prev in Thread] Current Thread [Next in Thread]