Date   
Re: CAT Support uBITX Firmware CEC Version 1.0 Release #ubitx

Ian Lee
 

Philip 

Yes, that's right. I made various attempts to put a lot of features into a small space.
Any attempt was good. (ex:change method using strings, Applying new logic to display frequencies ...)
However, there were times when I did not see the effect. (ex : Merge menus - Put all the toggle menus functionality in one function, Put all the use encoder menus functionality in one function)
I was able to save a little bit of flash memory, but the code was quite complicated. So I erased those codes and recover before sources.
For CAT communication, i implemented only protocols that uBITX can use.

Ian KD8CEC



2018-02-08 7:11 GMT+09:00 Philip <philip.g7jur@...>:

Hi Max.
I think the firmware has left no room for memory's.

Philip Lock G7JUR



--
Best 73
KD8CEC / Ph.D ian lee
kd8cec@...
www.hamskey.com (my blog)

New file uploaded to BITX20@groups.io

BITX20@groups.io Notification <BITX20+notification@...>
 

Hello,

This email message is a notification to let you know that a file has been uploaded to the Files area of the BITX20@groups.io group.

File: ubitx_I2C_V2_00R.zip

Uploaded By: Jim Sheldon

Description:
W0EB/W2CTX latest I2C modification and software for the uBITX. This version is an almost total overhaul of our first I2C release - simpler menu system, extra A/B SPLIT pushbutton mod - A3 A6 and A7 analog lines now available for programming. Keyer inputs have been moved to D8, D11 and D12 as well as PTT to D12. Complete, illustrated instruction manual included in the zip file along with the extra, required LiquidCrystal_I2C library for the Arduino IDE (IDE Version 1.8.5 or later required to compile).

You can access this file at the URL:
https://groups.io/g/BITX20/files/ubitx_I2C_V2_00R.zip

Cheers,
The Groups.io Team

Re: CAT Support uBITX Firmware CEC Version 1.0 Release #ubitx

Jerry Gaffke
 

In section 8.4 of the ATmega328P datasheet (used on the Nano, which is used on the Raduino) 
    (EEPROM) is organized as a separate data space, in which single bytes can be read and written.
    The EEPROM has an endurance of at least 100,000 write/erase cycles.
So can update each individual byte 100,000 times.
Hard to imagine burning out an EEPROM byte if it involved twiddling knobs and pressing some buttons for each update.

Where you get into trouble is when the code writes to EEPROM with no operator intervention.
Takes about 3.4ms to erase and write an eeprom byte, so a code loop could burn out a byte of eeprom in about an hour.


On Wed, Feb 7, 2018 at 03:49 pm, Ronald Pfeiffer wrote:
would be careful since EEPROM has a finite write life!
These nano's are soldered in.
 
rOn
 
From: Mike Woods <mhwoods@...>   Sent: Wednesday, February 7, 2018 6:27 PM
There are 20 memory channels in the latest versions (0.35 and 1.0) and they are stored in EEPROM

Re: CAT Support uBITX Firmware CEC Version 1.0 Release #ubitx

W2CTX
 

You can eat up 100,000 writes.  Each time you change any menu item
it gets stored in EEPROM.  Ian also automatically stores the current
frequency each time you change it.

Also I meant after several years when users get intermittent errors
for no apparent reason!

rOn



From: Jerry Gaffke via Groups.Io <jgaffke@...>
To: BITX20@groups.io
Sent: Wednesday, February 7, 2018 8:44 PM
Subject: Re: [BITX20] CAT Support uBITX Firmware CEC Version 1.0 Release #ubitx

In section 8.4 of the ATmega328P datasheet (used on the Nano, which is used on the Raduino) 
    (EEPROM) is organized as a separate data space, in which single bytes can be read and written.
    The EEPROM has an endurance of at least 100,000 write/erase cycles.
So can update each individual byte 100,000 times.
Hard to imagine burning out an EEPROM byte if it involved twiddling knobs and pressing some buttons for each update.

Where you get into trouble is when the code writes to EEPROM with no operator intervention.
Takes about 3.4ms to erase and write an eeprom byte, so a code loop could burn out a byte of eeprom in about an hour.


On Wed, Feb 7, 2018 at 03:49 pm, Ronald Pfeiffer wrote:
would be careful since EEPROM has a finite write life!
These nano's are soldered in.
 
rOn
 
From: Mike Woods <mhwoods@...>   Sent: Wednesday, February 7, 2018 6:27 PM
There are 20 memory channels in the latest versions (0.35 and 1.0) and they are stored in EEPROM


Re: CAT Support uBITX Firmware CEC Version 1.0 Release #ubitx

Ian Lee
 

Thanks for very important information.

The lifetime of the eeprom guaranteed by the vendor is 100,000 write cycle. read cycle is unlimited.
One thing to note is 100,000 times per memory address.
It is not important how many eeprom addresses are used, but how much is written to one eeprom address is important.
There is no problem with using a typical eeprom. 100,000 times more than thought is very large.
Some people say that they have used more than 100,000 through the experiment, but it is better to use the range that the vendor guarantees.

Experience has shown that the eeprom lifetime error is one case.
It is a periodic write to one memory address.
The most vulnerable is to use eeprom in loops like for and while, or to use the eeprom periodically in the timer.

In case of uBITX, cyclic frequency(with mode) storage to eeprom will be a problem to automatically display the frequency that was used previously when the radio is turned on and off.

If you save every 5 seconds, 720 writes occur in 1 hour. The life of the eeprom guaranteed by the vendor is only 138 hours. If use it for 2 hours every day, the life time of 70 days is over.
Of course, the actual life of the eeprom is much longer than the number of times it is guaranteed by the business. Because we are not always lucky, i will not discuss it here.

So, I am actively agreeing with ron's important information.

I have put some of safeguards in my firmware to take into account the life of the eeprom.
The first is virtual eeprom. I created the same variable as eeprom that I had to write periodically and put it in memory.
Compared to the contents of memory before writing to eeprom, I made it write if it changed.
This avoids unnecessarily wasting the write cycle on a periodic basis and preventing the CPU usable
Another was to identify the intent of the user. In other words, if the frequency is changing rapidly, the user is turning the knob.
That is, if the frequency is changing, it will skip even if the periodic storage time is reached.

Always be careful when using eeprom in loop statements or timers.

Ian KD8CEC

2018-02-08 8:49 GMT+09:00 Ronald Pfeiffer via Groups.Io <w2ctx@...>:

I would be careful since EEPROM has a finite write life!
These nano's are soldered in.

rOn



From: Mike Woods <mhwoods@...>
To: BITX20@groups.io
Sent: Wednesday, February 7, 2018 6:27 PM
Subject: Re: [BITX20] CAT Support uBITX Firmware CEC Version 1.0 Release #ubitx

There are 20 memory channels in the latest versions (0.35 and 1.0) and they are stored in EEPROM.

Mike

On Thu, 8 Feb 2018 at 11:14 AM, John P <j.m.price@...> wrote:
Not familiar with your code, but maybe keep the memories in EEPROM. 
--
John - WA2FZW




--
Best 73
KD8CEC / Ph.D ian lee
kd8cec@...
www.hamskey.com (my blog)

Re: CAT Support uBITX Firmware CEC Version 1.0 Release #ubitx

Ian Lee
 

Jerry.

You wrote while I was writing a long story.

Yes. There is a problem when writing to the eeprom periodically. so Various avoidance methods are used.
Increased conditions for writing eeprom, sequential writing of multiple eeproms, random access, 
If you are interested, you can see how I avoided the eeprom life time in my code.
I've used Arduino for the first time, but the firmware has been working in various project for quite some time. 
So I check the datasheet before you start the project like you.
For parts with life cycle such as eeprom, relay, etc., calculations must be done first.

Thanks you good information.

Ian KD8CEC

2018-02-08 10:43 GMT+09:00 Jerry Gaffke via Groups.Io <jgaffke@...>:

In section 8.4 of the ATmega328P datasheet (used on the Nano, which is used on the Raduino) 
    (EEPROM) is organized as a separate data space, in which single bytes can be read and written.
    The EEPROM has an endurance of at least 100,000 write/erase cycles.
So can update each individual byte 100,000 times.
Hard to imagine burning out an EEPROM byte if it involved twiddling knobs and pressing some buttons for each update.

Where you get into trouble is when the code writes to EEPROM with no operator intervention.
Takes about 3.4ms to erase and write an eeprom byte, so a code loop could burn out a byte of eeprom in about an hour.


On Wed, Feb 7, 2018 at 03:49 pm, Ronald Pfeiffer wrote:
would be careful since EEPROM has a finite write life!
These nano's are soldered in.
 
rOn
 
From: Mike Woods <mhwoods@...>   Sent: Wednesday, February 7, 2018 6:27 PM
There are 20 memory channels in the latest versions (0.35 and 1.0) and they are stored in EEPROM



--
Best 73
KD8CEC / Ph.D ian lee
kd8cec@...
www.hamskey.com (my blog)

Are you looking for a case for your Bitx?

Dr Fred Hambrecht
 

Looking at stuff on EBay there is a ton of EXTON equipment for sale. I bring it up because the equipment is cheaper than cases and many already have 16X2 or 20X4 displays already installed. Lots of connectors as well. A search of "EXTON" will give you a ton of ideas.

v/r
Fred W4JLE

Re: W0EB/W2CTX Latest uBITX software release #ubitx

Jim Sheldon
 

Arigao gozaimasu Mitani San, 

73, 
Jim, W0EB

Re: W0EB/W2CTX Latest uBITX software release #ubitx

Jim Sheldon
 

Arigato - hi hi

Re: CAT Support uBITX Firmware CEC Version 1.0 Release #ubitx

Ian Lee
 

Ron

You wrote while I was writing a long story.
Thank you for your excellent advice. I have been studying a lot.
I will do calculate and simulation write cycle time one more time.

Ian KD8CEC




2018-02-08 10:58 GMT+09:00 Ronald Pfeiffer via Groups.Io <w2ctx@...>:

You can eat up 100,000 writes.  Each time you change any menu item
it gets stored in EEPROM.  Ian also automatically stores the current
frequency each time you change it.

Also I meant after several years when users get intermittent errors
for no apparent reason!

rOn



From: Jerry Gaffke via Groups.Io <jgaffke=yahoo.com@groups.io>
To: BITX20@groups.io
Sent: Wednesday, February 7, 2018 8:44 PM
Subject: Re: [BITX20] CAT Support uBITX Firmware CEC Version 1.0 Release #ubitx

In section 8.4 of the ATmega328P datasheet (used on the Nano, which is used on the Raduino) 
    (EEPROM) is organized as a separate data space, in which single bytes can be read and written.
    The EEPROM has an endurance of at least 100,000 write/erase cycles.
So can update each individual byte 100,000 times.
Hard to imagine burning out an EEPROM byte if it involved twiddling knobs and pressing some buttons for each update.

Where you get into trouble is when the code writes to EEPROM with no operator intervention.
Takes about 3.4ms to erase and write an eeprom byte, so a code loop could burn out a byte of eeprom in about an hour.


On Wed, Feb 7, 2018 at 03:49 pm, Ronald Pfeiffer wrote:
would be careful since EEPROM has a finite write life!
These nano's are soldered in.
 
rOn
 
From: Mike Woods <mhwoods@...>   Sent: Wednesday, February 7, 2018 6:27 PM
There are 20 memory channels in the latest versions (0.35 and 1.0) and they are stored in EEPROM




--
Best 73
KD8CEC / Ph.D ian lee
kd8cec@...
www.hamskey.com (my blog)

Re: CAT Support uBITX Firmware CEC Version 1.0 Release #ubitx

Nick VK4PP
 

Another trick I have seen to save EEPROM life:
It is used in an Arduino Antenna Rotator, is to monitor the 12V via a voltage divider and Analog port.
When the voltage drops maybe 1V below "normal", as seen at startup, write settings to eeprom only then.

When you power off the radio the 5volt regulator + input capacitor should hold up the Arduino for just long enough to catch the voltage dropping and write the last used frequency to memory....

73, Nik, VK4PLN

Re: ubitx AGC?

Tim Gorman
 

Where did you get the "production" schematic for the ubitx? The hfsignal.com web site schematic is different. It shows no C78. 

Both the old schematic and the one of the web site shows R253 as being a 1K resistor. 

The 1K resistor and .1uf capacitor would for a low-pass filter with a 3db frequency of about 1500hz. I'm not sure why that is there but I can only assume it is needed to tame the audio circuit.

Re: CAT Support uBITX Firmware CEC Version 1.0 Release #ubitx

Jack, W8TEE
 

I had a situation where I wanted to insure that, when the user restarted their transceiver, it would show the last-used frequency. The problem is you don't know when they are going to turn the rig off. Sure, there are ways to do things after power is removed, but this was a QRP rig where cost was a primary concern. What I did was use one of the Nano's timers to try to determine what the user was doing. If the frequency is changing in short intervals, say once every second, chances are they are tuning around on the band. If they have not changed frequency in the past XX seconds, I updated the EEPROM with that frequency, provided that the EEPROM frequency is different from the current operating frequency. That way, if the user is monitoring a net frequency for an hour or is away doing something but the rig is still on, no EEPROM updates are done. EEPROM reads have no life cycle, so if they are just tuning around or if they are "parked" on a frequency, this approach can extend the lifetime of the EEPROM.

Jack, W8TEE



From: Ian Lee <kd8cec@...>
To: BITX20@groups.io
Sent: Wednesday, February 7, 2018 9:08 PM
Subject: Re: [BITX20] CAT Support uBITX Firmware CEC Version 1.0 Release #ubitx

Thanks for very important information.

The lifetime of the eeprom guaranteed by the vendor is 100,000 write cycle. read cycle is unlimited.
One thing to note is 100,000 times per memory address.
It is not important how many eeprom addresses are used, but how much is written to one eeprom address is important.
There is no problem with using a typical eeprom. 100,000 times more than thought is very large.
Some people say that they have used more than 100,000 through the experiment, but it is better to use the range that the vendor guarantees.

Experience has shown that the eeprom lifetime error is one case.
It is a periodic write to one memory address.
The most vulnerable is to use eeprom in loops like for and while, or to use the eeprom periodically in the timer.

In case of uBITX, cyclic frequency(with mode) storage to eeprom will be a problem to automatically display the frequency that was used previously when the radio is turned on and off.

If you save every 5 seconds, 720 writes occur in 1 hour. The life of the eeprom guaranteed by the vendor is only 138 hours. If use it for 2 hours every day, the life time of 70 days is over.
Of course, the actual life of the eeprom is much longer than the number of times it is guaranteed by the business. Because we are not always lucky, i will not discuss it here.

So, I am actively agreeing with ron's important information.

I have put some of safeguards in my firmware to take into account the life of the eeprom.
The first is virtual eeprom. I created the same variable as eeprom that I had to write periodically and put it in memory.
Compared to the contents of memory before writing to eeprom, I made it write if it changed.
This avoids unnecessarily wasting the write cycle on a periodic basis and preventing the CPU usable
Another was to identify the intent of the user. In other words, if the frequency is changing rapidly, the user is turning the knob.
That is, if the frequency is changing, it will skip even if the periodic storage time is reached.

Always be careful when using eeprom in loop statements or timers.

Ian KD8CEC

2018-02-08 8:49 GMT+09:00 Ronald Pfeiffer via Groups.Io <w2ctx@...>:
I would be careful since EEPROM has a finite write life!
These nano's are soldered in.

rOn



From: Mike Woods <mhwoods@...>
To: BITX20@groups.io
Sent: Wednesday, February 7, 2018 6:27 PM
Subject: Re: [BITX20] CAT Support uBITX Firmware CEC Version 1.0 Release #ubitx

There are 20 memory channels in the latest versions (0.35 and 1.0) and they are stored in EEPROM.

Mike

On Thu, 8 Feb 2018 at 11:14 AM, John P <j.m.price@...> wrote:
Not familiar with your code, but maybe keep the memories in EEPROM. 
--
John - WA2FZW




--
Best 73
KD8CEC / Ph.D ian lee
kd8cec@...
www.hamskey.com (my blog)


Re: CAT Support uBITX Firmware CEC Version 1.0 Release #ubitx

Ian Lee
 

Nik
Good Idea!!!

It is amazing to be solved with only one capacitor. Since the LCD consumes quite a lot of current, I need to calculate the capacitance capacity.
I have been thinking a lot about reducing program memory size.
If this method is applied to my hardware modified version firmware, the program size can be reduced. This is because you can remove code that takes into account the lifetime of the eeprom.

Thanks for great idea

Ian KD8CEC

2018-02-08 11:49 GMT+09:00 Nick VK4PLN <nickpullen@...>:

Another trick I have seen to save EEPROM life:
It is used in an Arduino Antenna Rotator, is to monitor the 12V via a voltage divider and Analog port.
When the voltage drops maybe 1V below "normal", as seen at startup, write settings to eeprom only then.

When you power off the radio the 5volt regulator + input capacitor should hold up the Arduino for just long enough to catch the voltage dropping and write the last used frequency to memory....

73, Nik, VK4PLN



--
Best 73
KD8CEC / Ph.D ian lee
kd8cec@...
www.hamskey.com (my blog)

Re: CAT Support uBITX Firmware CEC Version 1.0 Release #ubitx

Jack, W8TEE
 

Has anyone else done this? I tried and I couldn't reliably get the 4-byte address written in time. Of course, it could have been the cap I used, the voltage divider...even clones may work slightly differently. Just make sure you test it a bunch of times with your setup.

Jack, W8TEE



From: Nick VK4PLN <nickpullen@...>
To: BITX20@groups.io
Sent: Wednesday, February 7, 2018 9:49 PM
Subject: Re: [BITX20] CAT Support uBITX Firmware CEC Version 1.0 Release #ubitx

Another trick I have seen to save EEPROM life:
It is used in an Arduino Antenna Rotator, is to monitor the 12V via a voltage divider and Analog port.
When the voltage drops maybe 1V below "normal", as seen at startup, write settings to eeprom only then.

When you power off the radio the 5volt regulator + input capacitor should hold up the Arduino for just long enough to catch the voltage dropping and write the last used frequency to memory....

73, Nik, VK4PLN


Re: CAT Support uBITX Firmware CEC Version 1.0 Release #ubitx

Nick VK4PP
 

I have a 4700uf cap in my junk box, that should work across the  output of the 78l05... hi hi

Re: CAT Support uBITX Firmware CEC Version 1.0 Release #ubitx

MVS Sarma
 

I fear that 4700uF would be an overkill on a tiny 78L05.
 After all the filteration there is needed for RF and if at all some remnant audio on power line. That too for a load current of few mA.
 The demand should be for more like low esr  say 10uF tantalum followed by say 0.47 disc or ployepropelene (box capacitor).

regards
 sarma
 vu3zmv
 

Regards
MVS Sarma
 

On Thu, Feb 8, 2018 at 8:49 AM, Nik VK4PLN <nickpullen@...> wrote:
I have a 4700uf cap in my junk box, that should work across the  output of the 78l05... hi hi


Re: CAT Support uBITX Firmware CEC Version 1.0 Release #ubitx

Nick VK4PP
 

Not for RF filtering , but as a "battery" on power off....
73, Nik

Re: CAT Support uBITX Firmware CEC Version 1.0 Release #ubitx

John P
 

Here's a trick I used in my smart controller for the old AR-22 rotator. In a VFO application, if the program restarts not remembering the last frequency, it's not a big deal, but in a rotator controller, if it doesn't remember the last azimuth, then the rotator and controller can be way out of sync.

First thing I did was to add a "Run/Update" toggle switch that puts a 10uF cap across the Arduino's reset line when in the "Run" position. This was necessary because the N1MM+ Rotor control program that I was using pulses the DTR line when it starts which tells the Arduino to look for a new software upload (the DTR signal is routed to the reset line). The cap gobbles up the short pulse and prevents the Arduino from seeing it.

Next a I added a pushbutton between one of the digital pins (I used 18 on a UNO)  and ground. When the button is pushed, it does a software reset of the Arduino using the "SoftReset library". What you can do with this approach is to do any housekeeping chores that need to be done before a shutdown.

True, you're basically doing a reboot before you turn it off, but it does the job!
--
John - WA2FZW

Re: CAT Support uBITX Firmware CEC Version 1.0 Release #ubitx

Clark Martin
 

Clark Martin
KK6ISP

On Feb 7, 2018, at 7:19 PM, Nik VK4PLN <nickpullen@...> wrote:

I have a 4700uf cap in my junk box, that should work across the output of the 78l05... hi hi
Don’t put it on the output, put it on the input with a diode isolating it from the RF Board if needed. On the input it only takes around a 0.5V drop before EEROM writes become either unreliable or not possible (I don’t recall now if the Mega series has undervoltage protection). While if it’s on the input it takes a drop of 5.0 volts (12 -> 7) before the regulator cuts stops regulating. That’s roughly 10 times as much time to do what you need.