Shop OBEX P1 Docs P2 Docs Learn Events
Error 124: Data occupies same location as program — Parallax Forums

Error 124: Data occupies same location as program

n_rummeln_rummel Posts: 3
edited 2010-03-29 23:18 in BASIC Stamp
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!

Comments

  • FranklinFranklin Posts: 4,747
    edited 2010-03-29 22:15
    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_rummeln_rummel Posts: 3
    edited 2010-03-29 22:19
    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 SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2010-03-29 23:18
    You're using the DS1302 Demo Code which almost completely fills memory (The LCD version does). As per the original article 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
    ·
Sign In or Register to comment.