Skip to main content

How to use uBITX CEC Firmware Source

How to use uBITX CEC Firmware Source

CEC Firmware is based on unmodified uBITX.
Starting with the 1.7x version, we started to support various LCDs, and 1.9 supports Nextion LCD.
Signal Meter was supported in version 1.8, Starting with Version 1.9, I2C Type Signal Meter Sensor (Standalone Signal Analyzer) is supported.

These compile options are described in 'ubitx.h'.  This post explains how to configure ubitx.h.



1. Download source code

https://github.com/phdlee/ubitx


Click the 'Clone or download' Button
Click the 'Download ZIP' Button


Extract downloaded file.

The source code must be under the ubitx_20 folder. (Folder name is important)


Double click the 'ubitx_20.ino' File


Select the ubitx.h tab as shown below.
Most of the source code options are in the ubitx.h file.


2. Select LCD Type
You must uncomment only one of the 6 lines below.
//#define UBITX_DISPLAY_LCD1602P        //LCD mounted on unmodified uBITX (Parallel)
//#define UBITX_DISPLAY_LCD1602I        //I2C type 16 x 02 LCD
//#define UBITX_DISPLAY_LCD1602I_DUAL   //I2C type 16 x02 LCD Dual
//#define UBITX_DISPLAY_LCD2004P        //24 x 04 LCD (Parallel)
#define UBITX_DISPLAY_LCD2004I        //I2C type 24 x 04 LCD
//#define UBITX_DISPLAY_NEXTION         //NEXTION LCD

For example, if your uBITX is using the included LCD, you can select it as follows.
#define UBITX_DISPLAY_LCD1602P        //LCD mounted on unmodified uBITX (Parallel)
//#define UBITX_DISPLAY_LCD1602I        //I2C type 16 x 02 LCD
//#define UBITX_DISPLAY_LCD1602I_DUAL   //I2C type 16 x02 LCD Dual
//#define UBITX_DISPLAY_LCD2004P        //24 x 04 LCD (Parallel)
//#define UBITX_DISPLAY_LCD2004I        //I2C type 24 x 04 LCD
//#define UBITX_DISPLAY_NEXTION         //NEXTION LCD

As another example, if you are using Nextion LCD or TJC LCD, modify the code as shown below. The size of the LCD does not matter.
//#define UBITX_DISPLAY_LCD1602P        //LCD mounted on unmodified uBITX (Parallel)
//#define UBITX_DISPLAY_LCD1602I        //I2C type 16 x 02 LCD
//#define UBITX_DISPLAY_LCD1602I_DUAL   //I2C type 16 x02 LCD Dual
//#define UBITX_DISPLAY_LCD2004P        //24 x 04 LCD (Parallel)
//#define UBITX_DISPLAY_LCD2004I        //I2C type 24 x 04 LCD
#define UBITX_DISPLAY_NEXTION         //NEXTION LCD

3.Select 'Signal Meter Sensor'

If you are sensing a signal using uBITX's A7 (spare i / o), you should comment it out as shown below.
//#define USE_I2CSMETER

http://www.hamskey.com/2018/05/creating-simple-s-meter-sensor-for-ubitx.html
http://www.hamskey.com/2018/06/creating-simple-s-meter-sensor-for.html
http://www.hamskey.com/2018/05/setting-smeter-to-ubitx-with-cec.html

If you are using the Standalone Signal Analyzer(I2C Type Signal Sensor), uncomment it as shown below.
#define USE_I2CSMETER

http://www.hamskey.com/2018/07/standalone-signal-analyzer-i2c-type.html
http://www.hamskey.com/2018/07/standalone-signal-analyzer-i2c-type_29.html
http://www.hamskey.com/2018/08/standalone-signal-analyzer-i2c-type.html


Below is the update time to display Signal Meter.
#define SMeterLatency   3               //1 is 0.25 sec

The default setting is updated every 0.75 seconds.

4. Options for Developer
Currently, only about 1 to 3% of the program space is left. 
I created an option for developers who want to modify the program.
You can remove features you do not need. 

Especially when Nextion LCD is used, most functions can be deactivated because most functions are implemented on the LCD.
The commented number on the right is the approximate amount of space used.

//Enable all features
#define FN_BAND         1 //592
#define FN_VFO_TOGGLE   1 //78
#define FN_MODE         1 //20
#define FN_RIT          1 //58
#define FN_SPLIT        1 //62
#define FN_IFSHIFT      1 //238
#define FN_ATT          1 //128
#define FN_CW_SPEED     1 //152
#define FN_VFOTOMEM     1 //254
#define FN_MEMTOVFO     1 //188
#define FN_MEMORYKEYER  1 //156
#define FN_WSPR         1 //1044
#define FN_SDRMODE      1 //68
#define FN_CALIBRATION  1 //666
#define FN_CARRIER      1 //382
#define FN_CWCARRIER    1 //346
#define FN_CWTONE       1 //148
#define FN_CWDELAY      1 //98
#define FN_TXCWDELAY    1 //94
#define FN_KEYTYPE      1 //168
#define FN_ADCMONITOR   1 //516
#define FN_TXONOFF      1 //58

Below is an example of how to maximize program space on Nextion LCD.
If you disable the function by setting the value to 0 as shown below, it will not appear in Text Mode. You can control most of the functions in the GUI, so there is no problem in use. With the following options you can get 12% of the program space.
#define FN_BAND         0 //592
#define FN_VFO_TOGGLE   0 //78
#define FN_MODE         0 //20
#define FN_RIT          0 //58
#define FN_SPLIT        0 //62
#define FN_IFSHIFT      0 //238
#define FN_ATT          0 //128
#define FN_CW_SPEED     0 //152
#define FN_VFOTOMEM     0 //254
#define FN_MEMTOVFO     0 //188
#define FN_MEMORYKEYER  1 //156
#define FN_WSPR         1 //1044
#define FN_SDRMODE      0 //68
#define FN_CALIBRATION  1 //666
#define FN_CARRIER      1 //382
#define FN_CWCARRIER    1 //346
#define FN_CWTONE       0 //148
#define FN_CWDELAY      0 //98
#define FN_TXCWDELAY    0 //94
#define FN_KEYTYPE      0 //168
#define FN_ADCMONITOR   0 //516
#define FN_TXONOFF      0 //58



Comments

  1. Congratulations Ian. Your creative work has taken uBitx to a next level. -- KM6BR

    ReplyDelete
  2. Hi Ian,

    I want to adapt your code for a Single Conversion SSB project like the Bitx20/40, Could you suggest what changes I would like to make in your code for this..

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete

Post a Comment

Popular posts from this blog

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.

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.08 Release

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