I develop my application with a Nano then put it on a ATMEGA chip via a ELEGOO UNO R3 Board as a programmer setup. Then this chip I put into hardware instead of the Nano which i develop the hardware with. Everything works fine with the Nano (On computer with USB and on hardware), that is uploading a sketch to first write the eeprom using PUT and then check it with the GET. Then loading another program onto the NANO that uses the eeprom value. Life is good...
Then, having it working on the Nano, tried to do the the same on the chip on the Elegoo R3. The chip always returns -59536. Quite sure I have the UI settings right, board,etc. The main program works fine when uploaded...just seems the Elegoo . atmel chip combo does not work for writing the EEPROM, yet the other main program uploads fine and works. with no PUT and GET.
In summary Elegoo R3 will not read or write EEPROM using PUT and GET. Another non EEPROM program works fine, and shows the -59536 where it should show 6000 first written with the PUT.
IT all works fine on the Nano...A hardware issue on the Uno, but what and how to solve?
Any suggestions? Thank you
From UI:
Tools / Board:"Arduino Uno"
Programmer:AVRISP mkII (tried different ones, no good)
chip atmel 35473D, atmega328P U, 21135PG (tried 2 different chips)
from ELEGOO Get Board Info from UI..
BN: Arduino Uno
VID: 2341
PID: 0043
SN: 7593231303935171F151
To write value (works fine on nano but not on uno)
#include <EEPROM.h>
void setup() {
// put your setup code here, to run once:
//delay(1000);
EEPROM.put(0, 6000);
}
void loop() {
// put your main code here, to run repeatedly:
}
to check it...(works fine on nano but not on uno)
#include <EEPROM.h>
void setup() {
Serial.begin (9600);
// put your setup code here, to run once:
long LongVar;
EEPROM.get(0, LongVar);
Serial.println(LongVar);
}
void loop() {
// put your main code here, to run repeatedly:
}
output..
16:33:01.856 -> -59536 (should be 6000)