Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Arduino Nano internal memory issue

tapu

Full Member level 4
Joined
Sep 15, 2014
Messages
234
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,298
Location
india
Activity points
3,041
Dear All,
I am using arduino nano for my multi event alarm clock project.Here I m using internal eeprom of nano to store multiple alarms data. I want toused 336 bytes of eeprom to store weekly data of alarm.project runs but after sometime it shows error data of alarm.and alarm rings anytime.as i use lcd 16x2 to display time & alarm.image is attached.you can see my arduino code here.
 

Attachments

  • Untitled.png
    Untitled.png
    121.5 KB · Views: 71
  • arduino_code.txt
    37.9 KB · Views: 81
Hi,

You say Aduino Nano, but picture shows Arduino Uno.
You say internal EEPROM, but the picture shows external EEPROM.
"After some time" is what? Seconds, hours years?
What does "shows error data" mean? What data? Where? On the display?

Klaus
 
General comments:
1. you can eliminate about 90% of your code by using loops to read the EEPROM instead of a function call to every address.
2. the DS3232 only updates once per second but you read it continuously in a loop. If you connect it's INT/SQW pin to the MCU so it interrupts every second it will release much of the time spent repeatedly reading the same values.
3. be careful with bracketing complex 'if' statements. Remember each part of the 'if' returns true or false so it is safer to write:
Code:
if (hh==7 && mm==20 && ss==00   && mode_status ==1)
as
Code:
if ((hh==7) && (mm==20) && (ss==00)  && (mode_status ==1))
4. consider grouping some of your lines into functions and calling them as required instead of doing everything in-line.

Brian.
 

LaTeX Commands Quick-Menu:

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top