Memory Random Access Memory ReadWrite volatile ReadOnly Memory
- Slides: 43
• Memory – Random Access Memory • Read/Write, volatile – Read-Only Memory • Program, non-volatile • Programable ROM • Erasable PROM – UV EPROM – Electrical EPROM – Flash memory – Serial EEPROM
• 8051 write to 6264 – A 0~A 12 / 解碼電路 CS – D 0~D 7 – WR • 8051 read from 6264 – A 0~A 12 / 解碼電路 CS – RD – D 0~D 7
• Write 0 x 3 C to memory's 0 x 1 A 2 B • • P 2=0 x 1 A; P 1=0 x 2 B; P 0=0 x 3 C; P 3_5=0; P 3_6=1; P 3_5=1;
• Read from memory's 0 x 1 A 2 B • • MOV P 2, #1 Ah MOV P 1, #2 Bh CLR P 3. 5 CLR P 3. 7 P 0, #0 FFh MOV A, P 0 SETB P 3. 7 SETB P 3. 5
• READ – – 1. CS 2. A 0 -A 12 3. RD 4. D 0 -D 7 • WRITE – – 1. CS 2. A 0 -A 12 3. D 0 -D 7 4. WR
• READ – 1. CS – 2. A 0 -A 12 – 3. RD – 4. D 0 -D 7 • Program
• Write 0 x 3 C to memory's 0 x 1 A 2 B • MOV DPTR, #1 A 2 Bh • MOV A, #3 Ch • MOVX @DPTR, A
• • EPROM 2764: ---x xxxx xxxx 0100 0000 = 4000 h 0101 1111 = 5 FFFh • • RAM 6264: ---x xxxx xxxx 1000 0000 = 8000 h 1001 1111 = 9 FFFh
• Read from lowest address of EPROM 2764 (4000 h) • MOV DPTR, #4000 h • MOV A, #00 h • MOVC A, @A+DPTR
• Write 12 h to highest address of RAM 6264 (9 FFFh) • MOV DPTR, #9 FFFh • MOV A, 12 h • MOVX @DPTR, A
• Read from lowest address of 6264 (8000 h) • MOV DPTR, #8000 h • MOVX A, @DPTR
• MOVX @DPTR, A – – DPL P 0, DPH P 2 ALE A P 0 WR • MOVX A, @DPTR – – DPL P 0, DPH P 2 ALE RD A P 0
• MOVC A, @A+DPTR – – (DPTR+A)L P 0, (DPTR+A)H P 2 ALE PSEN A P 0 • Fetch instruction – – PCL P 0, PCH P 2 ALE PSEN Instruction Register P 0
• • • RAM 6264: ---x xxxx xxxx 1100 0000 = C 000 h 1101 1111 = DFFFh sdcc --xram-loc 0 x. C 000 test. c
• __data unsigned char test_data; • __xdata __at 0 x 7 FFE unsigned int chksum; • __idata unsigned char test_data; • __code unsigned char test_code=‘A’; • __bit test_bit;
• • • 110 x xxxx = C 000 h~DFFFh 010 x xxxx = 4000 h~5 FFFh __code __at 0 x 4000 unsigned char x=‘ 1’; __xdata __at 0 x. C 000 unsigned char y; y=x; x=y; Incorrect!
• Copy ROM to RAM • __code __at 0 x 4000 unsigned char rom[8192]; • __xram __at 0 x. C 000 unsigned char ram[8192]; void main(void) { int i; for(i=0; i<8192; i++) ram[i]=rom[i]; }
void main(void) { int i; for(i=0; i<8192; i++) ram[i]=0; }
• __xram __at 0 x. C 000 int ram[4096]; for(i=0; i<4096; i++) Ram[i]=I;
• • 2764: ---x xxxx xxxx 0100 0000 = 4000 h 0101 1111 = 5 FFFh • • 6264: ---x xxxx 110 x xxxx 1100 0000 = C 000 h 1101 1111 = DFFFh
__code __at 0 x 4000 unsigned char rom[8192]; __xdata __at 0 x. C 000 unsigned char ram[8192]; void main() { int I; for (i=0; i<8192; i++) ram[i]=rom[i]; }
• __xdata __at 0 x 3000 unsigned int x[1024]; for(i=0; i<1024; i++) x[i]=i;
• 10 xx xxxx • 1000 0000 = 8000 h • 1011 1111 = BFFFh
• 0011 1 xxx xxxx • 0011 1000 0000 = 3800 h • 0011 1111 = 3 FFFh
• xx 00 0 xxx xxxx • xx 00 0000 = • xx 00 0111 1111 =
• MOV DPTR, #7 FFFh • MOVX @DPTR, A • MOV DPTR, #0000 h • MOVX A, @DPTR
Stack
• 110 x xxxx • 1100 0000 = C 000 h • 1101 1111 = DFFFh • __xdata __at 0 x. C 000 unsigned char x[8192]; • int i; • for(i=0; i<8192; <i++) – x[i]=0;
- Ina twitter
- Cisco privilege levels read only
- Readonly struct
- Pram model
- Synchronous dynamic ram
- Disadvantages of random access memory
- Spinfet
- Random assignment vs random sampling
- Random assignment vs random selection
- Disadvantages of indexed sequential file organization
- In random access machine, instructions are executed
- Random access control
- Alohause reviews
- Random pengertian
- Arduino volatile nedir
- Is rom volatile or nonvolatile
- Isovaler synonym
- Exp(5
- Hydroalcoholic solution are sprit
- Nama simplisia minyak klenteng
- Volatile oil pharmaceutical uses
- Volatile vs atomic java
- In-situ soap method of emulsion preparation
- Harrv
- Raoult's law and dalton's law
- Magma volatile gasses definition
- Secondary storage provides temporary or volatile storage
- Volatile c
- Volatile oils - pharmacognosy
- Terminal access controller access-control system
- Terminal access controller access-control system
- Pal programming table
- 8237 pin diagram
- Access memory
- Direct memory access in os
- Edma memory
- Basic dma operation
- Memory access time
- Benefits of dma
- Computer hardware
- Thread scheduling
- Access memory
- Shared memory vs distributed memory
- Internal memory and external memory