Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
03/21/03 20:21
Read: times


 
#42071 - P89C51RD2HBA or RD2BA/01 IAP programming
I am having problems with the erase sector command on this philips part. When I call using the erase block command R1=01h it seems to erase the entire part. I am able to program the status byte though. The following is my snippet of code:

void erase_block1( void )
{
#pragma asm
ORL AUXR1,#020H ; enable bootrom
MOV R0, #0BH ; oscillator frequency
MOV R1, #01H ; program data function
MOV DPTR, #2000H ;
CALL 0FFF0H ; call iap routine
ANL AUXR1,#0DFH ; disable bootrom
#pragma endasm
if ( ACC )
PROGERR = 1 ;
}

I also am disabling the watchdog and interrupts prior to calling. Any thoughts?

List of 7 messages in thread
TopicAuthorDate
P89C51RD2HBA or RD2BA/01 IAP programming            01/01/70 00:00      
   RE: P89C51RD2HBA or RD2BA/01 IAP programming            01/01/70 00:00      
   RE: P89C51RD2HBA or RD2BA/01 IAP programming            01/01/70 00:00      
   RE: P89C51RD2HBA or RD2BA/01 IAP programming            01/01/70 00:00      
      RE: P89C51RD2HBA or RD2BA/01 IAP programming            01/01/70 00:00      
   WDT feed during IAP            01/01/70 00:00      
      RE: WDT feed during IAP            01/01/70 00:00      

Back to Subject List