View previous topic :: View next topic |
Author |
Message |
otavio_fisica
Joined: 20 Jul 2006 Posts: 29
|
External program memory |
Posted: Sun Mar 22, 2009 9:38 am |
|
|
Hi everybody.
I have a problem. I need to include more code on my PIC 18F4550, however, its program memory is already in its maximum. Does somebody know if it's possible to use an external flash memory as program memory?
Does somebody have any tip about that?
Thanks in advance. |
|
|
dyeatman
Joined: 06 Sep 2003 Posts: 1933 Location: Norman, OK
|
|
Posted: Sun Mar 22, 2009 10:18 am |
|
|
Why not just move up the the 18F4525 with 50% more program space? It seems for $8-$9 it is overall much cheaper in effort and time than adding external memory to what you have. |
|
|
otavio_fisica
Joined: 20 Jul 2006 Posts: 29
|
|
Posted: Sun Mar 22, 2009 1:35 pm |
|
|
It's because I need the USB function. So, I have two options: I use an external USB chip such as FTDI or I use an external program memory. Do you have some ideia of which would be the easiest option? |
|
|
FvM
Joined: 27 Aug 2008 Posts: 2337 Location: Germany
|
|
Posted: Sun Mar 22, 2009 1:48 pm |
|
|
There are much more PIC18 USB controllers with up to 128k flash memory. PIC87J50 has even an external program memory capability up to 2MByte, but the latter isn't currently supported by CCS C as far as I know. |
|
|
otavio_fisica
Joined: 20 Jul 2006 Posts: 29
|
|
Posted: Mon Mar 23, 2009 10:49 am |
|
|
Well, I need a chip which is compatible with the PIC18F4550 so as I can substitute it in my project without having to change the whole project.
Isn't it possible to use an external memory chip as program memory for the PIC18F4550. |
|
|
Ttelmah Guest
|
|
Posted: Mon Mar 23, 2009 11:11 am |
|
|
Seriously, even with a chip that can use external memory, you are not going to be able to substitute it without massive board changes. To be used as program memory, the memory needs to be parallel addressed. Using several pins on the PIC to do this....
There is however a possibilty. You might want to consider rewriting your code to use a machine interpreter. Effectively your own crude 'language'. This is how devices lke the PIC Basic interpreters work. The main chip, is running code to perform the I/O tasks, timing etc.. This then reads an external memory, and calls routines in this main code, according to the numbers it finds here.
I'm afraid this will probably be more work, than simply redesigning the board to take a larger chip....
One possibility, would be to make your own 'carrier' board to take say the 24F46J50, and fit it into the socket for the 18F4550.
Best Wishes |
|
|
FvM
Joined: 27 Aug 2008 Posts: 2337 Location: Germany
|
|
Posted: Mon Mar 23, 2009 11:17 am |
|
|
It's not possible with most PIC devices, particularly with 18F4550. I thought this had been evident from what's been said before. There's only one USB PIC that's halfway hardware compatible to 18F4550, that's 18F46J50. Check if can do anything for you. |
|
|
dyeatman
Joined: 06 Sep 2003 Posts: 1933 Location: Norman, OK
|
|
Posted: Mon Mar 23, 2009 3:46 pm |
|
|
Based on a little research it would appear the best approach would be an
external USB which would give you much more flexibility in which PIC to use
that would also fit in the same socket (less board modification). |
|
|
|