SX/B - Bringing multiple test programs into a singel final program
![John Kauffman](https://forums.parallax.com/uploads/userpics/555/nZBNEPT0B6FMD.jpg)
I am finishing up a hobbyist exercise in SX/B to sense, timestamp, store and display simple data like temperature and voltage.
·
I wrote five individual test programs in SX/B for interfaces with five externals: EEPROM, DS1302 clock, LCD display, A/D and the temperature sensor. Each test program works fine on its own.
Each program is broken by comments into sections from the SX template: Constants, Variables, Start: SUB declaration table and subroutines. Every variable, SUB and pin has a globally unique name. No ISR in the project.
·
Any thoughts on the *best* way to bring them together for the final project?
·
So far I have just been copying the Constant sections from each test program into the Constants section of the master program. Then I repeat for Variables, etc. The result is that the constants are all in one place, but the package of code for one objective is split up. It is time-consuming to swap in an improvement that I have made in a test program.
·
Is there a way to package up a set of code (including variables, start:, sub declarations table and constants) so that I can insert an entire functional unit into the main program in one copy/paste?
·
Thanks.
·
·
·
I wrote five individual test programs in SX/B for interfaces with five externals: EEPROM, DS1302 clock, LCD display, A/D and the temperature sensor. Each test program works fine on its own.
Each program is broken by comments into sections from the SX template: Constants, Variables, Start: SUB declaration table and subroutines. Every variable, SUB and pin has a globally unique name. No ISR in the project.
·
Any thoughts on the *best* way to bring them together for the final project?
·
So far I have just been copying the Constant sections from each test program into the Constants section of the master program. Then I repeat for Variables, etc. The result is that the constants are all in one place, but the package of code for one objective is split up. It is time-consuming to swap in an improvement that I have made in a test program.
·
Is there a way to package up a set of code (including variables, start:, sub declarations table and constants) so that I can insert an entire functional unit into the main program in one copy/paste?
·
Thanks.
·
·
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
PLEASE CONSIDER the following:
Do you want a quickly operational black box solution or the knowledge included therein?······
I would use "LOAD" to pull in the individule files.
You may need to split each module into two pieces: A header file, and a code file. This is sometimes needed to get the pieces in the right place.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
www.iElectronicDesigns.com
·