Author: A.J.Rowe (G7PUB) Date: 20/2/99 Version: 1.0
The QRP2000's twin-DDS VFO provides two outputs which stay in accurate phase quadrature across the whole of the HF spectrum. This enables us to achieve a level of performance which is very hard to match using more conventional techniques. It is, of course, a rather expensive approach, but we are convinced that the results more than justify the cost. The DDS chips could be controlled by discrete logic, but are much better suited to microprocessor control. Inclusion of a simple microcontroller into the design reduces overall build cost and complexity, and increases flexibility.
At its most basic level, the QRP2000 control firmware reads tuning changes and other commands from a rotary tuning control and key pad, maintains a simple frequency and mode display, and reprograms the DDS chips and band select latches to achieve the desired result. In other words the firmware makes the QRP2000 'look and feel' like a traditional transceiver. We've built in a number of features and facilities which are common on commercial equipment, but relatively rare on kit transceivers. More importantly, we have put in a lot of effort to make the QRP2000 'feel nice'.
Like any other transceiver, the primary control on the QRP2000 is a rotary tuning knob. We also allow tuning and other control functions via a simple keypad. The tuning range is restricted to approximately 65KHz to 32MHz, and hence comfortably includes all of the amateur HF bands. Three operating modes are supported: LSB, USB and CW.
Operation at Power-Up When a QRP2000 rig is powered up for the first time, it starts at a frequency of 7.000MHz, LSB mode. However, when memory 0 has been set (see Store and Recall, below), the rig will power up at the frequency and mode held in memory 0.
Tuning Our normal tuning step is 50Hz. This was chosen, after a bit of trial and error, to be a good compromise between the conflicting goals of silky-smooth tuning and reasonably agile movement through the spectrum. However, in a further attempt to offer the best of both worlds, the QRP2000 normally provides 'variable step' tuning on the rotary control (but see the Assembly time options under firmware internals below). For anyone who is not familiar with the concept of variable step tuning, ours works like this: When tuning slowly, each change on the rotary control results in a 50Hz change in tuned frequency. Typically this corresponds to 5KHz for each complete turn of the knob. However, as the tuning knob is turned faster, the tuning step size increases (through a number of intermediate step sizes) to 500Hz. This gives a tuning rate of 50KHz per revolution, allowing much faster scanning across the band. As mentioned earlier, quite a lot of effort has gone into making the tuning feel nice. However, we would welcome your comments on this highly subjective issue !
The Keypad Controls
Apart from the tuning knob, the only other control on the QRP2000 is the 12-button keypad. At the moment, this offers the following functions:
| Key | Function |
| 1 | Step up 50 Hz |
| 2 | Step up 5 KHz |
| 3 | Step up 500 KHz |
| 4 | Step Down 50 Hz |
| 5 | Step Down 5 KHz |
| 6 | Step Down 500 KHz |
| 7 | Toggle LSB/USB/CW mode |
| 8 | Store Memory |
| 9 | Recall Memory |
| 0 | Direct Frequency Entry |
| # and * | Reserved for further additions |
Auto Repeat Each of the tuning and mode change buttons auto-repeat at about 4 times per second. However, key auto-repeat is disabled during direct frequency entry or memory store/recall.
Tuning via the Keypad The 50Hz up/down buttons ('1' and '4' keys) on the keypad acheive exactly the same as the smallest possible change on the rotary control. They are provided for convenience during very fine tuning - one step on a 100 step-per-rev rotary encoder can be fiddly, especially for anyone with less than ideal finger control. The 5KHz up/down buttons ('2' and '5' keys) are useful for moving around within a band. The 500KHz up/down buttons ('3' and '6' keys) are rather less useful, and included mainly for completeness - if you want to change frequency by more than a few tens of kilohertz, it is usually better to set the frequency directly.
Operating Mode Selection At the risk of stating the obvious, the LSB/USB/CW button ('7' key) toggles between the available operating modes. The current mode is shown on the bottom row of the display. Changing between LSB and USB alters which sideband is cancelled out by the phasing receiver hardware, and which sideband is generated by the SSB exciter. In unusual circumstances you might find that suppression of the unwanted sideband is not as good as it should be. This is caused by the quadrature relationship between the DDS chips changing over time. In practice this hasn't been a problem with the prototype hardware, but if it does happen you can correct it by just pressing the mode button three times. This will take you through the alternative modes, back to your original setting, with each change forcing a complete reset of the DDS chips.
At present, the CW mode is almost identical to USB. The only difference is a slight offset between the tuned and displayed frequencies so that a CW beat tone of 800Hz is heard whilst the display shows the actual carrier frequency. There will probably need to be further implications for CW mode once the final transmit hardware is incorporated. It would be straight-forward to switch in additional audio filtering for CW mode, but this is not supported by the current hardware.
Memory Store and Recall The QRP2000 includes ten non-volatile memories for storing your most commonly required frequencies and modes. One possible use is to save the start of your ten favorite bands, together with the operating mode which you favour on that band. Pressing the Store button ('8' key) results in a prompt for which memory you want to overwrite. Press 0 to 9 to select the relevant memory, or '#' or '*' to escape out of Store mode without saving anything. If you specify a number 0 to 9, the corresponding memory is over-written with your currently selected frequency and mode. Once a memory location has been programmed in this way, the frequency and mode can be recalled by pressing Recall ('9' key) followed by the memory number. As with the store operation, you will be prompted for the memory number - just in case you forget what you are doing! Remember: at power-up the QRP2000 will select the frequency and mode which has been programmed into memory 0.
Direct Frequency Entry Direct Frequency Entry ('0' key) is the best way to go straight to a known frequency. When you press the '0' key you are prompted for the required frequency in KHz. Enter the required frequency (whole kilohertz only) and press '#' or '*' to go straight there. Of course, if you want a frequency which is not a whole number of kilohertz, just go to the nearest frequency which *is* a whole number of kilohertz and tune up or down in the usual way from there.
Frequency Calibration One of the great pleasures of using the QRP2000 is the stability and accuracy of the tuned signal. Although the prototype rather resembles the proverbial rats nest, the tuning is still rock-solid. The 100MHz clock modules which provide the reference frequency are pretty accurate, but not always accurate enough for our purposes. Hence the QRP2000 firmware offers software compensation for reference clock inaccuracies. However, please note that this calibration process requires access to a PIC 16C84/16F84 programmer which allows the on-chip EEPROM memory to be set (not all 16x84 programmers support this).
The steps to achieve frequency calibration are as follows: Determine the exact reference oscillator frequency: either measure the oscillator frequency with an accurately calibrated frequency meter, or see Appendix 1. Convert the oscillator frequency to hexadecimal (100MHz is 05F5E100, and your value should be very close to this!). Return the PIC to the programmer. Set the 4 bytes of EEPROM starting at address 40 decimal (28 hex) to this value, most significant byte first. At the end of this, your EEPROM memory should look something like:
| FF FF FF FF FF FF FF FF |
| FF FF FF FF FF FF FF FF |
| FF FF FF FF FF FF FF FF |
| FF FF FF FF FF FF FF FF |
| FF FF FF FF FF FF FF FF |
| 05 F5 E1 00 FF FF FF FF |
| FF FF FF FF FF FF FF FF |
| FF FF FF FF FF FF FF FF |
After re-programming, return the PIC to the QRP2000. Select USB mode and tune to an AM signal at a known frequency (the higher the better), tuning for zero-beat with the carrier. The display should exactly match the AM carrier frequency. (NOTE: If the SSB_OFFSET option is enabled, the display should read 1.5KHz higher than the carrier frequency). Once this procedure has been completed, any errors between the tuned and displayed frequency will be down to thermal drift which we have found to be quite negligible.
This section gives a very brief insight into the internal workings of the QRP2000 control system, primarily to outline the various assembly-time options which are available. For a much more detailed look at the control system see the main hardware description and the source code listings.
The QRP2000 uses the ubiquitous Microchip PIC16C84 (or more recent 16F84) to perform all system control functions. In our experience more amateurs have the tools needed to program the 16C84 than any other processor: however, it was primarily chosen because its capabilities ideally match the requirements of the QRP2000. The excellent electrical properties of the PIC microcontroller range are used to good effect in the QRP2000, with many pins doubling up as both inputs and outputs: indeed, some pins are used for as many as three different functions. Again, if you are interested in how this is arranged, the best place to look is the QRP2000 source code. (For more information on the 16C84 and 16F84, I strongly recommend a look at Microchip's web site: http://www.microchip.com)
The QRP2000 really is squeezing the last ounce of performance from the 16C84 (...or should that read 'last gram of performance'). The processor is responsible for detecting movement of the rotary tuning control, and converting this to frequency changes. It also detects (and de-bounces in software) any key presses and takes the appropriate action. It controls both DDS chips, transparently selects the correct band-pass input filter, maintains the frequency and mode information on the LCD display...and much more besides !
QRP2000.ASM has four assembly-time options, to suit hardware configuration and personal preferences: MOUSE_STYLE, VARI_TUNE, BAND_SWITCH, and SSB_OFFSET:
MOUSE_STYLE - Define this symbol if using a 'mouse-type' rotary encoder (i.e. raw optical pulse trains in quadrature) rather than the more complex 'clock + direction' style of encoder.
VARI_TUNE - Define this symbol to enable variable-rate tuning via the rotary encoder. This is a matter of personal preference.
BAND_SWITCH - Define this symbol if mixer is preceded by input filters for different bands. The filters are assumed to be selected via a pair of latches (see above).
SSB_OFFSET - Define this symbol to offset the DDS tuning frequency by +/- 1.5KHz when in USB or LSB mode. This has the effect that the displayed frequency indicates the centre of the sideband, not the (non-existent) carrier. This option is generally disabled, since this is unusual behaviour for an amateur receiver.
The normal arrangement is with SSB_OFFSET disabled, and all other options enabled. If you want to program your own QRP2000 microcontroller, and have access to a suitable assembler and programmer, feel free to experiment with these settings. However, you should be aware of two things:
1) The QRP2000 has only been fully tested with the standard configuration of assembly options.
2) There may not be enough program space on the processor for some combinations of options. For example, enabling SSB_OFFSET may need something else to be disabled (e.g. VARI_TUNE).
When you have reassembled the firmware, program a PIC16x84 with the resulting binary file, ensuring that the on-chip EEPROM memory is set to its default value of all 'FF's. The PIC's fuses should be set to indicate crystal oscillator, power-up timer enabled, watchdog enabled, code protect disabled. Fit the PIC into the QRP2000 receiver...and good luck!
The QRP2000 control firmware allows the exact frequency of the reference oscillator in that instance of the receiver to be specified. This firmware can then ensure that the displayed frequency always precisely matches the actual frequency being tuned (apart from any subsequent drift due to thermal drift or ageing of the crystal). By default the firmware assumes that the reference oscillator is exactly 100MHz, but this can be over-riden by setting the actual frequency in locations 40 - 43 (decimal) of the on-chip EEPROM.
The following description requires you to know the current setting of the reference frequency being used by the firmware: If EEPROM locations 40 - 43 (decimal) of your PIC microcontroller are set to their default value (FF FF FF FF hex) then your firmware will assume 100.000000 MHz. In fact, if the first byte in this area of EEPROM is set to anything other than 05, then a reference frequency of 100.000000 MHz will be assumed. If the EEPROM at location 40 (decimal) is set to 05, then this will be taken as the most significant byte of a 32-bit frequency value. Hence EEPROM values of 05 F5 E2 41 will be interpreted as 5F5E241 hex = 100000321 Hz.
Once you know the reference oscillator frequency which is currently used by the firmware, the actual reference frequency can be accurately determined (without recourse to a frequency meter) as follows: Select USB mode and tune to an AM signal at a known frequency (the higher the better). Tune for zero-beat with the carrier.
If: F[disp] is the frequency displayed by the QRP2000 LCD display F[sig] is the carrier frequency of the AM station F[ref] is reference frequency currently programmed into the QRP2000 F[actual] is the real frequency of your reference oscillator
Then: F[actual] = (F[ref] * F[sig]) / F[disp]
The resulting value for F[actual] can then be converted to hex and programmed back into EEPROM locations 40 - 43 (decimal) of the PIC, to ensure that your frequency display is as accurate as possible. NOTE: to minimise thermal effects, the procedure above should be conducted when the receiver has been running for an hour or two in an environmental temperature which is close to the average for normal use.