hi Alban Rampon,i want to read from extern RAM,and
i set up my extern RAM address is 0x4000-0x5fff(hardware set up).
what i must to write in
PRM file is MY_RAM = READ_WRITE 0x4000 TO 0x5fff,and DATA_PAGE INTO MY_RAM; main.c:
#include <hidef.h> /* common defines and macros */
#include <MC9S12NE64.h> /* derivative information */
#pragma DATA_SEG __PPAGE_SEG DATA_PAGE
unsigned char MR1@0X4010;
#pragma DATA_SEG DEFAULT
void main(void) {
unsigned char *__far ptr;
CLKSEL=0;
CLKSEL_PLLSEL = 0; /* Select clock source from XTAL */
PLLCTL_PLLON = 0; /* Disable the PLL */
SYNR = 11; /* Set the multiplier register 2 2 */
REFDV = 7; /* Set the divider register 7 8 */
PLLCTL = 192;
PLLCTL_PLLON = 1; /* Enable the PLL */
while(!CRGFLG_LOCK); /* Wait */
CLKSEL_PLLSEL = 1; /* Select clock source from PLL */
///expended ram init///////////////////////////////////////
RDRIV=0x00;
PEAR=0X0C;
EBICTL=0X01;//0:free run
MISC=0X01;
MODE=0XAB;//normal expended wide
ptr=(unsigned char *__far)&MR1;
*ptr=0x80;
}
have something wrong ? thanks a lot
Message Edited by arde on 2009-05-10 02:54 PM