??? 10/21/07 06:24 Read: times |
#145968 - A little tidy-up Responding to: ???'s previous message |
RAM is what I don't recommend you use as code memory. But how do you suggest that the OP achieves his goal of loading code from an external store without using RAM?? Mike Stegmaier said:
when the system is completely off, the RAM will reset, and the data at each address of the RAM will contain the same value rather than your code. The RAM doesn't actually perform a tidy reset; its content becomes undefined - that is, each and every location could contain a completely different, random value. The reason why ROM (EEPROM or flash ROM recommended) is used over RAM is because it stores information alot better. It's not that the storage is "better", it's that ROM is non-volatile - ie, the stored data is not lost when power is removed. The OP is wanting to use a MMC as his non-volatile store for code. The code can't be executed directly from the MMC, so it needs to be copied into RAM for execution - rather like a PC loads code from disk into RAM for execution. EEPROM is far better than ROM since you can store information to it many times. Again, that may not constitute "better" in some situations: If you don't need reprogrammability, then ROM is "better"; If it's important that the memory cannot be rewritten - whether accidentally or maliciously - then ROM is "better". You might want to open up the case of your computer and look at some chips. One of them will be a variant of a ROM. If you take it out of your computer, then the computer cannot start.
This does seem to be the part that the OP has omitted to consider - he wants to load code from an external source, and this will, at least, require something somewhere to get the process started. |