# 20110824

The ADRF6850's LO oscillator seems pretty jittery.

The data sheet says,

Doubling the PFD frequency usually improves the in-band phase noise performance by 3 dBc/Hz.

Why not just try it as high as it'll go? I can use a function generator at 30 MHz and double that to 60!

Here are the sums:

```
rfdiv = 2
lo = 145e6
fpfd = 60e6
n = (2^rfdiv * 2 * lo)/fpfd
frac = n %% 1
n = n-frac
sprintf("0x%X", n)

frac = frac* 2^25
sprintf("0x%X", as.integer(frac))

```

Note that the range of 'n' must be between 23 and 4096, or else the LO will be noisy/incorrect.

I've now made a spreadsheet that calculates all valid permutations of the dividers and multipliers.

LOMON:

``` [0xd4 0x1b 0x06] (on)
[0xd4 0x1b 0x00] (off)
```

To set 30 MHz REFIN and 148 MHz LO:

``` [0xd4 0x0a 0x22]
[0xd4 0x05 0x10]

[0xd4 0x07 0x00]
[0xd4 0x06 0x27]
[0xd4 0x03 0x00]
[0xd4 0x02 0xEE]
[0xd4 0x01 0xEE]
[0xd4 0x00 0xEE]
```

Same, but with doubler off and divider set to zero

``` [0xd4 0x0a 0x01]
[0xd4 0x05 0x00]

[0xd4 0x07 0x00]
[0xd4 0x06 0x27]
[0xd4 0x03 0x00]
[0xd4 0x02 0xEE]
[0xd4 0x01 0xEE]
[0xd4 0x00 0xEE]
```

Perhaps a bit better.. now let's try a very high divider

``` [0xd4 0x0a 0x00]
[0xd4 0x05 0x10]

[0xd4 0x07 0x04]
[0xd4 0x06 0xEE]
[0xd4 0x03 0x01]
[0xd4 0x02 0xDD]
[0xd4 0x01 0xDD]
[0xd4 0x00 0xDD]
```

Maybe a little better, but still not very stable over the long term.

Here's the ADRF6850 PLL parameter calculator spreadsheet. It only works in Numbers (iWork 09), sorry! There's also an Excel version that doesn't quite work, but all you need to do is manually specify an RFDIV using Table 6 of the data sheet or the RFDIV/LORANGE table to the right, and possibly find something to replace Numbers' MATCH function.