Comparing Strings
KevinWiebe
Posts: 4
I am looking for an easy way to compare strings in a BS2. The string was read into an array with this command, SERIN LCDin,Baud,[noparse][[/noparse]STR serStr\9]. Ideally I would to use something as simple as, IF serStr <> "bla bla bla" THEN...
Any help would be great!
Any help would be great!
Comments
The easiest thing to do would be to use DATA statements to place constant strings into EEPROM and write a subroutine to compare your variable against a string given its address in EEPROM. You could also write a subroutine to look up a string in a table in EEPROM like:
Post Edited (Mike Green) : 11/16/2008 8:07:51 PM GMT
I am new to STAMPs and am using a BS2 for development. It has quickly become obvious I need to move up to the larger STAMPs.
Thanks again.
If you're used to more traditional processors, the 28SX and 48SX chips (and the boards, I love the boards) will run at 50 MIPS and support a real hardware interrupt, you might check those out.