FMUSER Wirless Transmit Video And Audio More Easier !

[email protected] WhatsApp +8618078869184
Language

    How to divide the 51 microcontroller RAM

     

    When introducing the microcontroller resources, we mentioned that the STC89C52 has a total of 512 bytes of RAM, which is used to save data. For example, the variables we define are directly in the RAM. However, the 512-byte RAM of the microcontroller is not equally equally, but the block and block are different from physical structures and usage, so we are in use, Pay attention to some problems. 51 Single-chip RAM is divided into two parts, one is RAM in the film, one is the outer RAM. The standard 51's in-chip RAM address has a total of 128 bytes from 0x00h ~ 0x7f, and now we use the 51 series of microcontrollers that are RAMs in the expansion, that is, RAM is from 0x00 ~ 0xFF a total of 256 bytes. The outer RAM maximum can be extended to 0x0000 ~ 0xffff Total 64K bytes. Here is that everyone should understand that the address of the in-chip RAM and the outer RAM is not connected, and the inner is starting from 0x00, and the film is starting from 0x0000. There is also a little, the two nouns from the on-chip, from the early 51 single-chip microcomputer, refer to the interior of the chip and the chip, but now almost all 51 single-chip chips are integrated outside RAM, and true The chip extension is rarely used, although it is also called the film outside RAM, but in fact it is now inside the microcontroller chip, our STC89C52 is like this. The following is a keyword in several Keil C51 languages, which represents the division of different regions of the RAM, and let me notep it. DATA: On-chip RAM from 0x00 ~ 0x7f IDATA: On-chip RAM from 0x00 ~ 0xFF PDATA: Outer RAM from 0x00 ~ 0xFF XDATA: The outer RAM from 0x0000 ~ 0xFFFF You can see that DATA is part of the iData, and PDATA is part of XDATA. Why don't you distinguish this? Because the RAM blocking method is mainly related to the assembly instruction, this piece of content can be found, just remember how to access the speed faster. We define a variable A, which can: unsigned char data a = 0, and there is no Data this keyword when we define variables before we define variables, because DATA can be omitted under the KEIL default setting, that is, nothing Time variables are defined in the DATA area. Data Region RAM Access is used in assembly language, the execution speed is the fastest. If you define it into iData, it can also access the Data area, but also access the range of 0x80H ~ 0xFF, but after adding the IDATA keyword, 51 single-chip microcomputer is used in indirect addressing, the speed is slower than the speed. And we usually don't want to access 0x80H ~ 0xFF in most cases, because this block is usually used to interrupt and function calls, so in most cases, when we use internal RAM, you can use only DATA NS. For external RAM, the variables defined using PDATA exist within the address range of the external RAM 0x00 ~ 0xFF, the access and IDATA of this address is similar, which is indirectly addressed with universal registers, and if you define xData, you can Access range is wider, from 0 to 64K address, it can be accessed, but it needs to use 2 byte registers DPTRH and DPTRL to make indirect addressing, the speed is the slowest. Our STC89C52 has a total of 512 bytes of RAM, divided into 256-bytes of internal RAM and 256 bytes of micro-outer RAM. Under normal circumstances, we use the Data area, DATA is not enough, we use xData, if you want the program execution efficiency, use the PDATA keyword to define. Other models have a larger RAM's 51-series microcontroller. If you want to use larger RAM, you must have access to XDATA. Editor of responsibility; ZL, reading

     

     

     

     

    List all Question

    Nickname

    Email

    Questions

    Our other product:

    Professional FM Radio Station Equipment Package

     



     

    Hotel IPTV Solution

     


      Enter email  to get a surprise

      fmuser.org

      es.fmuser.org
      it.fmuser.org
      fr.fmuser.org
      de.fmuser.org
      af.fmuser.org ->Afrikaans
      sq.fmuser.org ->Albanian
      ar.fmuser.org ->Arabic
      hy.fmuser.org ->Armenian
      az.fmuser.org ->Azerbaijani
      eu.fmuser.org ->Basque
      be.fmuser.org ->Belarusian
      bg.fmuser.org ->Bulgarian
      ca.fmuser.org ->Catalan
      zh-CN.fmuser.org ->Chinese (Simplified)
      zh-TW.fmuser.org ->Chinese (Traditional)
      hr.fmuser.org ->Croatian
      cs.fmuser.org ->Czech
      da.fmuser.org ->Danish
      nl.fmuser.org ->Dutch
      et.fmuser.org ->Estonian
      tl.fmuser.org ->Filipino
      fi.fmuser.org ->Finnish
      fr.fmuser.org ->French
      gl.fmuser.org ->Galician
      ka.fmuser.org ->Georgian
      de.fmuser.org ->German
      el.fmuser.org ->Greek
      ht.fmuser.org ->Haitian Creole
      iw.fmuser.org ->Hebrew
      hi.fmuser.org ->Hindi
      hu.fmuser.org ->Hungarian
      is.fmuser.org ->Icelandic
      id.fmuser.org ->Indonesian
      ga.fmuser.org ->Irish
      it.fmuser.org ->Italian
      ja.fmuser.org ->Japanese
      ko.fmuser.org ->Korean
      lv.fmuser.org ->Latvian
      lt.fmuser.org ->Lithuanian
      mk.fmuser.org ->Macedonian
      ms.fmuser.org ->Malay
      mt.fmuser.org ->Maltese
      no.fmuser.org ->Norwegian
      fa.fmuser.org ->Persian
      pl.fmuser.org ->Polish
      pt.fmuser.org ->Portuguese
      ro.fmuser.org ->Romanian
      ru.fmuser.org ->Russian
      sr.fmuser.org ->Serbian
      sk.fmuser.org ->Slovak
      sl.fmuser.org ->Slovenian
      es.fmuser.org ->Spanish
      sw.fmuser.org ->Swahili
      sv.fmuser.org ->Swedish
      th.fmuser.org ->Thai
      tr.fmuser.org ->Turkish
      uk.fmuser.org ->Ukrainian
      ur.fmuser.org ->Urdu
      vi.fmuser.org ->Vietnamese
      cy.fmuser.org ->Welsh
      yi.fmuser.org ->Yiddish

       
  •  

    FMUSER Wirless Transmit Video And Audio More Easier !

  • Contact

    Address:
    No.305 Room HuiLan Building No.273 Huanpu Road Guangzhou China 510620

    E-mail:
    [email protected]

    Tel / WhatApps:
    +8618078869184

  • Categories

  • Newsletter

    FIRST OR FULL NAME

    E-mail

  • paypal solution  Western UnionBank OF China
    E-mail:[email protected]   WhatsApp:+8618078869184   Skype:sky198710021 Chat with me
    Copyright 2006-2020 Powered By www.fmuser.org

    Contact Us