Hi Christian,
yes, it’s correct, that code cannot be fetched from an external memory. The PIC doesn’t provide a generic parallel interface anyhow, so that your software has to handle external bus accesses via the GPIO pins in the same way like it accesses the interface of the LCD. This costs time, but in most cases it’s fast enough. For you MIDI controller project, the CPU load will be very relaxed anyhow when I compare it to applications like the MIDIbox SID (as an example), therefore you could even use a serial flash or EEPROM, it will still be fast enough.
Short calculation: assumed that you are planning to use a graphical 240x64 LCD (too bad, that you didn’t mention the display you are planning to use, it would simplify my answer). The whole display consists of 15360 pixels, makes 1920 bytes. Assumed, that you are fetching the graphical data from a serial EEPROM (like my beloved “BankSticks”), it would take ca. 30 uS * 1920 = ca. 60 mS to write the whole screen. This is fast enough, because I don’t think that you want to playback a movie?
And even if latency does matter, you could split the display update into several parts (preemptive multitasking), so that on each “mainloop” only one or two lines are updated. By doing so, you would achieve an overall latency which is still less than 1 mS
If you are planning to use a character LCD, then you don’t need to consider such things…
Even when you are writing the application in C, it doesn’t matter, that (for example) the PIC18F452 doesn’t provide enough code memory for your project. Because by using clever data structures, you don’t need so much code anyhow.
Menu structures, character strings, MIDI events and streams, parameter values or whatever can be easily saved in (and accessed from) an external non-volatile memory. The program itself only needs to know, where the informations are located (even such infos could be saved in the ext. tables).
Sending different MIDI events depending on the menu just only means, duplicating the external data tables…
Such methods have also another advantage: by using a socket for the external memory (like the “BankStick”), you could allow the user to switch between different setups (it doesn’t matter, how many synths are part of the setup), or to make backups, or whatever. It’s also easily expandable by multiple memory devices.
Best Regards, Thorsten.