My name is Christophe, I am interested in SDR techniques and I have two RedPitaya cards (14 & 16 bits).
I looked for some help in France, but I have not found a solution yet.
Maybe some of you can put me on the right way ?
![Smile :-)](./images/smilies/icon_e_smile.gif)
I have some technical questions about the C25 module (Charly 25) sold at RedPitaya in the basic SDR kit.
This module is an HF amplifier, also a switchable filter for HF radio amateur bands.
Here is a view of the C25:
It is controlled in I2C since the Charly 25 version of Power SDR.
This : here is a list of some register values.... With the version of Pavel Denim + PowerSDR mRX, the module is well controlled (filters, attenuator, Pres-Amp) except in emission!
So I have the project to drive myself this module with an arduino in I2C.
I made some attempts with Wire.h library but I can not do anything.
(I can give the codes tested, i'm not a I2C specialist...)
But I found this : (github charly25)
It's interresting : i can test control with a library https://github.com/nicoverduin/PCA9555
/*
Charly 25LC pin assignment for PCA9555 port expander IC:
Attenuator 12dB: I/O 0.0 -> Initial value = 0
Attenuator 24dB: I/O 0.1 -> Initial value = 0
VV 1 (preamp 1): I/O 0.2 -> Initial value = 0
VV 2 (preamp 2): I/O 0.3 -> Initial value = 0
unused: I/O 0.4 -> Initial value = 0
unused: I/O 0.5 -> Initial value = 0
unused: I/O 0.6 -> Initial value = 0
unused: I/O 0.7 -> Initial value = 0
10m: I/O 1.0 -> Initial value = 1
20m: I/O 1.1 -> Initial value = 0
40m: I/O 1.2 -> Initial value = 0
80m: I/O 1.3 -> Initial value = 0
Antenna relais: I/O 1.4 -> Initial value = 0
PA switch: I/O 1.5 -> Initial value = 0
unused: I/O 1.6 -> Initial value = 0
unused: I/O 1.7 -> Initial value = 0
*/
These are PCA9555 which allow the control of the whole.
I used this code: (with a library to drive the PCA955 in the form of GPIO)
=> At the end of my message
![Wink ;)](./images/smilies/icon_e_wink.gif)
Result:
- The control of the attenuator, the pre amp works well.
On the other hand, everything that is above I / O 1.0 to I / O 1.5 (LPF, BPF, Ant Relay, PA): I hear one or more relays, but nothing else happens .
I have the impression that there is a problem addressing the second PCA955 ...
Do you have an idea ?
Or do you know how to manage this module in i2C otherwise?
#if defined(ARDUINO) && ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif
#include "clsPCA9555.h"
#include "Wire.h"
PCA9555 ioport(0x20);
void setup()
{
//
// Configuration des IOports (0 à 15) en sortie
//
for (uint8_t i = 0; i < 15; i++) {
ioport.pinMode(i, OUTPUT);
}
//
// On initialise tous les IOports (0 à 14) à l'état bas
//
for (uint8_t i = 0; i < 15; i++) {
ioport.digitalWrite(i, LOW);
delay(50);
}
Serial.begin(9600); // initialisation de la liaison série pour utilisation de la console
}
void loop()
{
// Attenuator 12dB
uint8_t i = 0; // Valeur de l'IOport
ioport.digitalWrite(i, HIGH);
Serial.print("_______________________________________________");
Serial.println( );
Serial.print("Attenuator 12 dB / IOport = ");
Serial.print(i);
Serial.print(" IOport : HIGH ");
Serial.println( );
Serial.println( );
delay(2000);
ioport.digitalWrite(i, LOW);
Serial.print("Attenuator 12 dB / IOport = ");
Serial.print(i);
Serial.print(" IOport : LOW ");
Serial.println( );
Serial.println( );
delay(2000);
// Attenuator 24dB
i = 1; // Valeur de l'IOport
ioport.digitalWrite(i, HIGH);
Serial.print("_______________________________________________");
Serial.println( );
Serial.print("Attenuator 24 dB / IOport = ");
Serial.print(i);
Serial.print(" IOport : HIGH ");
Serial.println( );
Serial.println( );
delay(2000);
ioport.digitalWrite(i, LOW);
Serial.print("Attenuator 24 dB / IOport = ");
Serial.print(i);
Serial.print(" IOport : LOW ");
Serial.println( );
Serial.println( );
delay(2000);
// VV 1 (preamp 1)
i = 2; // Valeur de l'IOport
ioport.digitalWrite(i, HIGH);
Serial.print("_______________________________________________");
Serial.println( );
Serial.print("VV 1 (preamp 1) / IOport = ");
Serial.print(i);
Serial.print(" IOport : HIGH ");
Serial.println( );
Serial.println( );
delay(2000);
ioport.digitalWrite(i, LOW);
Serial.print("VV 1 (preamp 1) / IOport = ");
Serial.print(i);
Serial.print(" IOport : LOW ");
Serial.println( );
Serial.println( );
delay(2000);
// VV 2 (preamp 2)
i = 3; // Valeur de l'IOport
ioport.digitalWrite(i, HIGH);
Serial.print("_______________________________________________");
Serial.println( );
Serial.print("VV 2 (preamp 2) / IOport = ");
Serial.print(i);
Serial.print(" IOport : HIGH ");
Serial.println( );
Serial.println( );
delay(2000);
ioport.digitalWrite(i, LOW);
Serial.print("VV 2 (preamp 2) / IOport = ");
Serial.print(i);
Serial.print(" IOport : LOW ");
Serial.println( );
Serial.println( );
delay(2000);
// LPF 10m
i = 8; // Valeur de l'IOport
ioport.digitalWrite(i, HIGH);
Serial.print("_______________________________________________");
Serial.println( );
Serial.print("LPF 10m / IOport = ");
Serial.print(i);
Serial.print(" IOport : LOW "); // La valeur initiale pour le LPF 10m est à HIGH
Serial.println( );
Serial.println( );
delay(2000);
ioport.digitalWrite(i, LOW);
Serial.print("LPF 10m / IOport = ");
Serial.print(i);
Serial.print(" IOport : HIGH ");
Serial.println( );
Serial.println( );
delay(2000);
// BPF 20m
i = 9; // Valeur de l'IOport
ioport.digitalWrite(i, HIGH);
Serial.print("_______________________________________________");
Serial.println( );
Serial.print("BPF 20m / IOport = ");
Serial.print(i);
Serial.print(" IOport : HIGH ");
Serial.println( );
Serial.println( );
delay(2000);
ioport.digitalWrite(i, LOW);
Serial.print("BPF 20m / IOport = ");
Serial.print(i);
Serial.print(" IOport : LOW ");
Serial.println( );
Serial.println( );
delay(2000);
// BPF 40m
i = 10; // Valeur de l'IOport
ioport.digitalWrite(i, HIGH);
Serial.print("_______________________________________________");
Serial.println( );
Serial.print("BPF 40m / IOport = ");
Serial.print(i);
Serial.print(" IOport : HIGH ");
Serial.println( );
Serial.println( );
delay(2000);
ioport.digitalWrite(i, LOW);
Serial.print("BPF 40m / IOport = ");
Serial.print(i);
Serial.print(" IOport : LOW ");
Serial.println( );
Serial.println( );
delay(2000);
// BPF 80m
i = 11; // Valeur de l'IOport
ioport.digitalWrite(i, HIGH);
Serial.print("_______________________________________________");
Serial.println( );
Serial.print("BPF 80m / IOport = ");
Serial.print(i);
Serial.print(" IOport : HIGH ");
Serial.println( );
Serial.println( );
delay(2000);
ioport.digitalWrite(i, LOW);
Serial.print("BPF 80m / IOport = ");
Serial.print(i);
Serial.print(" IOport : LOW ");
Serial.println( );
Serial.println( );
delay(2000);
// Antenna relay
i = 12; // Valeur de l'IOport
ioport.digitalWrite(i, HIGH);
Serial.print("_______________________________________________");
Serial.println( );
Serial.print("Antenna relay / IOport = ");
Serial.print(i);
Serial.print(" IOport : HIGH ");
Serial.println( );
Serial.println( );
delay(2000);
ioport.digitalWrite(i, LOW);
Serial.print("Antenna relay / IOport = ");
Serial.print(i);
Serial.print(" IOport : LOW ");
Serial.println( );
Serial.println( );
delay(2000);
// PA switch
i = 13; // Valeur de l'IOport
ioport.digitalWrite(i, HIGH);
Serial.print("_______________________________________________");
Serial.println( );
Serial.print("PA switch / IOport = ");
Serial.print(i);
Serial.print(" IOport : HIGH ");
Serial.println( );
Serial.println( );
delay(2000);
ioport.digitalWrite(i, LOW);
Serial.print("PA switch / IOport = ");
Serial.print(i);
Serial.print(" IOport : LOW ");
Serial.println( );
Serial.println( );
delay(2000);
}