Interesting error with BS2px...
jcpole
Posts: 92
Hi...
I'm trying to run Chris Savage's DS1302 demo program on my BS2px (on a PDB).
Whenever I attempt to run (or check the syntax of) the program, I get an error message saying "Data Occupies Same Location as Program".· I want to believe that error is telling me that the program is too big to fit into the BS2px's memory, but I'm not sure.
I have attached the program I'm trying to run, but it is Chris' program without modification.
Thanks...
Jamie
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--
Jamie C. Pole
Principal Consultant
J.C. Pole & Associates, Inc.
http://www.jcpa.com/
I'm trying to run Chris Savage's DS1302 demo program on my BS2px (on a PDB).
Whenever I attempt to run (or check the syntax of) the program, I get an error message saying "Data Occupies Same Location as Program".· I want to believe that error is telling me that the program is too big to fit into the BS2px's memory, but I'm not sure.
I have attached the program I'm trying to run, but it is Chris' program without modification.
Thanks...
Jamie
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--
Jamie C. Pole
Principal Consultant
J.C. Pole & Associates, Inc.
http://www.jcpa.com/
Comments
· SEROUT LCD, Baud, [noparse][[/noparse]"Parallax, Inc.", LcdCR]
··SEROUT LCD, Baud,·[noparse][[/noparse]"DS1302 RTC Demo"]
can be changed to:
· SEROUT LCD, Baud, [noparse][[/noparse]"Parallax, Inc.", LcdCR,
···················· "DS1302 RTC Demo"]
You can do the same thing with DEBUG.· This may free up enough space to get it to fit into the BS2sx.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
I will try your suggestion. There are some other places where I can (cringe) replace variables with hard-coded values.
Thanks Jon...
Jamie
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--
Jamie C. Pole
Principal Consultant
J.C. Pole & Associates, Inc.
http://www.jcpa.com/
·· Sorry about that...I was trying to be as clear as possible without being too verbose in the text.· All those text SEROUT and DEBUG statements take up a lot of space.· 98% of that code is not needed to use the DS1302, it's merely a front-end demo with a lot of text overhead.· Definately take Jon's advice and remove some non-essential DEBUG statements to use the LCD and don't forget to change the baud rate constant for the LCD, since I was bad and didn't use Jon's conditional compilation code.·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
Thanks for the info.
Jamie
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--
Jamie C. Pole
Principal Consultant
J.C. Pole & Associates, Inc.
http://www.jcpa.com/
Jamie
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--
Jamie C. Pole
Principal Consultant
J.C. Pole & Associates, Inc.
http://www.jcpa.com/
·· No attempt was made to compact that code.· In fact, if you look at the comments you'll see there are a plenty.· My reason for this?· There is plenty of working DS1302 code in several areas, but we still were getting a lot of calls from people not understanding just what was happening, especially when it came to accessing RAM locations.
·· My hope was to make it really simple to see what was happening in each subroutine, yet in testing to make it verbose enough so it was easy to use and hard to make a mistake.· The necessary parts of the code can be broken down into:
1) Constants & Variables
2) Initialization Code
3) Subroutines to access the DS1302
Your main code will use these three items.· Everything else in that code is mere wrapping.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com