# Issuies with channel gains

**URL:** https://discourse.myriadrf.org/t/issuies-with-channel-gains/7650
**Category:** Lime Suite
**Created:** [13 June 2022 08:34 UTC](https://discourse.myriadrf.org/t/issuies-with-channel-gains/7650 "2022-06-13T08:34:34Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![SPQR](https://avatars.discourse-cdn.com/v4/letter/s/f19dbf/32.png) [@SPQR](https://discourse.myriadrf.org/u/SPQR)
#### Post date: [13 June 2022 08:34 UTC](https://discourse.myriadrf.org/t/issuies-with-channel-gains/7650/1 "2022-06-13T08:34:34Z")

</div>

Good morning! I\*m working on a project using LimeSDR device. During my field experiment i got a problem. I am able to see the signal of my radiostation[462,225 MHz] just within 50 meters, after that the signal disappears. And every few steps its level significantly decreases. I decided that it is because of device gains. When i tried to regulate gain - it only worked for channel A. When i looked through the API, i found out that PGA(0x0119) LNA TIA gains are set to 0x0113. Looking through LMS7002 Params i found out that there was no address for the 2nd channel. Or maybe i don’t understand smth. The question is how can i tell the device to set gain to Channels A&B simultaneously?  
My guess is i have to add registor address here :  
public LimeSDRDevice()  
{  
\_gcHandle = GCHandle.Alloc(this);  
dataMutex = new Mutex();

```
        PGA_gain.address = 0x0119;
        PGA_gain.msb = 4;
        PGA_gain.lsb = 0;
        PGA_gain.defaultValue = 10;
        PGA_gain.name = "G_PGA_RBB";
        PGA_gain.tooltip = "This is the gain of the PGA";

```

// + the same for 2nd channel  
TIA\_gain.address = 0x0113;  
TIA\_gain.msb = 1;  
TIA\_gain.lsb = 0;  
TIA\_gain.defaultValue = 6;  
TIA\_gain.name = “G\_TIA\_RFE”;  
TIA\_gain.tooltip = “Controls the Gain of the TIA”;  
// + the same for 2nd channel  
LNA\_gain.address = 0x0113;  
LNA\_gain.msb = 9;  
LNA\_gain.lsb = 6;  
LNA\_gain.defaultValue = 21;  
LNA\_gain.name = “G\_LNA\_RFE”;  
LNA\_gain.tooltip = “Controls the gain of the LNA”;  
// + the same for 2nd channel  
CMIX\_BYP\_RXTSP.address = 0x040C;  
CMIX\_BYP\_RXTSP.msb = 7;  
CMIX\_BYP\_RXTSP.lsb = 7;  
CMIX\_BYP\_RXTSP.defaultValue = 0;  
CMIX\_BYP\_RXTSP.name = “CMIX\_BYP\_RXTSP”;  
CMIX\_BYP\_RXTSP.tooltip = “CMIX bypass”;  
}

If i am right, please , give me its registor address . If not, please, advice me how to fix it. Thank you!

---

<div class="post-metadata">

### Author: ![ricardas](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/ricardas/32/86_2.png) [@ricardas](https://discourse.myriadrf.org/u/ricardas)
#### Post date: [13 June 2022 10:35 UTC](https://discourse.myriadrf.org/t/issuies-with-channel-gains/7650/2 "2022-06-13T10:35:42Z")

</div>

channel selection for SPI communications is done by register 0x0020[1:0] (MAC) bits.  
MAC=1 : channel A  
MAC=2 : channel B  
MAC=3 : channels A&B simultaneous, WRITE ONLY. Reading attempts will return undefined values.

---

<div class="post-metadata">

### Author: ![SPQR](https://avatars.discourse-cdn.com/v4/letter/s/f19dbf/32.png) [@SPQR](https://discourse.myriadrf.org/u/SPQR)
#### Post date: [13 June 2022 13:29 UTC](https://discourse.myriadrf.org/t/issuies-with-channel-gains/7650/3 "2022-06-13T13:29:35Z")

</div>

Thanks alot!
