Skip to main content

Fixed bugs found in uBITX -

I am an embedded programmer, but I first tried arduino. Arduino knew only that it was used for learning purposes. However, it is based on C and it seems to have considerable applicability. In particular, a concise structure makes it easy to write code.

I found some error, but easy fixed because of very small bug.

1.CW Side Tone Configuration - Error

 There is no response when PTT is pressed after CW side tone is set. but this is very simple problem, i fixed code and send information to administrator of uBITX source code

before fixed code

while (digitalRead(PTT) == LOW || !btnDown())
knob = enc_read();
if (knob > 0 && sideTone < 2000)
sideTone += 10;
else if (knob < 0 && sideTone > 100 )
sideTone -= 10;
continue; //don't update the frequency or the display
tone(CW_TONE, sideTone);
itoa(sideTone, b, 10);
//save the setting
if (digitalRead(PTT) == LOW){
printLine2("Sidetone set! ");
EEPROM.put(CW_SIDETONE, usbCarrier);
sideTone = prev_sideTone;

when loop condition is digitalRead(PTT) = LOW but save setting condition is if  (digitalRead(PTT) == LOW)

fixed =>

while (digitalRead(PTT) == HIGH && !btnDown())
knob = enc_read();

2.Alignment and point position problem when displaying frequency

Less than 1Mhz

Original code

if (frequency < 10000000l){
c[6] = ' ';
c[7] = b[0];
strcat(c, ".");
strncat(c, &b[1], 3);
strcat(c, ".");
strncat(c, &b[4], 3);
else {
strncat(c, b, 2);
strcat(c, ".");
strncat(c, &b[2], 3);
strcat(c, ".");
strncat(c, &b[5], 3);
if (inTx)
strcat(c, " TX");
printLine(1, c);

Fixed code

for (int i = 15; i >= 6; i--) {
if (tmpFreq > 0) {
if (i == 12 || i == 8) c[i] = '.';
else {
c[i] = tmpFreq % 10 + 0x30;
tmpFreq /= 10;
c[i] = ' ';
if (inTx)
strcat(c, " TX");
printLine(1, c);

with bug fixes, memory usage was also reduced.

3.Frequency Limit Error
  defined variable frequency has unsigned long type
  when frequency is decrease by dial(Knob), if frequency is less then 0, frequency is overflow

Error when changing frequency in uBITX(Before fixed)

Fixed bug

4.And fixed more bugs...

source code is
Compiled firmware and an easy way to upgrade are coming soon.
You do not have to worry because you can go back to the original firmware at any time.

DE KD8CEC / Ph.D Ian lee


Popular posts from this blog

uBITX with Nextion LCD (CEC Firmware) - Installation and Introduction

uBITX with Nextion LCD (CEC Firmware) - Installation and Introduction uBITX CEC Firmware supports various LCD since Version 1.08 (16x02 Parallel, 20x04 Parallel, 16x02  I2C, 20x04 I2C, 16x02 Dual LCD with I2C).
Supports Nextion LCD (Graphic LCD) from Version 1.09, Version 1.09x is primarily aimed at Nextion LCD support. Also 1.09x will continue to be Beta version. If you want a stable version, please use 1.08 or 1.1 version to be released in the future.

uBITX Firmware CEC Version 1.1 Release

uBITX Firmware CEC Version 1.1 Release
Version 1.1 is the first major release since 1.097, I will release it after a 50-day beta test.

Version 1.1 includes all additions or improvements from 1.08 to 1.09, 1.093, 1.095, 1.097 

How to upgrade uBITX Firmware

uBITX is based on Arduino Nano. So uBITX's firmware upgrade method is the same as Arduino.
There are two ways to upgrade the firmware of uBITX.

The first is to compile the source from the Arduino IDE, and the second is to upload the compiled hex file using the Firmware Upgrade Tool.

I'll show you how to upload a compiled hex file as a second method.

1.Connect the uBITX's USB cable to the computer.

2.Run Device Manager on your computer.
  The way to open the Device Manager for each OS Version differs slightly.
  In most Windows, you can easily launch the Device Manager by running.

  On your computer, press the Windows key + R.

 Type devmgmt.msc and press OK Button.

On most operating systems, there will be a serial port named Ports with CH340. If so, the next step is skipped.

If the serial port is not installed as below, you need to install the driver.

Included in uBITX is the Adonano, which uses the CH340 USB To UART part.

Download the latest CH340 driver from the Internet.