Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

External down converter support ? #127

Open
penfold42 opened this issue Oct 6, 2024 · 13 comments
Open

External down converter support ? #127

penfold42 opened this issue Oct 6, 2024 · 13 comments

Comments

@penfold42
Copy link
Contributor

Is there any interest in supporting an external down converter ?

I suspect there's 3 levels of "support" we could do

  1. configurable frequency offset in the UI
    IF inversion to support low side and high side mixing

  2. flip LSB and USB if required

  3. Control of an external 1st IF
    Si5351 over I2C
    A separate NCO output

@dawsonjon
Copy link
Owner

This is a cool idea. Using an SI5351 would certainly simplify things. You could then tune the Tayloe detector to a fixed frequency that is an exact division of the clock frequency. I'm almost tempted to say that this should be a project in its own right, would be very cool to build a general coverage receiver that goes up to VHF, and it would still be relatively simple.

@MrSVCD
Copy link

MrSVCD commented Oct 7, 2024

One of the things that got me excited about this project is the low component count and the components that you need are quite easy to source aka "a crystal radio for today"
So I say add it as a option but keep supporting the original desig and have fun.

@letonton
Copy link

letonton commented Dec 1, 2024

On GitHub there are Pico libs for si5351 (ex. one by user "kholia").
Additionally we can use Analog ADF435x to reach 70 cm and beyond, SPi
Interface
I agree about a new project thread.

@dawsonjon
Copy link
Owner

Yes, I know at least one person has reported success recieving 2m and 70cm using external oscillator and mixer. I would definitely like to try this sometime.

@Maurmari
Copy link

Mister Kholia's Sî5351 routines work fine, but when I tried to integrate them
into PicoRx I got "undefined reference" errors... the issue is from mix c and c++
codes ? (Frankly I'm a big noob in c !)

@dawsonjon
Copy link
Owner

Is it just a matter of using extern "C" {#include "xyz"}?

@Maurmari
Copy link

I am a bit confused about that...

@letonton
Copy link

letonton commented Jan 1, 2025

Someone may help about the matter (compile Sî5351 support into picorx code ) ?

@dawsonjon
Copy link
Owner

Sure, happy to help, can you give me some more details?

@letonton
Copy link

letonton commented Jan 1, 2025

Well, like "maurmari" I tried "kholia" code (I work in Win under Visual Studio).
Original code compiles nice, but when I try to add the files to picorx I receive
too a crowd of error messages like undefined reference to the functions.

@letonton
Copy link

letonton commented Jan 1, 2025

Nedless to say, I'm quite a newbie about c/c++ !

@dawsonjon
Copy link
Owner

This one?
https://github.com/kholia/Si5351-Pi-Pico/blob/master/main.c

I don't use visual studio, but it should just be a matter of adding the .c file to the CMakelist.txt.

  add_executable(picorx
      ...
      si5351.c
  )

It has already been mentioned that the si5351 library is written in C, whereas PiPicoRx is written in C++. If you call C code from C++ code you need to wrap the function declarations in an extern "C" {} declaration. This tells the compiler/linker that it is calling a C function rather than a C++ function. You can either add this to si5351.h (I did this in with the SSD1306 library, so you could use this as a template. https://github.com/dawsonjon/PicoRX/blob/master/ssd1306.h#L36 ). Alternatively you can add the declaration when you include the file like this:

extern "C" {
#include <si5351.h>
}

Hope this helps. Cheers Jon

@letonton
Copy link

letonton commented Jan 1, 2025

Bingo ! Thank you very much for the tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants