memory 8051

13,775 views

Published on

Published in: Technology, Business

memory 8051

  1. 1. 8051<br />MEMORY & I/O ADDRESSING<br />
  2. 2. Memory Addressing<br />
  3. 3. PROGRAM MEMORY - ROM<br />ROM ( READ ONLYMEMORY )<br />8051 can address 4K bytes on chip memory – map range 0000 TO 0FFFh<br /> IT can address 64 KB external memory <br />map range – 0000 TO FFFFh<br /> Memory map of internal and external program overlaps<br /> The internal and external ROM distinguished by PSEN’ signal<br />ROM less version of 8051 – PSEN’ used to access external memory<br />
  4. 4. ROM - program<br />
  5. 5. DATA MEMORY - RAM<br />EXTERNAL RAM<br />8051 supports 64KB external data memory- range – 0000 to FFFFh<br />Accessed by DPTR<br />8051 generates RD’, WR’ during external access .<br />CS’ can be derived from address lines <br />
  6. 6. ONCHIP (INTERNAL) RAM<br />
  7. 7. RAM<br />
  8. 8. INTERNAL RAM<br />
  9. 9. Registers<br />1F<br />18<br />Bank 3<br />Four Register Banks<br />Each bank has R0-R7<br />Selectable by psw.2,3<br />17<br />10<br />Bank 2<br />0F<br />08<br />Bank 1<br />07<br />06<br />05<br />04<br />03<br />02<br />01<br />00<br />R7<br />R6<br />R5<br />R4<br />R3<br />R2<br />R1<br />R0<br />Bank 0<br />
  10. 10. Bit Addressable Memory<br />2F<br />2E<br />2D<br />2C<br />2B<br />2A<br />29<br />28<br />20h – 2Fh (16 locations X 8-bits = 128 bits)<br />Bit addressing:<br />mov C, 1Ah<br /> or<br />mov C, 23h.2<br />27<br />26<br />25<br />24<br />23<br />22<br />21<br />20<br />
  11. 11. Special Function Registers<br /><ul><li>DATA registers
  12. 12. CONTROL registers
  13. 13. Timers
  14. 14. Serial ports
  15. 15. Interrupt system
  16. 16. Analog to Digital converter
  17. 17. Digital to Analog converter
  18. 18. Etc.</li></ul>Addresses 80h – FFh<br />Direct Addressing used to access SPRs<br />
  19. 19. I/O ADDRESSING<br />
  20. 20. I/O INTERFACING<br />External i/o devices are interfaced as memorymapped i/o devices<br />Devicestreated as externalmemory locations and consume externalmemoryaddress<br />The address of external program and data memorymayoverlap<br />

×