SX/B Program ID - Request to compare two techniques
![John Kauffman](https://forums.parallax.com/uploads/userpics/555/nZBNEPT0B6FMD.jpg)
As I examine the program examples in the SX/B help, I see two ways of creating an ID for a program.
·
In the template a DATA command creates a table with a single record:
' ===================================================================· PROGRAM Start' ====================================================================Pgm_ID:· DATA· "SX/B Template", 0·'
' Subroutines / Jump Table'
·
In the HIGH/LOW example an ID command is used:
'
' Device Settings'
DEVICE········· SX28, OSC4MHZ, TURBO, STACKX, OPTIONXFREQ··········· 4_000_000ID············· "HIGH-LOW"
·
Can anyone illuminate:
Much Thanks.
·
In the template a DATA command creates a table with a single record:
' ===================================================================· PROGRAM Start' ====================================================================Pgm_ID:· DATA· "SX/B Template", 0·'
' Subroutines / Jump Table'
·
In the HIGH/LOW example an ID command is used:
'
' Device Settings'
DEVICE········· SX28, OSC4MHZ, TURBO, STACKX, OPTIONXFREQ··········· 4_000_000ID············· "HIGH-LOW"
·
Can anyone illuminate:
- Is there a fundamental difference in the techniques?
- Does the ID actually just invoke a DATA command?
- I can see that the DATA technique would then be retrieved using READ. What about the ID technique?
- Is one or the other more efficient?
- Which is considered best practice?
- ·
Much Thanks.
Comments
The DATA statement is only useful if you want to read the ID as a string from within your SX/B program.
The ID command actually stores the string in a special area of memory that can be read by the SX-Key IDE by using Run->Device->Read. It will read the ID string and put it into the ID box, just above the "PROGRAM" button.
Note that the ID string can even be read from an SX chip that is "read protected".
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheap used 4-digit LED display with driver IC·www.hc4led.com
Low power SD Data Logger www.sddatalogger.com
SX-Video Display Modules www.sxvm.com
There are only two guaranteed ways to become weathy.
Spend less than you make.
Make more than you spend.
·