欢迎访问ic37.com |
会员登录 免费注册
发布采购

ATMEGA128L-8AL 参数 Datasheet PDF下载

ATMEGA128L-8AL图片预览
型号: ATMEGA128L-8AL
PDF下载: 下载PDF文件 查看货源
内容描述: [RISC Microcontroller, 8-Bit, FLASH, 8MHz, CMOS, PQFP64, 14 X 14 MM, 1 MM HEIGHT, 0.80 MM PITCH, PLASTIC, MS-026AEB, TQFP-64]
分类和应用: 时钟微控制器外围集成电路
文件页数/大小: 391 页 / 6192 K
品牌: ATMEL [ ATMEL ]
 浏览型号ATMEGA128L-8AL的Datasheet PDF文件第31页浏览型号ATMEGA128L-8AL的Datasheet PDF文件第32页浏览型号ATMEGA128L-8AL的Datasheet PDF文件第33页浏览型号ATMEGA128L-8AL的Datasheet PDF文件第34页浏览型号ATMEGA128L-8AL的Datasheet PDF文件第36页浏览型号ATMEGA128L-8AL的Datasheet PDF文件第37页浏览型号ATMEGA128L-8AL的Datasheet PDF文件第38页浏览型号ATMEGA128L-8AL的Datasheet PDF文件第39页  
ATmega128(L)  
Using all 64KB  
Locations of External  
Memory  
Since the External Memory is mapped after the Internal Memory as shown in Figure 11, only  
60KB of External Memory is available by default (address space 0x0000 to 0x10FF is reserved  
for internal memory). However, it is possible to take advantage of the entire External Memory by  
masking the higher address bits to zero. This can be done by using the XMMn bits and control  
by software the most significant bits of the address. By setting Port C to output 0x00, and releas-  
ing the most significant bits for normal Port Pin operation, the Memory Interface will address  
0x0000 - 0x1FFF. See the following code examples.  
Assembly Code Example(1)  
; OFFSET is defined to 0x2000 to ensure  
; external memory access  
; Configure Port C (address high byte) to  
; output 0x00 when the pins are released  
; for normal Port Pin operation  
ldi r16, 0xFF  
out DDRC, r16  
ldi r16, 0x00  
out PORTC, r16  
; release PC7:5  
ldi r16, (1<<XMM1)|(1<<XMM0)  
sts XMCRB, r16  
; write 0xAA to address 0x0001 of external  
; memory  
ldi r16, 0xaa  
sts 0x0001+OFFSET, r16  
; re-enable PC7:5 for external memory  
ldi r16, (0<<XMM1)|(0<<XMM0)  
sts XMCRB, r16  
; store 0x55 to address (OFFSET + 1) of  
; external memory  
ldi r16, 0x55  
sts 0x0001+OFFSET, r16  
C Code Example(1)  
#define OFFSET 0x2000  
void XRAM_example(void)  
{
unsigned char *p = (unsigned char *) (OFFSET + 1);  
DDRC = 0xFF;  
PORTC = 0x00;  
XMCRB = (1<<XMM1) | (1<<XMM0);  
*p = 0xaa;  
XMCRB = 0x00;  
*p = 0x55;  
}
Note:  
1. See “About Code Examples” on page 9.  
Care must be exercised using this option as most of the memory is masked away.  
35  
2467P–AVR–08/07  
 复制成功!