Is it possible to put all my program to external 24LC256 SERIAL I2C EEPROM??

lestroso

New Member
Hi, I'm sorry if it possible to ever again discuss this thing....but is very important for me.....


Is it possible to put all my program to external 24LC256 SERIAL I2C EEPROM??

If yes...Can you Give me some example of software??

Because i have used 3/4 of memory with my 18m2 in no time...yes because memory full up very easily....

I have saw in the forum that is the features to store data to 24LC256 SERIAL I2C EEPROM, but store all program and start from external memory?? thanks a lot!!!

I thank you in advance , best regards, Lestroso.
 

nick12ab

Senior Member
The booti2c and run commands are used for handling of programs in external EEPROMs and these commands are only supported on X2 parts so no, you can't do it with an 18M2. You'd need to upgrade to an X2 part.
 

hippy

Technical Support
Staff member
@ Lestroso : Why is program memory filling up so rapidly ? This may be a result of how the program is designed and there may be other ways to reduce the memory requirements.
 

lestroso

New Member
I thank you very much to everybody..

.but i saw in the manual that i must dedicate the i2C bus for only reading from my external memory....

and i can't use for other use... is it right??n or not,...

the manual says to use slot and run commands...but you say me to use booti2c..and run ok..but how i can put all my code in memory?? can you make some

example????please.... because i have about finished my job with logicator and there's no memory...... and also there's no problem to buy x2 chip but i saw i must buy at least 20x2 chip

because i din't see the 18x2 part.... and in my application i have used a 18m2...

thanks a lot again ...lestroso
 

Grogster

Senior Member
I tto would be interested to see how you have managed to max out the memory of the chip you are using.

Generally speaking, with careful code development, it takes quite a complicated program to fill the memory on the M2 or X2 parts.

If you swap the 18M2 for the 20X2 you will gain another 2048 bytes of memory, as the M2 series chips have 2048 bytes of memory, and the X2 series of chips have 4096 bytes of memory. Simply upgrading to the X2 part should give you the reserve memory you need. :)

Does your program have a lot of text messaging going on by any chance?
Text messages for LCD's etc will gobble up lots of program space.

On my latest creation, I put all the text messages and prompts into an EEPROM, and just read the messages out when you need them. Something like a 24LC64 will give you 8KB of space for text messages or other data, and reading that data out of the EEPROM and plopping it on the LCD(or other) is as simple as a DO UNTIL loop with an EEPROM page boundary or an end-of-message byte.
 

AMPERAGE

New Member
I tto would be interested to see how you have managed to max out the memory of the chip you are using.

Generally speaking, with careful code development, it takes quite a complicated program to fill the memory on the M2 or X2 parts.
Sorry to thread hijack but this lack of program space on an M2 chip is problem I'm facing right now as well. For me it basically boils down to a large amount of serout commands - the setup I have is running both wireless communications with XBee modules and a graphical LCD screen.

Grogster said:
Text messages for LCD's etc will gobble up lots of program space.

On my latest creation, I put all the text messages and prompts into an EEPROM, and just read the messages out when you need them. Something like a 24LC64 will give you 8KB of space for text messages or other data, and reading that data out of the EEPROM and plopping it on the LCD(or other) is as simple as a DO UNTIL loop with an EEPROM page boundary or an end-of-message byte.
This is exactly what I have done as one option for buying myself more space on the PICAXE, however I'm still strapped for space. I'll be watching this thread closely as I'm open to pretty much any suggestion on how I may get more space for my PICAXE without having to change to a 28X / 40X part.
 

Grogster

Senior Member
I know you already mention you don't want to change chips, but there are only two little IC legs difference between the 18M2 and the 20X2 with twice the memory space, which should also give YOU plenty of room to move. ;)

Can you not move to a 20X2 as you have already built the PCB, I suppose?
 

lestroso

New Member
i thank you again...but yes..

.i use a lot of text messagging to display....

i'm making a new keyboard sound...

.but i need at least 80k of memory....logicator is the best program ever invented but i think to move to cubloc chips, because i have already it in house....but the picaxe is very beauty....

but has very low memory...for me.....if there 's a way to increas ememory program without use the x2 chip picaxe wold be great...but at this time i think doe's exist a solution....

but i have understood that there was only 4 slot in the256k eeprom.....with 1000 lines of code each....and recall it after with booti2c and run command..... but in every way ,,,, can someone make an example to use an external memory with code??? please???

thanks a lot....lestroso:eek:
 

AMPERAGE

New Member
I know you already mention you don't want to change chips, but there are only two little IC legs difference between the 18M2 and the 20X2 with twice the memory space, which should also give YOU plenty of room to move. ;)

Can you not move to a 20X2 as you have already built the PCB, I suppose?
I'm using a number of AXE210 boards as the project requires wireless comms with other units and these of course are designed to take an 18M2 micro. Although I can create my own boards to accommodate both a wireless module and 20X or 28X, I'd rather not etch my own in this case as there is a need to have a highly neat and presentable end product. Alternatively, designing the boards myself and having them made professionally will take time, cost more and have a lead time.

I have spent a great deal of time optimising the code I have which includes a number of sacrifices to the overall program in favour of buying myself space. I'd estimate that unoptimised and uncompromised my program would have exceeded 7,000 bytes, almost 3,000 of which is comprised of text strings which are now stored on the LCD's EEPROM. It is by far the largest program I've ever written for a PICAXE.

Admittedly, 4096 bytes of memory on the 20X would certainly pull me out of hot water but right now I'm considering it to be a very last case option. If it comes down to it I may make a custom shield to allow the AXE210 to take a 20X, leave two pins disconnected and use the chip purely for its additional memory space.
 

westaust55

Moderator
For me it basically boils down to a large amount of serout commands - the setup I have is running both wireless communications with XBee modules and a graphical LCD screen.
Some more specific detail and your program listing might be helpful.
Are the SEROUT commands all sending different data stored in different variables?
Are there lots of text strings?

If there is a lot of common formatting of data then you might be able to use subroutines and pass some data from various variables to a common variable ready for the SEROUT command.
If there are a lot of different text strings, can these be saved in the external EEPROM and keep the program entirely within the PICAXE.

Hard for folks here to help much without seeing your code.
 

Grogster

Senior Member
If there are a lot of different text strings, can these be saved in the external EEPROM and keep the program entirely within the PICAXE.
Yes, this is exactly my method too - keep the code on the PICAXE, and ALL text(even promtps for the LCD) in the EEPROM - there is plenty of space there, and with I2Cfast, you would not see any speed difference.

IN my case, and to help my brain, I comment all the text and their addresses at the top of the code - lots of lines of addresses and text, but at least you can see at a glance where things are in the EEPROM chip. :p

2x 24LC512 EEPROM chips will give you 128KB of message storage(64KB per chip), easily satifying your 70KB requirement, and leaving plenty of space for more later.
 

john2051

New Member
Hi, sorry to butt in,

Can the x2 picaxes actually run the code from the external eeprom, or do they copy it into internal eeprom

thanks.
john
 

hippy

Technical Support
Staff member
Can the x2 picaxes actually run the code from the external eeprom, or do they copy it into internal eeprom
The code actually runs from external eeprom. The BOOTI2C command copies a program slot from external memory into the PICAXE itself if required.
 

oracacle

Senior Member
the other up side is the x2 also have 4 programme slots. if done correctly you could in theory make all 4 slots run as single programme essentially giving you 4x4096. the slot share the variables. i dont think this is true when using an external eeprom as a slot, variable are shared between on-chip slot but i2c if i am not mistaken.
 

hippy

Technical Support
Staff member
All variables are shared between all slots, whether internal or external.
 

lestroso

New Member
I thank you too much to everyone....but i can't post my code because i have used logicator....i 'm thinking to starting to use my cubloc 220.. but this chip is not beauty like the

picaxe...the cubloc 220 have 1 serial port and 16 I/O ,i2c port ....but in true i have also a 20m2 and 40m2 too.... ok i'll try with them...before change my project.......Or what do

you think if i use only the basic picaxe dev tool ...not logicator??? can i reduce my memory??? i thank you a lot again... lestroso
 

nick12ab

Senior Member
I thank you too much to everyone....but i can't post my code because i have used logicator....
Yes you can- post it as an attachment. Press 'Go Advanced' when writing your reply to open a more advanced editor then click the paperclip toolbar button.

you think if i use only the basic picaxe dev tool ...not logicator??? can i reduce my memory??? i thank you a lot again... lestroso
Very likely, yes. Logicator tends to write inefficient spaghetti code and uses certain memory hogging command when there are better ways, as well as restricting access to EEPROM, TABLE and variables. The best thing to dowould be to write your code from scratch rather than attempt to fine tune Logicator's effort as that will produce the best result.
 
Top