Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ uploading the code to the chip.
- `TUNING_STEP_DIGITS`: which digit to blink when in a tuning step. An array of
the same length as `TUNING_STEPS`. Values should be taken from `BLINK_NONE`,
`BLINK_0`, `_1`, `_2` and `_3` (`0` is the rightmost digit).
- There are several band plans. Define one of `PLAN_IARU1`, `_IARU2`, `_IARU3`.
- There are several band plans. Define one of `PLAN_IARU1`, `_IARU2`, `_IARU3`,
`_VK`.
The exact boundary definitions are in `bands.h`.
- Change the default operating frequency of a band by defining e.g.

Expand Down Expand Up @@ -208,6 +209,8 @@ Some images of the connections:

## Changelog

- 2017-05-12:
- VK band plans (PR [#21](/../../pull/21) by VK3IL)
- 2017-05-04:
- Beacon mode (issue [#6](/../../issues/6))
- More logical UX for sending and storing memories, using RIT to cancel
Expand Down
12 changes: 12 additions & 0 deletions SODA_POP/SODA_POP.ino
Original file line number Diff line number Diff line change
Expand Up @@ -1024,6 +1024,18 @@ void freq_adjust(long step)
*/
void fix_op_freq()
{
#ifdef PLAN_VK
if (state.band == BAND_80) {
if (state.op_freq > BAND_80_LOW_TOP && state.op_freq < BAND_80_GAP_MIDDLE){
state.op_freq = BAND_80_HIGH_BOTTOM;
return;
}
else if (state.op_freq < BAND_80_HIGH_BOTTOM && state.op_freq > BAND_80_GAP_MIDDLE) {
state.op_freq = BAND_80_LOW_TOP;
return;
}
}
#endif
if (state.op_freq > BAND_LIMITS_HIGH[state.band])
state.op_freq = BAND_LIMITS_HIGH[state.band];
if (state.op_freq < BAND_LIMITS_LOW[state.band])
Expand Down
75 changes: 74 additions & 1 deletion SODA_POP/bands.h
Original file line number Diff line number Diff line change
Expand Up @@ -224,11 +224,84 @@ const unsigned long BAND_OP_FREQS[] =
, DEFAULT_OP_FREQ_10
};
#else /* End of PLAN_IARU3 */
#ifdef PLAN_VK
enum band : unsigned char {
BAND_160, BAND_80, BAND_40, BAND_30, BAND_20,
BAND_17, BAND_15, BAND_12, BAND_10,
LAST_BAND, BAND_UNKNOWN = 0xff
};
const unsigned char BAND_DIGITS_2[] = {1,8,4,3,2,1,1,1,1};
const unsigned char BAND_DIGITS_1[] = {6,0,0,0,0,7,5,2,0};
# ifndef DEFAULT_OP_FREQ_160
# define DEFAULT_OP_FREQ_160 183200000
# endif
# ifndef DEFAULT_OP_FREQ_80
# define DEFAULT_OP_FREQ_80 353200000
# endif
# ifndef DEFAULT_OP_FREQ_40
# define DEFAULT_OP_FREQ_40 703200000
# endif
# ifndef DEFAULT_OP_FREQ_30
# define DEFAULT_OP_FREQ_30 1011600000
# endif
# ifndef DEFAULT_OP_FREQ_20
# define DEFAULT_OP_FREQ_20 1406200000
# endif
# ifndef DEFAULT_OP_FREQ_17
# define DEFAULT_OP_FREQ_17 1808600000
# endif
# ifndef DEFAULT_OP_FREQ_15
# define DEFAULT_OP_FREQ_15 2106200000u
# endif
# ifndef DEFAULT_OP_FREQ_12
# define DEFAULT_OP_FREQ_12 2490800000u
# endif
# ifndef DEFAULT_OP_FREQ_10
# define DEFAULT_OP_FREQ_10 2806200000u
# endif
const unsigned long BAND_LIMITS_LOW[] =
{ 180000000
, 350000000
, 700000000
, 1010000000
, 1400000000
, 1806800000
, 2100000000u
, 2489000000u
, 2800000000u
};
const unsigned long BAND_LIMITS_HIGH[] =
{ 187500000
, 380000000
, 730000000
, 1015000000
, 1435000000
, 1816800000
, 2145000000u
, 2499000000u
, 2970000000u
};
// Special definitions to support gapped 80m band in VK
#define BAND_80_LOW_TOP 370000000
#define BAND_80_HIGH_BOTTOM 377600000
#define BAND_80_GAP_MIDDLE (BAND_80_LOW_TOP+BAND_80_HIGH_BOTTOM)/2
const unsigned long BAND_OP_FREQS[] =
{ DEFAULT_OP_FREQ_160
, DEFAULT_OP_FREQ_80
, DEFAULT_OP_FREQ_40
, DEFAULT_OP_FREQ_30
, DEFAULT_OP_FREQ_20
, DEFAULT_OP_FREQ_17
, DEFAULT_OP_FREQ_15
, DEFAULT_OP_FREQ_12
, DEFAULT_OP_FREQ_10
};
#else /* End of PLAN_VK */
#error Please select a band plan using #define PLAN_...
#endif
#endif
#endif

#endif

#endif
// vim: tabstop=2 shiftwidth=2 expandtab:
1 change: 1 addition & 0 deletions SODA_POP/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* - PLAN_IARU1
* - PLAN_IARU2
* - PLAN_IARU3
* - PLAN_VK
* It is possible to override the default operating frequency using:
* #define DEFAULT_OP_FREQ_20 1405500000
* ... setting the default frequency to 14.055 MHz on 20m.
Expand Down