弄了很多天了,MEGA64访问外部RAM都有问题,连ALE RD WR信号一个都没有,用JTAG仿真,把程序烧进去也一样,请教大家:程序如下:
include <inttypes.h>
#include <avrlib/avrlibdefs.h>
#include<avrlib/avrlibtypes.h>
#include <avr/io.h>
//#include<avr/delay.h>
#define xram_addr 0x1100
int main(void)
{
u08 *p;
u16 count;
p=(u08 *) xram_addr;
PORTA=0XFF;
PORTC=0X00;
/////////
DDRA=0X00;
DDRC=0XFF;
/////////
sbi(PORTG,PG0);
sbi(PORTG,PG1);
cbi(PORTG,PG2);
DDRG=0XFF;
sbi(MCUCR,SRE);
for(count=0;count<600;count++)
{
*p=0xaa;
p++;
}
while(1){;}
//while(1){;}
} |