This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to use External Ram

I am student and study in AIT. I need example program of Keil-C for use External ram use with IC ADuC832 which address of my external ram has range an address at 0x00000 to 0x7FFFF (512KByte). I want source to write data into 0x800

I atteach my program problem write in C language for test to used XRAM at address 0x00802 by write and read variable t and send value of variable back to RS232.

Please help me sir.
Mr.Somphong Thanok
//////////////////////////////////////////////////
#include <ADUC832.H> //ADCU832 62 Kbyte Flash
#include <stdio.h>

void delay(int i)
{ int j; for(;i>0;i--) for(j=0;j<1000;j++) ;
}

void InitialSerial()
{ SCON = 0x50; TMOD |= 0x20; TH1 = 0xFA; /* 9600 baud */ TR1 = 1; TI = 1;
}

void PutBuf(char c)
{ SBUF = c;
}

void InitialTIC()
{ TIMECON = 0x00; IEIP2 = 0x44; SEC = 0x00; HTHSEC = 0x00; INTVAL = 70; TIMECON = 0x03;
}

void TIC_interrupt() interrupt 10
{ t++; TI = 1; //start transmittion printf("%4.4d \r\n",t); TI = 0; //end of transmittion
}

void main(void)
{ unsigned int i; unsigned char k1,dataout; t = 0; CFG832 = 0xC1; PLLCON = 0x00; InitialTIC(); EA = 1; while(1) { }
}

0