More memory?
Xanfaras
Posts: 7
Hello all,
I'm pretty new to robotics and the BASIC stamp. Firstly, should anyone need to know, I am using the USB BOE stamp (link below). What I am trying to do, is to create a shortest-path maze-bot. The algorithm I have been developing is based on the A* algorithm (link below). Basically, the bot is supposed to visit each of the cells in the maze in order to determine the distance from the start. Then, the robot is able to head from finish to start using the shortest path by following the numbers in decreasing fashion back to start. With that said, I initially estimate for an nxn maze, I will need at least n*n*ceiling(log2(n*n)) bits for storing these cell distances. From what I understand, the BASIC stamp has 32 bytes of RAM, of which, 6 bytes are reserved for controlling the IO pins, leaving 26 bytes available. This would mean my maze size is limited to 6x6 (24.5 bytes) under minimum usage assumptions, which, quite frankly, is not going to happen.
Now, for my actual question(s), is there a good method one can employ to increase the available memory of the stamp? My initial thoughts were of some sort of chip expansion, although, further thinking led me to some other options, such as communication with a host (PC), or something along those lines. Perhaps I should be looking into another, less memory intensive algorithm? Then again, there is always the possibility that I've messed something up or missed something entirely, which is why I turn to those with more knowledge than I. Any thoughts, suggestions, or questions are happily welcomed and encouraged.
Thanks
Xan
My Board:
www.parallax.com/StoreSearchResults/tabid/768/List/0/SortField/4/ProductID/294/Default.aspx?txtSearch=board+of+education+usb
A* Algorithm:
en.wikipedia.org/wiki/A*_search_algorithm
I'm pretty new to robotics and the BASIC stamp. Firstly, should anyone need to know, I am using the USB BOE stamp (link below). What I am trying to do, is to create a shortest-path maze-bot. The algorithm I have been developing is based on the A* algorithm (link below). Basically, the bot is supposed to visit each of the cells in the maze in order to determine the distance from the start. Then, the robot is able to head from finish to start using the shortest path by following the numbers in decreasing fashion back to start. With that said, I initially estimate for an nxn maze, I will need at least n*n*ceiling(log2(n*n)) bits for storing these cell distances. From what I understand, the BASIC stamp has 32 bytes of RAM, of which, 6 bytes are reserved for controlling the IO pins, leaving 26 bytes available. This would mean my maze size is limited to 6x6 (24.5 bytes) under minimum usage assumptions, which, quite frankly, is not going to happen.
Now, for my actual question(s), is there a good method one can employ to increase the available memory of the stamp? My initial thoughts were of some sort of chip expansion, although, further thinking led me to some other options, such as communication with a host (PC), or something along those lines. Perhaps I should be looking into another, less memory intensive algorithm? Then again, there is always the possibility that I've messed something up or missed something entirely, which is why I turn to those with more knowledge than I. Any thoughts, suggestions, or questions are happily welcomed and encouraged.
Thanks
Xan
My Board:
www.parallax.com/StoreSearchResults/tabid/768/List/0/SortField/4/ProductID/294/Default.aspx?txtSearch=board+of+education+usb
A* Algorithm:
en.wikipedia.org/wiki/A*_search_algorithm
Comments
The BS2E has 5 switchable banks of memory like the BS2. If you can break your program into smaller subroutines, you can take advantage of that extra memory size for more program storage.
Check out the Parallax website, it's in there!
Best,
erco
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·"If you build it, they will come."
Xan
And check the recent post "Downloading to program slots" for BS2E info.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·"If you build it, they will come."
Say you wrote a value every 10 seconds -- that's 110 days -- not even 6 months. Still not very long.
On the other hand, if you are only writing a startup state, and your project resets, say, 20 times per day, it would take perhaps 1369 years till the location potentially burned out.
So it's really a question of what you are doing and how often.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
1uffakind.com/robots/povBitMapBuilder.php
1uffakind.com/robots/resistorLadder.php
Post Edited (Zoot) : 12/29/2009 10:30:22 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike2545
I'm new at this, so please bear with me. Thanks,
Xan
You might look at datasheets for some of the SPI EEPROMs since they use the same commands and byte sequences as the FRAM since the FRAM is designed to be a drop-in replacement for an EEPROM. The EEPROM datasheets and application notes might be more thorough.
I just did a project where the stamp runs constantly day after day, counting 30 mins then pulsing a pin high for a few secs, then back to counting again.
I'm using a PAUSE 60000 inside a FOR 1 to 30 NEXT loop.
I'm not going to burn it out any time soon, am I ?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
1uffakind.com/robots/povBitMapBuilder.php
1uffakind.com/robots/resistorLadder.php
I was fearing that the program is "reading" the instructions and thus limited in life.
Sounds like you're kinda new to everything. GREAT. Love your enthusiasm. If I were you, I'd wait on interfacing external memory and learning I2C or SPI. You can do everything you need to (perhaps on a smaller scale) with READ/WRITE statements and a BS2 or BS2E. Trust me, you have a long row to hoe just learning PBASIC, getting a robot rolling how you want and implementing your algorithm. But you're asking in the right place. These Forums (Robotics, too) put you in touch with some very savvy folks. And some hacks like me, too! [noparse]:)[/noparse]
Don't bite off too much at once. Robotics ain't easy; savor those little victories!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·"If you build it, they will come."
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·"If you build it, they will come."