Issue With Switching Basic Stamps
AMUSERNAME
Posts: 3
I am working on a program that will display letters on a 5x7 LED grid. However, I started out the program using a BS2 Stamp. After realizing how long the program was going to be, I switched to a BS2px Stamp, but it doesn't seem to be recognized, is displaying the same amount of memory in a Memory Map. It is filled after approximately 700 lines. Any advice on getting it recognized?
Comments
Probably a lot of your program is occupied by the font information. You can easily store tables in another slot by creating a separate program consisting of just DATA statements and reading them using READ statements. That's how I'd store the font information.
A: 'Capital letter A
FOR Anyword = 1 TO 75
HIGH 1 'Column 1
HIGH 2
HIGH 3
HIGH 4
LOW 6
LOW 12
GOSUB CLOCK
PAUSE 1
LOW 1
LOW 2
LOW 4
HIGH 12 'Column 2
HIGH 5
HIGH 6
LOW 11
GOSUB CLOCK
PAUSE 1
LOW 5
LOW 6
HIGH 11
HIGH 7 'Column 3
LOW 10
GOSUB CLOCK
PAUSE 1
LOW 3
LOW 7
HIGH 10
HIGH 3 'Column 4
HIGH 5
HIGH 6
LOW 9
GOSUB CLOCK
PAUSE 1
LOW 3
LOW 5
LOW 6
HIGH 9
HIGH 1 'Column 5
HIGH 2
HIGH 3
HIGH 4
LOW 6
LOW 8
GOSUB CLOCK
PAUSE 1
LOW 1
LOW 2
LOW 3
LOW 4
HIGH 8
NEXT
RETURN
How would I make this more efficient?
Anyword is my variable.
http://www.parallax.com/Portals/0/Downloads/docs/cols/nv/vol3/col/nv87.pdf
It took me a bit of time to understand it, but works well once you get the knack. You break your program into tasks and use the scratch pad area to store the destination task and the return task, as well as save variables if you need to. RAM is shared so if you use the same variables between banks you can pass argument easily as well. Here's some example code I wrote two years ago:
MashUp_Sensors.BSE
MashUp_Main.BSE
Some of the Basic Stamps allow reading and writing cross bank which really helps since code and data don't share the same bank. The BS2e doesn't so I don't have experience using that feature.
At the moment, the status of my project is unclear, as I may be replacing the current display with a more complex one with a higher resolution. However, I didn't understand the memory storage of the stamps before you helped. Thanks.