Topics

Swapping Nano's


hickmodawg@...
 

I’m quite new at this, so please be patient.  I haven't done much with Arduinos yet, but I'm learning...

I assembled my uBITx v.5 and it seems to work OK.  I'm quite happy about that!  It has the stock screen that came with the kit and the stock firmware.  I have two questions:

1. Exactly what do I changes in the CEC Firmware v. 1.2 should I make before uploading it in order for it to run properly on my stock Ver.5 uBITX?  I've read Ian's thread from 2 April 2019, but I want to get this exactly right.  I am not sure exactly how to make the changes I need in order to use my stock display or how to tell the firmware I'm using a Ver. 5 Board. in my uBITx. 

Which display do I select and exactly what characters do I delete or add in front of the display's name in order to select it? 

For the my Ver. 5 Board, do I simply type a "5" at the end of the line reading:
"#define UBITX_BOARD_VERSION?"  Is there a space between the "VERSION" and the "5?'

2. I have a spare Arduino Nano.  Can I upload the CEC v. 1.2  firmware to the spare and plug it into the radio and use it, then unplug it and re-insert the original Nano with the stock firmware back in, and use it too?  I mean, can I swap out Arduinos with different Firmware and still expect the radio to perform normally?

 

Thanks,

Martin, AJ6CL


Evan Hand
 

To answer your second question first, yes you can use a second Nano to program and keep the first as originally received.  There are issues that need to be taken into consideration.
1 - The calibration data is stored on the eeprom of the Nano, which is not saved in the CEC software.  You will need to calibrate before it will work correctly, especially the BFO setting. 
2 - The CEC software is different for each display, and the original software only works with the original display.  That would mean that you need to change the Nano AND the display if you do not use the original display version of the CEC software

The first question depends on what you want for a display?  I have the 3.2" that Dr Lee had already created a full screen tft file with the link from the web page.  That is what I would use.  This is a personal choice.  If you want bigger, then you will need to find the correct tft file to match your display.  2.4 and 3.2 I believe are the two that Dr. Lee has programmed.

You do not need to compile the code if you use the correct hex file.  Use the uBITXV5 directory and read the FileNameInfo.txt file to help select the correct hex file to load into the Nano.  You will need the Hexloader program to go that route.  I believe that this is where I got the version that worked for me:
https://sourceforge.net/projects/hex-file-loader/


Incase you did not get it, here is the link to the Git Hub repository zip file:  

https://github.com/phdlee/ubitx/releases/download/v1.20/uBITX_CEC_V1.200.zip

This should get you started.

For the calibration process, I would do a search on this site to learn the how to do it.  NOTE that the CEC software does not use the same method as the stock (it does not turn on the transmitter to zerobeat wit another receiver.  For the CEC firmware I would download the Memory Manager that Dr. Lee has created to make the adjustments and save the values after a change to be able to backtrack if something goes wrong.

For the BFO calibration I prefer to use a PC based free audio spectrum analyzer that can be downloaded from here:
http://www.techmind.org/audio/specanaly.html

I connected a mic to the input of my PC, tuned the uBITX to an open frequency with just static, and adjusted the BFO to center the noise spectra between 500 and 2500 Hz.  I then went back and re-calibrated the maser clock, then back to the BFO for a final time.

The above is what worked for me.  I cannot guarantee that it will for everyone.  I would suggest that you do the search on this sit as stated above.

The above is free advice; it is worth only what you can make of it, and should be checked as well as you can.

Use at your own risk.
73
Evan
AC9TU


hickmodawg@...
 

Excellent.
 

Thanks for the great info, Evan.  I'll have a try at this.  I appreciate all the help here.

 

Does anyone know precisely the characters I need to change to the CEC Firmware v. 1.2 so it will work with my Ver. 5 board with the stock screen that came with the kit?

 

73,

Martin, AJ6CL


Evan Hand
 

That is one of the version listed in the CEC zip file.  It is a parallel interface, with 16 chacaters, so if my memory is working, then the version should end in 16p.

http://www.hamskey.com/2018/04/various-lcd-support-in-ubitx-with.html

prefix   : UBITXV5_CEC_
Version  : Vxxxx (ex: V1.097)
LCD Type : _XXX  (ex: 16x02 Parallel = 16P, 20x04 Parallel = 20P, 20x04 I2C = 20I, Nextion LCD = NX)
Signal Meter Type (Option) : none : Analaog Meter using A7 PIN
                             _S   : I2C Signal Meter using I2C Port

UBITXV5_CEC_Vxxxxx_16P.hex    : It is the LCD equipped with uBITX. Default LCD, 16x02 Parallel LCD
UBITXV5_CEC_Vxxxxx_16P_S.hex  : _16P with I2C Meter


UBITXV5_CEC_Vxxxxx_16I.hex    : 16x02 I2C LCD
UBITXV5_CEC_Vxxxxx_16I_S.hex  : _16I with I2C Meter


UBITXV5_CEC_Vxxxxx_20P.hex    : 20x04 Parallel LCD
UBITXV5_CEC_Vxxxxx_20P_S.hex  : _20P with I2C Meter


UBITXV5_CEC_Vxxxxx_20I.hex    : 20x04 I2C LCD
UBITXV5_CEC_Vxxxxx_20I_S.hex  : _20I with I2C Meter

UBITXV5_CEC_Vxxxxx_16D.hex    : 16x02 I2C Dual LCD
UBITXV5_CEC_Vxxxxx_16D_S.hex  : _16D with I2C Meter

UBITXV5_CEC_Vxxxxx_NX.hex     : Nextion LCD
UBITXV5_CEC_Vxxxxx_NX_S.hex   : _NX with I2C Meter
so the file would be UBITXV5_CEC_V1.200_16P.HEX in the zip file.

Hope that helps.
73
Evan
AC9TU


John (vk2eta)
 

Hello Martin,

Welcome to the world of conditional compile.

Here are the lines in the ubitx.h file that you need for the stock standard V5 board (you can copy/paste to replace existing lines 25 to 35 with the text below):

//Ubitx Board Version
#define UBITX_BOARD_VERSION 5           //v1 ~ v4 : 4, v5: 5

//Depending on the type of LCD mounted on the uBITX, uncomment one of the options below.
//You must select only one.
#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

This generates a program that just fits in the Nano's memory but you have all the features enabled.

Later if you want to, you can remove the features you do not use to make your menu simpler.
This is done in lines 62 to 83. To disable a feature change the "1" into a "0" (zero, not "O").

Example to disable WSPR:
Change line 73 form:
#define FN_WSPR         1 //1044
To:
#define FN_WSPR         0 //1044

The number after the // is an information Dr Lee has provided to indicate how much memory you save/use by disabling/enabling that feature. This is useful if you want to program other functions and need to make some room by removing unused features.

Hope that helps,

Good luck.

73, John (VK2ETA)


hickmodawg@...
 

Dear Evan & John:

Perfect! 

Thanks for the info. 

You guys are heroes!

This is just what I needed.

I’ll proceed forthwith.

I’ve made several CW QSO’s using my new radio in its unmodified, stock state.  It is a very rewarding sense of accomplishment for a beginner to put something together yourself and discover that it works! 

I’ll modify, compile and upload the CEC firmware to my spare Nano, then insert it into my uBITX and attempt a calibration, keeping the original Nano as a backup. 

I hope to hear you on the air!

73 es TNX AGN!

Martin, AJ6CL


hickmodawg@...
 

Fellow uBITx Enthusiasts:


Attempting to load the CEC firmware to my spare Nano…

I setup the Arduino Web Editor/Create platform/IDE, and successfully loaded the “Blink” program to my Nano, to be sure my PC and Nano are communicating.  I even changed the rate of the blink.


I downloaded the uBITx-1.20 zip file and imported it to my library.  Under the “ubitx.h” tab, I noticed that lines 25 to 35 seem to already be set to support the stock, unmodified uBITx and stock screen, which is what I’m using.


I clicked on the box with the check-mark (“Verify and Save”) then the box with the arrow to upload to my Nano, but it didn’t load and I got an error message saying “‘getBtnStatus’ was not declared in this scope”.


The Blink program is still running.


Does anyone know where my glitch could be?  Did I skip a step?


Sorry for my rookie questions.  So far, I’ve already learned a lot from you all and I appreciate the help.

Martin, AJ6CL


Evan Hand
 

Martin,
Based on your question, I will assume that you are not using the .hex files and hex loader to change the firmware in the new Nano.  In order to use the source code and make changes, you will need to have the full uBITX_20 master files in the smae directory, and then open/make a project with the uBITX20.h file as the source.  

The above is from memory, so I am sure that there are errors on the file names.  The fact that all of the required modules (end in .ino) must also be included in the same directory as the top level source file.  

Also, I would first do the compile option to test the compile before doing the download.  Again, it has been almost a year since I tried doing this myself, so you would be better off to wait for someone with more recent experience to give you the correct steps.

You can start with the Hex Loader and verify that the uBITX works with the pre-compiled version.

FWIW
73
Evan
AC9TU


hickmodawg@...
 

Evan:

Thanks for your quick reply and for your help.

Yes.  You are correct.  I’m on the IDE.

I see the ubitx_20 file my library in the center column.  I see five tabs in the right-hand column and they are labeled “ubitx_.ino,” “cat_libs.ino,” “cw_autokey.ino,” “softserial__tiny.cpp, and “ubitx.h.”   Anyone know my next step?  I’ve looked at “Getting Started” but it doesn’t get this far…

Clicking the “Verify and Save” (Is this the compile function?) box gets me the error message saying “‘getBtnStatus’ was not declared in this scope.”

I think I’m getting close but, I’m stuck…

Martin, AJ6CL


W2CTX
 

On the IDE there are buttons with a check-mark and a right-arrow.
The check-mark button only compiles. The right-arrow will compile and
upload. You must also make sure under the "Tools" menu that you
have selected a Port.

On September 29, 2019 at 2:44 PM hickmodawg@... wrote:


Evan:

Thanks for your quick reply and for your help.

Yes. You are correct. I’m on the IDE.

I see the ubitx_20 file my library in the center column. I see five tabs in the right-hand column and they are labeled “ubitx_.ino,” “cat_libs.ino,” “cw_autokey.ino,” “softserial__tiny.cpp, and “ubitx.h.” Anyone know my next step? I’ve looked at “Getting Started” but it doesn’t get this far…

Clicking the “Verify and Save” (Is this the compile function?) box gets me the error message saying “‘getBtnStatus’ was not declared in this scope.”

I think I’m getting close but, I’m stuck…

Martin, AJ6CL



hickmodawg@...
 

Hi W2CTX:

I think the com port is correct and the correct board is selected because the top line next to the upload arrow has the correct board and com port listed.

Upon hitting the Verify and Save box, (the icon with the check mark in it)  I notice that line 698 under the tab labeled “ubitx_20.ino”  is highlighted in red.  It reads “int keyStatus = getBtnStatus();”

And after trying to compile, I receive the error message “getBtnStatus’ was not declared in this scope,” And the program won’t upload to the Nano.

Anyone have any idea how to fix it?  I think the problem is related to this line in the firmware?  

Martin


W2CTX
 

When I start my IDE the ubitx_20 file is on the far left.
The routine getBtnStatus is in file ubitx_ui.ino

On September 29, 2019 at 3:40 PM hickmodawg@... wrote:


Hi W2CTX:

I think the com port is correct and the correct board is selected because the top line next to the upload arrow has the correct board and com port listed.

Upon hitting the Verify and Save box, (the icon with the check mark in it)  I notice that line 698 under the tab labeled “ubitx_20.ino” is highlighted in red. It reads “int keyStatus = getBtnStatus();”

And after trying to compile, I receive the error message “getBtnStatus’ was not declared in this scope,” And the program won’t upload to the Nano.

Anyone have any idea how to fix it? I think the problem is related to this line in the firmware?

Martin



V Zecchinelli
 

You should have a directory labeled ubitx_20 and inside this folder should look like this pic.
Open ubitx_20.ino and compile.
Vince



On 9/29/2019 4:01 PM, W2CTX wrote:
When I start my IDE the ubitx_20 file is on the far left.
The routine getBtnStatus is in file ubitx_ui.ino


On September 29, 2019 at 3:40 PM hickmodawg@... wrote:


Hi W2CTX:

I think the com port is correct and the correct board is selected because the top line next to the upload arrow has the correct board and com port listed.

Upon hitting the Verify and Save box, (the icon with the check mark in it)  I notice that line 698 under the tab labeled “ubitx_20.ino” is highlighted in red. It reads “int keyStatus = getBtnStatus();”

And after trying to compile, I receive the error message “getBtnStatus’ was not declared in this scope,” And the program won’t upload to the Nano.

Anyone have any idea how to fix it? I think the problem is related to this line in the firmware?

Martin







hickmodawg@...
 

Hallelujah!  And Eureka!

I successfully compiled and uploaded the CEC Firmware Ver. 1.2 to my spare Nano and it works in the radio!  Finally!

My mistake was trying to compile and upload with the new Arduino Nano on the workbench, not in the radio.  I feel so dumb…


After I soldered the pins onto the Nano and inserted it into the radio, the compile and upload worked perfectly with no error reports.


Now it’s on to calibration.

I understand that there may be several ways to calibrate?  What’s your favorite method to calibrate this little gem of a radio?  How do you find the correct values to enter into Memory Manager? 


73 to all of you and thank you big time all for your patience.

Martin, AJ6CL