Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
LinkBack Thread Tools Display Modes
Old 15th March 2005, 05:51 AM   (permalink)
Default Expanding a PIC Program memory

Hello, I was wondering how would you go about expanding a pic program memory. For example, I have a HUGE program and it doesn't fit on a 16F877A. How do I got about getting the PIC to run off an external EPROM?
CoTang is offline  
Old 15th March 2005, 06:18 AM   (permalink)
Default

An PIC can run programes only in its own memory (even an CPU in an PC has to copy programes in its own memory befoe it can preform them)
__________________
Il give you shocking experience.
Someone Electro is offline  
Old 15th March 2005, 07:02 AM   (permalink)
Default

So basically what i have to do is store the program in an external EEPROM and have the PIC load sections of the code into itself, excute the program then delete it then copy another section and excute and so forth and so forth?
CoTang is offline  
Old 15th March 2005, 07:55 AM   (permalink)
Default

oOo - 'could' work.

But will be a bummar to make and a pain to program around.

Why not upgrade to a 18F? what language u program in?
pittuck is offline  
Old 15th March 2005, 08:56 AM   (permalink)
Default

Quote:
Originally Posted by CoTang
So basically what i have to do is store the program in an external EEPROM and have the PIC load sections of the code into itself, excute the program then delete it then copy another section and excute and so forth and so forth?
You can't do that on a PIC 16F877, you CAN execute bootloader code, so you could possibly reprogram the 877 from a program stored in externla EEPROM - but it would be very slow and clumsy.

I suggest you need to go back to first principles!, WHY is your program so large? - what is it written in?. Change the language for something more sensible?, or rewrite your program to be more space efficient?.

Or, as suggested, change to a larger device?.

8K is a huge amount of memory for a device like a PIC, it would take some filling!.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 15th March 2005, 09:06 AM   (permalink)
Default Re: Expanding a PIC Program memory

Quote:
Originally Posted by CoTang
Hello, I was wondering how would you go about expanding a pic program memory. For example, I have a HUGE program and it doesn't fit on a 16F877A. How do I got about getting the PIC to run off an external EPROM?
You should now consider upgrading to a PIC18F452. This chip is pinout compatible to the PIC16F877A and has double the program capacity. Program migration at the assembly language level is relatively easy.
__________________
"Having to do with Motion Control"
motion is offline  
Old 15th March 2005, 01:42 PM   (permalink)
Default

Well, I work in the electronic industry for 5 years now (just gaining exp.) and there were custom "Microcontroller" boards that the company design for there own use and each one had one or two external EPROM (range from 256K-512K) that the program was stored in. Although those weren't PIC's, I thought there might be a way to expand the PICs Program memory. I guess those CPU (Intel, Motorola) requires external EPROM for their program. Or maybe I'm mistken. :?
CoTang is offline  
Old 15th March 2005, 01:48 PM   (permalink)
Default

Quote:
Originally Posted by CoTang
Well, I work in the electronic industry for 5 years now (just gaining exp.) and there were custom "Microcontroller" boards that the company design for there own use and each one had one or two external EPROM (range from 256K-512K) that the program was stored in. Although those weren't PIC's, I thought there might be a way to expand the PICs Program memory. I guess those CPU (Intel, Motorola) requires external EPROM for their program. Or maybe I'm mistken. :?
The small size of a PIC rather gives it away, there isn't the pin space for external memory - that's more a microprocessor facility than a micro-controller one. The whole point of a PIC is that it's small, and doesn't require many external components.

As I asked before, wny are you using so much memory?.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 15th March 2005, 06:03 PM   (permalink)
Default

No CPUs have there own memory for programes.the external RAM is for the variables.It on the chip for the reson to run faster

I some PICs you can use the program memory to store data (insted of the small internal EEPROM)if the pocesor has reed/write acses to the memory (it can write the program or some data in the program memory by it self )

the only difrence by an CPU and an PIC is that the CPU dosent have an EEPROM and internal RAM (they also need a lot more external components)
__________________
Il give you shocking experience.
Someone Electro is offline  
Old 15th March 2005, 07:01 PM   (permalink)
Default

ah... ok. Oh yeah, that was a what "if" situtation. Sorry about that. It was late when I typed it.
CoTang is offline  
Old 6th April 2005, 02:34 PM   (permalink)
Default

Hi,

If not all I/O ports are occupied, ther may be an alternative.
Increase the number of PIC's in your design, and let each PIC, monitored and controlled by "the main" PIC carry out sub tasks.

Bye,

JWB
jwb is offline  
Old 6th April 2005, 07:31 PM   (permalink)
Default

:shock: You can not expand the program memory (code/data mem) of pics 12xx 14xx or 16xxx or 18xxx BUT with the 17xxx YOU CAN !!!!

:idea: You can use 17Cxxx Microchip PICs ... they can work in microcontroller mode (like other pics) or in µprocessor mode where you can execute your code from an external eprom/eeprom or static ram.
bluex_scf is offline  
Old 6th April 2005, 08:07 PM   (permalink)
Default

I think they have ROM less PICs too that dont even have program memory.These things are considerd to be realy slow.
__________________
Il give you shocking experience.
Someone Electro is offline  
Old 7th April 2005, 12:01 AM   (permalink)
Default

I'm just to lassie to read all this comment's, so if someone already give your answer than ignore mine.

If you need to store a large amount of "TEXT" in your code for LCD/Serial message than you should move your "TEXT" to a external EEPROM !
I2C only use up 2-3 I/O line and you can share whit other devices.
32/64k add on to your project is great.

For example :

1;If you click on Add an Attachment, you will see the box for adding 2;Attachments.
3;If you click on Posted Attachments, you will see a list of already 4;attached Files and you are able to edit them.


If you wan to display line 3 and 4 than you read your EEPROM location from where is line three start from and keep reading until you reach the end of line 4. "read from 0x4E to 0x68"

For common words like "Yes", "No", "Exit", "Menu" and 100's more what you might use in your program, just keep referring to the same location every time you need to use them.

If your code large because of the size of your program, than maybe you should look for a more efficient Compiler !

8kbyte is a lot of codespace !

Good luck.
STEVE
csaba911 is offline  
Old 7th April 2005, 02:01 PM   (permalink)
Default

Quote:
Originally Posted by bluex_scf
:shock: You can not expand the program memory (code/data mem) of pics 12xx 14xx or 16xxx or 18xxx BUT with the 17xxx YOU CAN !!!!

:idea: You can use 17Cxxx Microchip PICs ... they can work in microcontroller mode (like other pics) or in µprocessor mode where you can execute your code from an external eprom/eeprom or static ram.
Hey that cool! I didn't know that. You can expand your code memory up to 64K. So anyone got a tutorial on how to set that up? Thanks again
CoTang is offline  
Reply

Bookmarks

Thread Tools
Display Modes





All times are GMT. The time now is 04:05 AM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker