Shop OBEX P1 Docs P2 Docs Learn Events
How can you increase the memory size!?? — Parallax Forums

How can you increase the memory size!??

gr8_big_geekgr8_big_geek Posts: 34
edited 2009-08-27 02:41 in BASIC Stamp
I am trying to program my microcontroller to work a number of servos
for quite a few commands (I'm at 24 commands now). My program file is
only 8kb in size and my memory is choking if I add another command!?
Is there a way to increase the memory or add some more? Is there
another microcontroller I should be looking at?

I need to increase by at least 3 times this amount.

How can I increase my memory?

Anything you can provide on this would be most useful! Thanks~

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-08-27 02:41
    What microcontroller are you using? Very often your program will shrink significantly if you apply some optimizations. There are probably a lot of common actions that can be moved to subroutines. Often there is a lot of debugging stuff (particularly messages) that can be made more concise. If you're using a BS2, you can gain program space by switching to something like a BS2p. The Stamps have a limit of 2K for the compiled byte codes, but there are multiple "banks" of 2K (8 in the BS2p) that can transfer control to one another sort of like overlays. You can also switch to using something like the Propeller which has 32K of storage for its program (and variables). There's a SpinStamp which is a Propeller in a 24-pin Stamp style module that's mostly compatible with various Stamp boards as long as you adjust things for 3.3V logic levels rather than the 5V logic used by the Stamps. Often it just takes adding a 1K series resistor to the I/O connections. You can directly connect most servos to a Propeller I/O pin, but the 1K series resistor is better since it reduces noise from the servo motor fed back through the control lead.

    Post Edited (Mike Green) : 8/27/2009 2:47:06 AM GMT
Sign In or Register to comment.