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
    Replies
    1. Charudatt, Sorry for late reply.

      I don't know Bitx20 source code yet.
      but, My guess is that you can use it only by modifying the frequency control part.

      Ian

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

    ReplyDelete
  4. Hi Ian,

    I am regular visitor of Your blog and enjoying the improvements of uBITX that You made and share. Great!

    I need one change in code - if possible. My plan is use uBITX + XVRT for satellites. You know that there are strong change of frequency due the Doppler effect. Usual RIGs are allowing to tune in TX mode, uBITX no (currently v.1.073 firmware).

    So if it is possible, please allow tunning in TX mode or add a setting in menu that allows that. Thanks a lot!

    ReplyDelete
    Replies
    1. OM0AAO

      Is not the reply too late?
      I'm sorry to be late for your wonderful offer. I quit the beta version today.

      If you can test it, I'll modify the code and send it to you by e-mail. Please let me know your email address.

      Thanks again for the cool suggestion.

      Ian KD8CEC

      Delete
    2. Hi Ian,

      that will be great! Please send in to om0aao(at)cq.sk . TNX!

      Delete
  5. What is a TJC display? What is "Standalone Signal Analyzer"? Maybe a comment beside some of these for those that don't know. It's easy to leave out stuff if you work with it too much. I saw the standalone signal analyzer somewhere on your site. I'll have to dig around again. Just thought it might help others if they see that and don't know what it means. Great job. I'm still putting my uBitx together and gathering up what I need for this part.

    ReplyDelete
    Replies
    1. Michael

      I agree with your opinion. Due to too many posts, it seems that you can not find important information.
      I am going to end the beta version today. I will include a post with important information.
      (TJC LCD is a trade name, and "Standalone Signal Analyzer" info = 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
      )

      Thanks

      Ian, KD8CEC

      Delete
  6. This comment has been removed by the author.

    ReplyDelete
  7. I will suggest a guide for dummies. For example, I got the MBTIX V4 and a 2.8 screen to add to it. What do I need to load to the Raduino, what to the LCD, what else? A place with all what is needed grouped with steps by steps in sequential order.

    ReplyDelete

Post a Comment

Popular posts from this blog

Introduction to UV-K5 HF Fullband receive version 0.3

Introduction to UV-K5 HF Fullband receive Version 0.3 This is an introduction to UV-K5 HF full-band reception firmware 0.3HF using SI4732-A10. This version is released separately from the existing UV-K5 CEC firmware version. because space is needed to store a large PATCH file to use SI4732-A10's SSB. 0.3HF added several functions to use SSB for shortwave radio and amateur radio.

Release CEC Firmware v1.200 for uBITX All version(include V2, V3, V4, V5)

Release CEC Firmware v1.200 for uBITX All Version (include v2, v3, v4, v5) I did the firmware work for v5 when uBITX V5 was released, but I release it now. I received the feedback from a thankful beta tester and tested it myself by converting my uBITX v3 to v5 but I was not sure. I ordered the uBITX V5 and delivered the correct uBITX V5, so I made a little more fine-tuning. If you use V2, V3, V4, you do not need to update this firmware.

Introducing UV-K5 Version 0.1P (CW)

  Introducing UV-K5 Version 0.1P (CW Mode) CW-related functions have been added to version 0.1P. The spectrum function has been removed but is maintained in the source code. Later, when the source code is distributed, you can activate it and use it if necessary. This version is for testing purposes only. It will be redistributed as the stable version 0.2 in approximately 1-2 weeks. If you don't want to beta test, you can wait a week or two and download 0.2