Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/08/05 14:01
Read: times


 
#84572 - There are so many options...
Responding to: ???'s previous message
You can do it as you described. Connect SRAM data and address buses as usual, /CS to address decoder (or GND, if this is the only external parallel device), /OE to /PSEN and /WE to /WR (/PSEN and /WR are signals of '51). Thus, for writing MOVX can be used, while reading can be accomplished using MOVC (and code can be run from it, of course). Be careful with the timing, which is more restrictive for external code memory than data memory (check the PSEN-related timing diagrams in datasheets).
The reset should involve also switching of a flip/flop driving the EA pin. And don't forget, that at certain protection level (security fuse programmed), external code execution is disabled!
Also, for similar approach check out
http://www.bezstarosti.cz/jungle/sc...ofreny.htm
although not in english, I think you will understand it.

However, there are also other options worth considering:
- you don't need "resetting"and remapping your code; you can have your external code memory (SRAM) mapped above the internal code memory and run it from there; after loading the code you simply jump to the external code.
- there are nonvolatile parallel memories,using which you don't need the serial eeprom and the "booting" from it - and also you don't need the "boot code" and internal code memory and reset/switchover mechanism at all, storing the "upgrader" in the same memory. External parallel FLASH memory is one such option, as Andy already pointed out; however, programming algorithms for different manufacturers' FLASH are not the same so for mass production you will need to stick to a particular brand. But you can also use a battery-backuped SRAM, either discrete battery+SRAM(+diode), or packed in one package - e.g.Dallas is producing such stuff, incorporating also a RTC. There are also SRAM-like, but nonvolatile memories, either using a ferroelectric memory cell (Ramtron - beware, needs clocked /CS) or having a background FLASH, where the contents of RAM is automatically written on power-down (see ZMD).

- the best you can use is a mcu capable of rewriting its own internal program FLASH - e.g. the RD2 - variety of '51 - the easiest to use is Atmel AT 89C51RD2 (or ED2 foe extra EEPROM), or alternatively also Philips P89V51RD2 can be used.

Jan Waclawek

List of 19 messages in thread
TopicAuthorDate
Use SRAM as code memory.            01/01/70 00:00      
   Yes, but            01/01/70 00:00      
      thanks for answer            01/01/70 00:00      
         ibid            01/01/70 00:00      
         There are so many options...            01/01/70 00:00      
            Answer partially wrong: Can't Write CODE            01/01/70 00:00      
               No need for switching            01/01/70 00:00      
                  Oh yes...            01/01/70 00:00      
                     Take care - wherewer your code is :-)            01/01/70 00:00      
                        Once again thanks            01/01/70 00:00      
                        Self-modifying code            01/01/70 00:00      
                           Self-modifying code - good or bad            01/01/70 00:00      
                              Self-modifying code            01/01/70 00:00      
   90:10 rule            01/01/70 00:00      
   In System Programming Application Note            01/01/70 00:00      
      In-System v. In-Application Programming            01/01/70 00:00      
         IAP v ISP            01/01/70 00:00      
            Philips IAP            01/01/70 00:00      
               It's easier with Atmel            01/01/70 00:00      

Back to Subject List