Re: Tuning reversed issue

John McFadden <johnamcf@...>

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.


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.


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@...>
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.


Join to automatically receive all group messages.