Topics

Different Tuning Steps #ubitx

Lee
 

I want different tuning steps.   I wanted larger steps to, for example, to help moving from one WWV to another.   Below is what I changed.  When I try to set it to 100000 the display reads -31072 and when I accept it the display now shows 00000 ST  I under stand it will only display 5 digits but I could get by with just an S instead of the ST or take the M from the upper frequency display.   I am just a barely an Arduino hobbyist and I know there are some Arduino Pros here.   Does anybody have any ideas?   Thank you for the help.

  //Check Value Range and default Set for new users
  if (findedValidValueCount < 5)
  {
    //Default Setting
    arTuneStep[0] = 10;
    arTuneStep[1] = 100;
    arTuneStep[2] = 1000;
    arTuneStep[3] = 10000;
    arTuneStep[4] = 100000;
  }
--
Lee - N9LO  "I Void Warranties"

 

Jack, W8TEE
 

A signed int on a Nano is a 2-byte number. Because the Most Significant Bit (MSB) is the sign bit, you only have 2^15 = 32,767 Anything after that sets the sign bit and appears as a negative number. I would guess that's what happened here, since it only happens on the largest value. Since you are working with frequencies, in Hertz, you should use the unsigned long data type. When you are assigning constant like below, it's good practice to use the data type specifier (in yellow below).

Jack, w8TEE

On Saturday, July 14, 2018, 4:48:17 PM EDT, Lee <mr.olson@...> wrote:


I want different tuning steps.   I wanted larger steps to, for example, to help moving from one WWV to another.   Below is what I changed.  When I try to set it to 100000 the display reads -31072 and when I accept it the display now shows 00000 ST  I under stand it will only display 5 digits but I could get by with just an S instead of the ST or take the M from the upper frequency display.   I am just a barely an Arduino hobbyist and I know there are some Arduino Pros here.   Does anybody have any ideas?   Thank you for the help.

  //Check Value Range and default Set for new users
  if (findedValidValueCount < 5)
  {
    //Default Setting
    arTuneStep[0] = 10UL;
    arTuneStep[1] = 100UL;
    arTuneStep[2] = 1000UL;
    arTuneStep[3] = 10000UL;
    arTuneStep[4] = 100000UL;
  }
--
Lee - N9LO  "I Void Warranties"

 

Lee
 

Is something missing?   
--
Lee - N9LO  "I Void Warranties"

 

Mike Woods
 

Lee

Are you editing KD8CEC sketch?  If so, this won't achieve what you want.  These values are only the initial values when the programme first runs.  They won't apply once values have been saved in EEPROM.

You can change the step values in UBitx Manager software in Windows (easiest method), or (I think) in the setup menu.

Mike ZL1AXG

On 15/07/18 11:29 AM, Lee wrote:
Is something missing?   
--
Lee - N9LO  "I Void Warranties"

 


--
Mike Woods
mhwoods@...

Lee
 

Yes, it is KC8CEC 1.08.   Changing those values does change my step size but the 100000 displays funny while setting it or using it.
--
Lee - N9LO  "I Void Warranties"

 

Peter Aiea
 

Or you could punt, and manually store the freqs for WWV in the memory channels available in the  KC8CEC 1.08 software ...
I did that - it's arguably easier than dial twiddling, hi. 
Sorry if this is no help - I know this doesn't address the coding issue and I haven't tried the step you're attempting.  
With arduinos though, I have had gnarly formatting issues displaying numbers on a tiny LCD display.  
You may have to mess with the LCD formatting code for the screens that are giving you display problems 
to get a readable display. assuming the long int used  for arTuneStep and associated variables remain sane. 
v/r
pete  kh6dk

On Sat, Jul 14, 2018 at 2:49 PM, Lee <mr.olson@...> wrote:
Yes, it is KC8CEC 1.08.   Changing those values does change my step size but the 100000 displays funny while setting it or using it.
--
Lee - N9LO  "I Void Warranties"

 


Mark M
 

I think Jack got it. The way Ian coded it you can't save that large of a value. It would probably be a good idea if there was some error checking in the uBitX Manager program where it wouldn't let you enter an invalid value. Or at least some warning about it.

Suggestion...to hop between WWV freqs, or any other freqs for that matter, put them in the channels...use the 'VFO to Channel' function in Ian's firmware. Then you can select which one you want using the 'Channel to VFO' function. I have the 5, 10, 15, & 20 MHz WWV freqs saved so I can check propagation. It's a lot faster than spinning the tuning knob.

Mark AA7TA

On 7/14/18 5:49 PM, Lee wrote:
Yes, it is KC8CEC 1.08.   Changing those values does change my step size but the 100000 displays funny while setting it or using it.
--

Mike Woods
 

Try something under the maximum value 50000 should work and be almost as good as a fast way of getting around?

i presume you  know about Gen Coverage mode?  Go to band change and hold down the switch for a couple of secs.  It will then step up and down by a MHz on band change, which may also get you where you want to go?

Mike

On Sun, 15 Jul 2018 at 12:49 PM, Lee <mr.olson@...> wrote:
Yes, it is KC8CEC 1.08.   Changing those values does change my step size but the 100000 displays funny while setting it or using it.
--
Lee - N9LO  "I Void Warranties"

 

Lee
 

Thanks Mike,  I did not know about General coverage mode.  It seems to step buy .1MHZ  which is what I was trying to do.  Thanks to the others for the WWV ideas but my reference to WWV was an example. 

My changes work as I wanted but I still would like to figure out how to make it display correctly.  I cannot find where to change the data type to unsigned long.
--
Lee - N9LO  "I Void Warranties"

 

Mark M
 

You'd have to change it in the source code and then compile & load it. I don't think Ian has released the latest source. And it might be (most likely is) more complex than just changing the data type on the variable...depends on how the code is written.

Mark AA7TA

On 7/15/18 8:06 AM, Lee wrote:
...
My changes work as I wanted but I still would like to figure out how to make it display correctly.  I cannot find where to change the data type to unsigned long.