¿ªÔÆÌåÓý

Re: uBitX NANO programming issues


Jack Purdum
 

Hi Jim:

We ran into a similar problem. "Raw" EEPROM on a "real" Nano (and most clones) is initialized to 0xFF for each EEPROM byte. However, you can't always depend on that. Our solution was to initailize EEPROM address 0 with a single-byte "sentinel" value (e.g., 88) and then in setup() read address 0 to see if it equaled the sentinel value. If not, we assumed the EEPROM was "raw" and we proceeded to do our thing. It also makes it very easy to "re-initialized" the EEPROM by simply forcing EEPROM address 0 to 0xFF.

Jack, W8TEE


On Monday, September 10, 2018, 8:42:43 AM EDT, Jim Sheldon <w0eb@...> wrote:


I had gotten a couple of "bug" reports in the earlier W0EB/W2CTX firmware saying some of the values weren't beening saved properly to EEPROM. ?This caused things not to work properly and quickly got a bit frustrating for the user. ?

I tracked this down to the later crop of Chinese NANO clones (even those being sold by Amazon and other big name sellers). ?It seems that the EEPROM's ?were never properly initialied to (I believe) All FFFFFFFF and had random data in them. ?This caused the programming to think that proper data had been stored by another program (CEC) which we tried to be careful not to ruin and it wouldn't save to that location. ?

As soon as this problem was originally discovered (and later forgotten until the perceived bug got reported) one of the TSW team members wrote an initialization routine to initialize a new NANO's EEPROM and should be done prior to installing any uBITX firmware on a new NANO if it isn't a genuine Arduino NANO.

That routine is available for download on the TSW website in the files section and may solve a bunch of controller not working problems. ?It's called: ?W0EB_W2CTX_NANO_EEPROM_Initializer_v1r2.zip and is located in the "Files Section" directory labeled: "Program sketches for the Raduino (modified for I2C displays) or our RadI2Cino Card using a 2 or 4 line I2C LCD display. "

If you run this on a new NANO it won't hurt anything any should initialize the EEPROM properly. ?Don't use it if your CEC program is running properly and you have saved a bunch of items using his "Manager" program as it will destroy your saved data. ?Same goes for the W0EB/W2CTS programs, but on a new NANO it may prevent some subtle things from happening that create problems.

Jim - W0EB

-

Join [email protected] to automatically receive all group messages.