Frequency Programming Continued... |
Probably
the best way to describe how to calculate the data values for a given
frequency is by example. Below, I would like to offer my method for
doing the relevant maths. I don't claim that it is perfect, and it's
quite possible that there's a flaw in my thinking, but it worked well
enough for me to get my FX5000 on to the right frequency....
You may find it useful to refer to the NJ8820 Datasheet for more information (but not much, it has to be said!) |
||
Transmitter Calculations | Receiver Calculations | |
Let the desired TX frequency be 145.6250MHz (GB3GD): Calculate the value of 'R' - the divisor for the reference oscillator. We are looking for a result which is equal to the value of the channel spacing (12.5KHz in our case). The reference divider is followed by a fixed divide by 2, yielding the final desired result of half the channel spacing. R
= Fref / Channel Spacing Next we calculate an intermediate value 'N'. This is the value by which the input sample frequency must be divided in order to get a frequency equal to half the channel spacing. N = (Ftx
+ 20) / 6.25KHz N=(145.625MHz
+ 20) / 6.25KHz Using
'N', Calculate 'M' and 'A': M=N / TX Prescaler M=26500 / 64 = 414 with a remainder of 4 So: M = 414, and A = 4 We now have R, A and M. These are the three values required by the NJ8820. R=0x064, A=0x04, M=0x19E These values have to be arranged in accordance with the chart shown on page 1 and also below. Note in particular that the lower two bits of the first byte are not used and that the data for 'M' has to be shifted to the left. |
Let the desired RX frequency be 145.0250MHz (GB3GD): Calculate 'R': R=Fref / Channel Spacing Calculate 'N': N=(Frx-21.4) / Fr Using 'N', Calculate 'M' and 'A': M=N / RX Prescaler So: M = 247 and A = 20 Expressed in Hexadecimal: R=0x2A0, A=0x14, M=0x0F7 With the receiver values we have to be cautious because of the need to "flip" each four-bit nibble around. Let's do that, beginning with 'R': R = 0x2A0 2 in binary = 0010, "Flipped", it becomes 0100 A = 0x14 1 = 0001, becomes 1000 M=0xF7 F = 1111, remains the same These new values are the ones which are "plugged-in" to the table. |
NJ8820 Data Format |
Sample Data Layout (Using Transmit Frequency Data) |
|
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
And that's how it's done. Easy isn't it?
(Tongue in cheek!) Having expended all of that effort on one channel, and being daunted by the prospect of having to repeat the process for any others that may be needed, the next step was obvious..... Make a spreadsheet do
the work I have concocted an Excel 2000 workbook which does all of the hard work for you. Since it uses certain features which are not included "out of the box", you may need your Excel installation disk in order to add the appropriate plug-ins. I would stress, however, that I make no claims to perfection. I have only used the data for 145.625MHz TX and 145.025MHz RX in my particular application. These values work perfectly and so I can see no reason why the others should not, but...... |