Re: Tuning reversed issue

W2CTX
 

Jack you are right.

I was thinking of this ubitx software center git.

Ron



From: Jack Purdum via Groups.Io <jjpurdum@...>
To: BITX20@groups.io
Sent: Sunday, January 7, 2018 10:20 PM
Subject: Re: [BITX20] Tuning reversed issue

Sounds like more work to me. There's nothing sacrosanct about the two analog pins. As far as changing sketches, whose sketches? If you write your own, it really doesn't matter. If you use someone else's, make a few typing changes and you're done. If you change the wires and then replace the board, then what? Quite often it is easier to make a software change than a hardware change.

Jack, W8TEE



From: John McFadden <johnamcf@...>
To: BITX20@groups.io
Sent: Sunday, January 7, 2018 10:15 PM
Subject: Re: [BITX20] Tuning reversed issue

Even easier is using a small object (thumb tack, tiny drill bit, etc) to unhook the black and brown wires from the header and reverse their positions. Then you can change sketches without worry in the future.
John

On 1/7/2018 4:22 PM, Jack Purdum via Groups.Io wrote:
One of the beautiful things in C are symbolic constants. These are textual strings that get substituted by the compiler. Around line 75 in ubitx_20.ino you will find  these two symbolic constants:

#define ENC_A (A0)
#define ENC_B (A1)

these define encoder tab A and B to be assigned to Nano pins A0 and A1. Now reverse these to:

#define ENC_A (A1)            // NOTE: these are reversed from the original code
#define ENC_B (A0)

and everywhere those symbolic constants (END_A and ENC_B) are used have now been reversed. Save, recompile, and upload and you're done.

                                                                                  OR

you can open your µBITX, unsolder pins A1 and A0, reverse those two connections, resolder the two leads, and put everything back in it's case. To me, the software change is easier and the change presented here doesn't mess with the function code.

Jack, W8TEE



From: Ronald Pfeiffer via Groups.Io <w2ctx@...>
To: BITX20@groups.io
Sent: Sunday, January 7, 2018 4:09 PM
Subject: [BITX20] Tuning reversed issue

Working with Jim, W0EB, I found that if the black and brown wires
are reversed on the encoder then the frequency tuning is backwards.
Some people, including myself, just changed the "doTuning" routine
to reverse the offsets.  This however fixes the frequency tuning but
the menus options seem to be backwards.

Better fix is to change the enc_read(void) routine and then both the
freq tuning and menus selections are in sync.

Please correct me if I am wrong.

Ron







Join BITX20@groups.io to automatically receive all group messages.