Calphool Posted November 29, 2010 Report Share Posted November 29, 2010 Hello, I've been working on a Midi2CV project that I'm using to control the minimoog model d clone I built. I've basically run out of flash on my PIC and I'm at the point where I'm (dangerously) sharing variables in order to keep code size down. I'm wondering, is there some way that I can compile my code so that I put some of it on my bankstick and overlay it into flash at run time? I'm too cheap to switch to the newer 32 bit hardware. Has anybody tried this? Is any kind of interrupt invoked if you try to write beyond the end of your flash memory? If so, would it be possible to build some kind of bankstick code memory manager? Thoughts? Joe R. Quote Link to comment Share on other sites More sharing options...
Duggle Posted November 29, 2010 Report Share Posted November 29, 2010 Depending on what you mean by "sharing" variables, but one way to do save memory for temporary variables is to declare them within the scope of the function where they're used. This way they are generated from the C stack each time the routine is called and the stack space get used and reused over and over very efficiently (and is good coding style). Updating the flash program from eeprom (presumably frequently ) is likely to wear out the flash memory of the PIC. Its also nontrivial to code, unsupported, and I suspect, putting a huge hurdle between you and your desired project outcome :-( My suggestion is to get a job and go 32bit! ;-) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.