I have a lot of constant data, and the total size is almost 200K. 8-bank will be used. However, I remember that a function can only use the constant data in the same bank. Is it right? and If it is true, how should I deal with such a large constant? Thanks a lot
If access speed is not an issue, you could use serial flash ROM, say from Atmel or ST: http://atmel.com/products/SFlash/ http://www.st.com/stonline/products/families/memories/fl_ser/sf_code.htm - mike
The constan data can be stored into code area, why should I access an external ROM? Suppose my bankarea has 52K Code Byte xx[50000]={….} Constant "xx" occupy a bank. Could I access "xx" from another bank?
"The constan data can be stored into code area" Can you configure it so that the constants are still in your on-chip Flash, but mapped to XDATA?
You haven't said what chip you're using.
possibly consider changing to a CPU that does not used paged memory... thus there is no problem... mitsubitshi have a good range of CPU's in the M16C/62 family that have upto 384K on board flash with 32K onboard RAM... their memory maps are contiginous 1mb of address space... thus 200K is no problems !!
possibly consider changing to a CPU that does not used paged memory If you want to stay in the '51s there is Philips MX and 669. I believe Maxim has an offering too. Erik
Thanks! The chip we are using is Winbond w78c438c. can it work?
Take a look to the folder: Keil\c51\Examples\FarMemory\1MB Constants on Classic 8051. It shows an example on how to do that.