+ Post New Thread
Results 1 to 7 of 7
  1. #1
    Member level 5
    Points: 1,571, Level: 9

    Join Date
    Aug 2007
    Location
    san juan
    Posts
    81
    Helped
    2 / 2
    Points
    1,571
    Level
    9

    8051 built in memory and external memory

    is it alright to use an external memory and the flash memory of an 8051 based microcontroller at the same time?

    •   Alt22nd January 2008, 07:27

      advertising

        
       

  2. #2
    Full Member level 3
    Points: 2,238, Level: 10

    Join Date
    Dec 2007
    Location
    Chennai-India
    Posts
    169
    Helped
    24 / 24
    Points
    2,238
    Level
    10

    Re: 8051 built in memory and external memory

    hi,

    what for is the External memory is used.Data or Code?



  3. #3
    Member level 4
    Points: 2,037, Level: 10

    Join Date
    Jul 2007
    Location
    Belgium
    Posts
    73
    Helped
    18 / 18
    Points
    2,037
    Level
    10

    Re: 8051 built in memory and external memory

    Code in flash and data in external memory should be ok as long as you respect timing and hardware layout.
    Check what the datasheet has to say about it.



    •   Alt22nd January 2008, 12:22

      advertising

        
       

  4. #4
    Banned
    Points: 8,931, Level: 22

    Join Date
    Jan 2007
    Posts
    943
    Helped
    177 / 177
    Points
    8,931
    Level
    22

    Re: 8051 built in memory and external memory

    Hi,
    You can use external memory along with internal memory. External memory may be used for holding programs or data. 8051 has two banks of 64K each of external address space for program and data memory.
    For reading of external Prg.Mem, you use PSEN signal. For Rd/Wr of external data memory you use RD/WR signal lines. Address lines are commonly used.
    When you have only internal prog.memory or,both internal and external program memory, you make EA- pin high. In this case the chip will only access the external memory by outputting PSEN, only when the program branches to an address higher than that of internal memory. For a system with only external memory, you make EA- line always low.
    As far as fixed data is concerned, you can keep it in the code memory, internally or externally and access it using MOVC instruction. Remember, externally, MOVC only generates PSEN signal and MOVX, the RD/WR signals.
    If you use an ORed signal of PSEN+RD and connect to the OE- signal of an external Read/Writeable memory, you can have a system with on-the-fly program loading facility.
    Regards,
    Laktronics



  5. #5
    Full Member level 1
    Points: 2,100, Level: 10
    Achievements:
    7 years registered

    Join Date
    Aug 2008
    Posts
    97
    Helped
    8 / 8
    Points
    2,100
    Level
    10

    Re: 8051 built in memory and external memory

    Yes possible.

    Actually the internal memory of 8051 is 4k ROM and 128 Bytes RAM.
    But you can also use ROM and RAM both or any one externally, the locations of the external RAM or ROM are accessed by DPTR (Data Pointing Register). DPTR is a special function register (SFR).

    Good Luck



  6. #6
    Advanced Member level 1
    Points: 5,871, Level: 18

    Join Date
    Dec 2005
    Posts
    466
    Helped
    27 / 27
    Points
    5,871
    Level
    18

    Re: 8051 built in memory and external memory

    Quote Originally Posted by ronzam2002
    is it alright to use an external memory and the flash memory of an 8051 based microcontroller at the same time?
    on the 8051 basic, you can but some 8051 derivative dont support movx...and also 8051 families has lot of derivative, i suggest choose the on chip..it s much easier



    •   Alt28th January 2009, 04:37

      advertising

        
       

  7. #7
    Member level 5
    Points: 2,530, Level: 11

    Join Date
    Mar 2002
    Posts
    80
    Helped
    3 / 3
    Points
    2,530
    Level
    11

    Re: 8051 built in memory and external memory

    It is possible. If the code address is beuond the internal flash memory, 8051 will fetch the code from external memory.



--[[ ]]--