Here is the test plan we used to provide a final 'confidence check' on the finished firmware.
TEST PLAN FOR 'QRP2000.ASM' DUAL-DDS CONTROLLER FIRMWARE
========================================================
Author: A.J.Rowe (G7PUB)
Date: 6/2/99
Version: 1.0
Introduction
------------
This is a rather minimalist test plan for the control firmware of the
QRP2000 receiver (source file QRP2000.ASM). The tests are not intended
to be comprehensive, but should provide a reasonable compromise
between test coverage and execution time for regression testing minor
changes to QRP2000.ASM
QRP2000.ASM has four assembly-time options, to suit hardware configuration
and personal preferences. Test results must identify which combination(s) of
assembly-time switches are enabled:
Run 1 Run 2 Run 3 Run 4 Run 5
MOUSE_STYLE Y/N Y/N Y/N Y/N Y/N
VARI_TUNE Y/N Y/N Y/N Y/N Y/N
BAND_SWITCH Y/N Y/N Y/N Y/N Y/N
SSB_OFFSET Y/N Y/N Y/N Y/N Y/N
Scope
-----
It is assumed that the tester is familiar with the QRP2000 hardware and
functionality. The comments at the head of QRP2000.ASM provide most of the
necessary information.
The tester will also need to be able to drive a PIC programmer - see
'requirements' below.
Requirements
------------
The tests require a QRP2000 receiver, a suitable antenna, and a PIC 16C84
programmer which allows the on-chip EEPROM memory to be set (not all
16C84 programmers support this).
Initial setup
-------------
Set the assembly-time options in QRP2000.ASM to the required configuration.
(The standard QRP2000 has MOUSE_STYLE, VARI_TUNE and BAND_SWITCH enabled,
with SSB_OFFSET disabled). Re-assemble the firmware.
Program a PIC16C84 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.
Tests
-----
1) Power-up from cold
Power up the receiver and confirm that it initially tunes to 7.000 MHz, and
that the mode is LSB.
2) Basic functionality tests
Tune the receiver to a known station and select the correct mode. Check that
the station is heard on (or very close to) the expected frequency.
Check that the rotary control varies the frequency smoothly in 50Hz increments
up or down.
Confirm that each of the key pad buttons performs the expected function in
terms of both operation and effect on the display:
1 Step Up 50Hz
2 Step Up 5KHz
3 Step Up 500KHz
4 Step Down 50Hz
5 Step Down 5KHz
6 Step Down 500KHz
7 Toggle LSB/USB/CW mode
8 Store memory (set memory <n> to current freq.)
9 Recall memory (set frequency from memory <n>)
# No effect
0 Start direct frequency entry (# or * to finish)
* No effect
3) Reference frequency calibration
Determine the exact reference oscillator frequency: either measure the
oscillator frequency with an accurately calibrated frequency meter, or
see appendix 1 of the firmware description. 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
.....
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).
4) Power-up frequency selection
Tune to an easily recognised signal in some mode other than LSB. Save this
selection in memory 0. Power-cycle the receiver, and check that the
frequency and mode are correctly restored from memory 0, and that the
signal is heard as before.
5) Tuning control
Ideally, tuning would be tested by tuning up from 66KHz to 33.55MHZ using the
rotary control, AND then back down again. During this process it would be
necessary to watch the display and listen for any tuning anomolies. In
practice this is very difficult and time consuming.
As an acceptable alternative, perform a similar test, but only across
a selection of binary and decade boundaries:
100.000KHz
131.072KHz
524.288KHz
1.000000MHz
4.194304MHz
10.000000MHz
16.777216MHz
Tune up and down across each of these boundaries and check that the display
varies smoothly and that the received signal behaves as expected.
6) Variable rate tuning
(Only relevant if VARI_TUNE is defined)
Note the current frequency, then slowly turn the rotary tuning control by
one full turn (at less than one rev per second). The frequency should have
changed by approximately 5 KHz, assuming a rotary encoder with 100
pulses/rev.
Now turn the rotary control quickly through one full turn. The frequency
should change by 40 - 50 KHz.
Intermediate tuning rates should give 10KHz/rev and 20KHz/rev, but these
may be difficult to achieve consistently in practice.
7) Band Switch Control
(Only relevant if BAND_SWITCH is defined)
Monitor the band selection outputs from the latches, and confirm that these
are raised and lowered as the tuning control passes the following points:
Output Start freq. End freq.
BAND1 1.703936 2.228224
BAND2 3.276800 4.063232
BAND3 6.291456 7.864320
BAND4 9.043968 11.141120
BAND5 12.713984 15.597568
BAND6 16.252928 19.005440
BAND7 19.005440 22.413312
BAND8 22.413312 25.952256
BAND9 25.952256 31.850496
General <Any frequency outside of these bands>
8) DDS Quadrature Control
Tune to an LSB signal in one of the lower bands. Select USB mode and tune up
by 3KHz (leave the tuning alone if SSB_OFFSET is defined). Confirm that
the oposite sideband is much quieter than the required one - possibly
inaudible.
Tune to a USB signal in one of the higher bands. Select LSB mode and tune down
by 3KHz (leave the tuning alone if SSB_OFFSET is defined). Confirm that
the oposite sideband is much quieter than the required one - possibly
inaudible.
9) Frequency range validation - memory recall
This test requires that some of the memories have not had anything stored
in them yet. Tune to a recognisable station and recall from an 'empty'
memory. Confirm that the recall has no effect on the display or received
signal. Change to a different mode, again tune to a recognisable signal, and
repeat the test.
10) Memory store and recall
Program each of the memories with a different frequency, and a selection of
operating modes. At least one of the frequency/mode combinations should
correspond to a recognisable signal. As each memory is stored, make a note of
the frequency and mode. Ensure that the display is correctly restored after
each store operation and that the tuning is not affected.
Power-cycle the receiver, and check that it powers up with the frequency
and mode in memory 0. Recall each memory in turn and confirm that the expected
frequency and mode are displayed. Check that the recognisable signal(s) are
correctly tuned.
Tune away from the last recalled frequency and confirm that this still works as
normal, and check that mode-changing still functions correctly.
11) Key auto-repeat
Press and hold down each of the keys in turn. Confirm that the tuning and
mode change buttons auto-repeat at about 4 times per second. Confirm that
key auto-repeat does not work during direct frequency entry or memory
store/recall.
12) Direct frequency entry
Tune to a recognisable signal near to a KHz boundary, and note the frequency.
Tune well away from the signal, then tune back again using direct frequency
entry. Confirm that the signal is heard as expected.
13) Frequency range validation - rotary control
Set the frequency to 66 KHz. Tune down using the rotary control, and check
that you cannot tune below 65550 Hz. Tune back up again and confirm that
the receiver still functions correctly. Change mode (7 key) and check that
the mode still toggles through the LSB/USB/CW sequence as before.
Set the frequency to 32 MHz. Tune up using the rotary control, and check
that you cannot tune above 33.5544 MHz. Tune back down again and confirm that
the receiver still functions correctly. Change mode (7 key) and check that
the mode still toggles through the LSB/USB/CW sequence as before.
14) Frequency range validation - fine tuning buttons
Repeat test (5) but tune down using the '4' button, and up using the '1'
button.
15) Frequency range validation - intermediate tuning buttons
Set the frequency to 70 KHz. Press the '5' button, and check that there
is no effect. Tune back up again and confirm that the receiver still
functions correctly. Change mode (7 key) and check that the mode still
toggles through the LSB/USB/CW sequence as before.
Set the frequency to 71 KHz, and confirm that the '5' button changes the
displayed frequency to 66 KHz.
Set the frequency to 33.5544 MHz. Press the '2' button and check that there is
no effect. Tune back down again and confirm that the receiver still
functions correctly. Change mode (7 key) and check that the mode still
toggles through the LSB/USB/CW sequence as before.
Set the frequency to 33.549 MHz, and confirm that the '2' button changes the
displayed frequency to 33.554 MHz.
16) Frequency range validation - course tuning buttons
Set the frequency to 565 KHz. Press the '6' button, and check that there
is no effect. Tune back up again and confirm that the receiver still
functions correctly. Change mode (7 key) and check that the mode still
toggles through the LSB/USB/CW sequence as before.
Set the frequency to 566 KHz, and confirm that the '6' button changes the
displayed frequency to 66 KHz.
Set the frequency to 33.055 MHz. Press the '3' button and check that there is
no effect. Tune back down again and confirm that the receiver still
functions correctly. Change mode (7 key) and check that the mode still
toggles through the LSB/USB/CW sequence as before.
Set the frequency to 33.054 MHz, and confirm that the '3' button changes the
displayed frequency to 33.554 MHz.
17) Frequency range validation - direct frequency entry
Tune to a recognisable station. Enter '0' for direct frequency entry, and
'65' to select 65KHz. Press '#' to accept, and check that the tuned
frequency does not change. Direct frequency entry mode should still be
in effect, with the selection reset to zero. Enter '66#' to confirm that
a frequency of 66KHz can be tuned in this way.
Tune again to a recognisable station. Enter '0' for direct frequency entry,
and '30210' to select 30.210 MHz. It should not be possible to enter the
final '0'. Press '#' to accept, and check that the tuned frequency does
changes to 3.021 MHz, rather than 30.210 MHz. Enter '30209#' to confirm that
a frequency of 30.209 MHz can be tuned in this way.