spurious 96kHz on output

General discussion and support for the Peaberry SDR V2.

Re: spurious 96kHz on output

Postby W4MMP » Fri Mar 20, 2015 4:45 pm

Hi Ken,

Let me say first that my experience with some of this is almost "zero" so if I'm saying something totally stupid, I apologize up front. But, I have become OK with understanding and programing the PSoC.
So to this topic, I found this in the PSoC I2S component guide. It appears the we have hit a limit in the I2S component. David has the component configured for TWS (word select period) of 64 bits. Using the cut and paste from the component guide and examining the last two lines you will see the maximum sampling rate is 96KHz. As you can see 192KHz is not available with the TSW of 64 bits. If the TWS was turned to 32 bits then 192KHz becomes available. I don't have a clue why the TWS is set to 64 bits.

(cut and paste of the component guide)
Clock Selection
There is no internal clock in this component. You must attach a clock source. The clock rate
provided must be two times the desired clock rate for the output serial clock (sck) and can be
calculated as follows:
fCLOCK = 2 × fS × tWS
□ fCLOCK – component clock frequency
□ fS – audio sampling frequency
□ tWS – word select period
The following table shows the component clock rates for most common audio sampling
frequencies and word select period combinations.
Sampling Frequency (fS)
Component Clock Rate (fCLOCK) MHz
tWS = 16 bits tWS = 32 bits tWS = 48 bits tWS = 64 bits
8 kHz 0.2560 0.5120 0.7680 1.0240
16 kHz 0.5120 1.0240 1.5360 2.0480
32 kHz 1.0240 2.0480 3.0720 4.0960
44.1 kHz 1.4112 2.8224 4.2336 5.6448
48 kHz 1.5360 3.0720 4.6080 6.1440
88.2 kHz 2.8224 5.6448 8.4672 11.2896
96 kHz 3.0720 6.1440 9.2160 12.2880
192 kHz 6.1440 12.2880 N/A N/A
73
Ron / W4MMP
W4MMP
 
Posts: 579
Joined: Fri Jan 03, 2014 3:31 pm
Location: Lovettsville, Virginia FM19EG

Re: spurious 96kHz on output

Postby ks1h » Fri Mar 20, 2015 6:46 pm

Hi Ron,
Yes, I went through this as well, even as far as separating the I2S into separate Rx and Tx parts and trying to run the Tx with a 2x faster clock and tws with 32 instead of 64. All of the combinations violated something either in the PSoC or the pcm3060. But then I started to realize that all of this was useless if the computer wasn't putting out anything greater than 96kHz. It's the PC, after all, that is setting the basic output sample rate. So the problem isn't so much the way the PSoC and pcm3060 are communicating; it's just that it is asking too much to try expect an accurate representation of a sampled signal near the Nyquist limit. In fact, I see a 96kHz component even with PeaberryCW, which uses a 24kHz tone which isn't all that near the Nyquist limit of 48kHz. Possibly if we had a very sharp LP filter on the output of the pcm3060 we could get rid of the 96kHz part and keep everything below 48kHz. A better approach probably is to be able to output a higher Tx sampling rate (higher than 96kHz) in the PC and then we might be able to alter the firmware in the Peaberry to use it.

73, Ken KS1H
ks1h
 
Posts: 47
Joined: Sun Dec 22, 2013 6:50 pm

Re: spurious 96kHz on output

Postby W4MMP » Sat Mar 21, 2015 1:11 am

Hi Ken,
I see you are well versed with the PSoC. I was not sure if anyone else was investigating the PSoC and potential modifications to the firmware. That gives a total of two (and David) ;)

But back on topic. I need to ask why is this an issue? Why would a user of the Peaberry want to run more than 10KHz (or so) LO offset from the Tune frequency? I am just asking because I don't understand.

One the receive side of things, I understand some users want to see DC to gamma ray on one display :ugeek:
It appears that if we focused on receive the rate could be bumped up to 192Hz by doing what you have already tested and that is have separate I2S components. This obviously will provide more visible bandwidth on the host application display.

Where am I going wrong?
73
Ron / W4MMP
W4MMP
 
Posts: 579
Joined: Fri Jan 03, 2014 3:31 pm
Location: Lovettsville, Virginia FM19EG

Re: spurious 96kHz on output

Postby ks1h » Sat Mar 21, 2015 11:44 am

Hi Ron,
As you say, most people (including me!) want to see as much spectrum on Rx as they can. If one sees an interesting signal on the left or right side of the spectrum one would just like to click on it to Tx. Of course it is possible to shift the LO closer to the signal of interest but it is certainly inconvenient.

HDSDR doesn't seem to allow the Tx output sample rate to be different from the Rx sample rate, although it is a black box with no source code available so it is hard to tell what it is doing. There are some output sample rate boxes that one can select but as far as I can tell, they don't do anything to the actual sample rate. I haven't tried other SDR radio programs so I don't know if there is one out there that would allow this. Writing one myself is definitely not in the cards.

PeaberryCW has a fixed signal-LO offset of 24kHz and it looks fairly simple to change to something smaller, although each time I look at it I am reminded how much C++ makes my head hurt. I don't have the Qt system so first order of business is to try to get that.

73, Ken KS1H
ks1h
 
Posts: 47
Joined: Sun Dec 22, 2013 6:50 pm

Re: spurious 96kHz on output

Postby W4MMP » Sat Mar 21, 2015 2:19 pm

ks1h wrote:although each time I look at it I am reminded how much C++ makes my head hurt


Yes, I am even to dumb for C++ for dummies :oops: I am going to take a C++ course at the local community college and see if that helps. (And BTW, the courses are free for folks my age in the state of Virginia)
73
Ron / W4MMP
W4MMP
 
Posts: 579
Joined: Fri Jan 03, 2014 3:31 pm
Location: Lovettsville, Virginia FM19EG

Previous

Return to Peaberry SDR V2

Who is online

Users browsing this forum: No registered users and 2 guests

cron