void ProgramWord( int page, int block, unsigned int prg_address, unsigned int value)
{ unsigned int* address=(unsigned int*)prg_address;
FCNFG_BKSEL=block;
PPAGE=page;
while ( FSTAT_CBEIF==0 );
*address=value;
FCMD=0x20;
FSTAT_CBEIF=1;
__asm nop;
__asm nop;
__asm nop;
__asm nop;
__asm nop;
if ( FSTAT_ACCERR==1 || FSTAT_PVIOL==1 ) flash_errors++;
}
Thank you for your help......
Message Edited by march� on 2006-06-14 04:10 AM