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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
07/11/09 10:35
Read: times


 
#167064 - This works like Magic !
Responding to: ???'s previous message
if ( ISP_PB == 0)                         // User wants to program the flash
    {
	  display ( "ENTER ISP MODE ?" );
	  DOT_00 = 1;
	  msDelay(1000);

	  FMCON = 0x08;
	  FMDATA = 0x96;                 // Set the internal Write Enable flag ( in Case AWE=1)

	  #pragma asm 
	   PGM_MTP EQU 0FF03H            // Common entry address for IAP routines
	   push IEN0
	   clr EA                        // Stop interrupts
	   mov R0, #0FFH
	   mov @R0, #96H                 // Key to permit Flash write
	   mov A,  #02H                              
	   mov R5, #01H
	   mov R7, #03H                  // Load registers to write 01 to Boot Status byte
	   lcall PGM_MTP
	   pop IEN0                      // Chip should now enter ISP for the next power on reset                
	   #pragma endasm
       
	   display ( "ENTERED ISP MODE" ); 
	   DOT_00 = 0 ;
	   msDelay(1000);
	   AUXR1 = 0x08;                 // Do a software reset
    }

 


Thanks to Erik and Lex Timmerman.

Raghu


List of 14 messages in thread
TopicAuthorDate
LPC935 - No Touch            01/01/70 00:00      
   someone has posted the LPC equivalent ...            01/01/70 00:00      
   LPC935            01/01/70 00:00      
      Thanks Andy / Erik            01/01/70 00:00      
         No Touch - No ISP ??            01/01/70 00:00      
            My No_Touch seems simpler            01/01/70 00:00      
               Agreed            01/01/70 00:00      
                  How do you know you are in the bootloader?            01/01/70 00:00      
                     Also see this link            01/01/70 00:00      
                     Still trying..            01/01/70 00:00      
                        This works like Magic !            01/01/70 00:00      
                           Request            01/01/70 00:00      
                              Done as suggested            01/01/70 00:00      
                                 Many thanks            01/01/70 00:00      

Back to Subject List