One problem & one question

Unterstützung und Hilfe rund um den Red Pitaya
Antworten
Benutzeravatar
df1gr
Offline
Beiträge: 15
Registriert: So Mär 13, 2016 1:44 pm

One problem & one question

Beitrag von df1gr » Sa Dez 03, 2016 1:09 pm


Hi,

I'm operating RP successfully since a couple of days with 10Watts and made some nice QSOs.
However, I have the following problem:
- on PTT-Out (pin E1/3, DIO0_P) I don't get 3,3V when PTT is turned on via MOX with HPSDR. I always have 0.01V constant signal even in RX mode. So I can't operate RP remotely :-(
Is there a way to redirect the PTT-Out signal to another free pin on E1 since I afraid my DIO0_P is damaged for some reason.
Maybe this question could only be answered by Pavel.

Question:
2) I would like to signal via a LED (outside of my housing) that SDR on RP has been started. Is there a pin which signals this already (except that onboard LED on RP) or can this be implemented in one of the next SDR release?

Thank you for your kind help in advance.

73, de Roland (DF1GR)

Benutzeravatar
DK3IR
Offline
Beiträge: 12
Registriert: So Feb 07, 2016 5:54 pm

Re: One problem & one question

Beitrag von DK3IR » So Dez 04, 2016 9:51 am


Hallo Roland,
habe Dir eine Mail zu dem Thema geschickt.
73 Heinz DK3IR

Benutzeravatar
pavel
Offline
Beiträge: 72
Registriert: Sa Mär 05, 2016 10:52 am

Re: One problem & one question

Beitrag von pavel » Di Dez 06, 2016 12:06 am


Hello Roland,

All the output pins (DIO*_P) are controlled by the sdr-transceiver-hpsdr.c program via the gpio_out variable. Each bit corresponds to a pin. The code setting this variable can be found on line 646 in sdr-transceiver-hpsdr.c:

https://github.com/pavel-demin/red-pita ... sdr.c#L646

So, it's possible to adapt the code controlling the DIO*_P pins to your requirements.

> Is there a pin which signals this already (except that onboard LED on RP) or can this be implemented in one of the next SDR release?

No, there is no such a pin. All the pins on the E1 are already used. So, it can't be implemented in one of the next SDR release.

However, all the code is open and quite easy to modify. So, you can make a custom version that meets better your requirements.

Best regards,

Pavel

Benutzeravatar
df1gr
Offline
Beiträge: 15
Registriert: So Mär 13, 2016 1:44 pm

Re: One problem & one question

Beitrag von df1gr » Do Dez 08, 2016 7:50 am


Thank you very much Pavel for your hints. I will try this modifications.

Kind Regards,
Roland

Benutzeravatar
df1gr
Offline
Beiträge: 15
Registriert: So Mär 13, 2016 1:44 pm

Re: One problem & one question

Beitrag von df1gr » Do Dez 08, 2016 12:19 pm


Hi Pavel,

looking on line 646 in sdr-transceiver-hpsdr.c, I'm unsure to add setting for example my new output pin (e.g. *gpio_out |= 0x80, DIO7_P) because tis line is in a switch commented with '/* set rx sample rate */'. Is this really the right place for my purpose?

Thanks in advance.

Roland

Benutzeravatar
pavel
Offline
Beiträge: 72
Registriert: Sa Mär 05, 2016 10:52 am

Re: One problem & one question

Beitrag von pavel » Do Dez 08, 2016 9:58 pm


Hi Roland,

The lines moved since my last post. In the current version the correct line number is 633:
https://github.com/pavel-demin/red-pita ... sdr.c#L633

I'd say that

Code: Alles auswählen

*gpio_out = (frame[2] & 0x1e) << 3 | att << 2 | preamp << 1 | ptt;
should be replaced with

Code: Alles auswählen

*gpio_out = 0x80 | att << 2 | preamp << 1 | ptt;
If you want to set the pins when the program on Red Pitaya starts, then the initial value of the gpio_out register should be also changed by replacing

Code: Alles auswählen

*gpio_out = 0;
with

Code: Alles auswählen

*gpio_out = 0x80;
This code is on line 407:
https://github.com/pavel-demin/red-pita ... sdr.c#L407

Best regards,

Pavel

Antworten