PDA

View Full Version : Error 124: Data occupies same location as program



n_rummel
03-30-2010, 06:11 AM
Hello,
I'm trying to write a program that allows a user to specify the date (year, month, hour, min) for a motor to start and the duration they want the motor to run. I've combined two programs that I have, one for the clock, and one for the motor. Each works fine separately, but when I work them into each other, I get an error 124: Data occupies same location as program. What does this mean?

I'm using the BS2 on the homework board.

Thanks!

Franklin
03-30-2010, 06:15 AM
You have limited space for your program and variables. you have more data and program than you have space. If you link your program to a post we could give you some ideas to reduce its size (maybe)

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen

n_rummel
03-30-2010, 06:19 AM
Oh, I see. So like I was saying, I want the clock to always be running after the user sets the time. Then, I want the user to be able to select a future date a time for the motor to turn on and run, and select a certain duration (number of days) for it to keep running before it stops. I've attached my program.

Thanks so much.

Chris Savage
03-30-2010, 07:18 AM
You're using the DS1302 Demo Code which almost completely fills memory (The LCD version does). As per the original article (http://www.savagecircuits.com/forums/content.php?157-DS1302-Demo-Code)you're not really supposed to use the demo code. You're supposed to use the template, making use of only the resources you need.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage

Parallax Engineering