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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/07/04 22:26
Read: times


 
#82728 - P89LV51RD2 IAP fail
Hi,

I am using the following code to program bytes into the flash using an IAP call. I haven't been able to program the device. This procedure returns without changing the value of A. Actually, none of the IAP function calls made are successful. Can someone help me regarding this matter?

The datasheet says that PGM_MPT is as 1FF0H, which doesn't make sense. The application note (AN461) says that it's at FFF0H.

;****************************************************************
;
;PROGRAM_BYTE: Programs one byte in A at the address pointed
; by DPTR
; Parameters: A = byte to be programmed
; DPTR = address
; Returns: A = (0=pass, !0=fail)
;
PROGRAM_BYTE:
CLR EA
MOV R0,#11 ;Osc freq = 11.059 MHz
MOV R1,#02H
CALL 0FFF0H
SETB EA
RET
;****************************************************************

This is from P89LV51RD2 datasheet:
Program User Code Input parameters:
R1 = 02h
DPH = memory address MSB
DPL = memory address LSB
ACC = byte to program
Return parameter(s):
ACC = 00 = pass
ACC = !00 = fail


Thank you,

Nitin



List of 4 messages in thread
TopicAuthorDate
P89LV51RD2 IAP fail            01/01/70 00:00      
   It's flash            01/01/70 00:00      
      Flash            01/01/70 00:00      
   block earse            01/01/70 00:00      

Back to Subject List