P89V51RD2 - Erase Page commands don't work

Started by MX, August 04, 2004, 04:38:33 PM

Previous topic - Next topic

Annibal Abreu

These are the answer that I had receive from two smart Guys:

+++++++++++++++++++++++++++++++++++++++++++++++++++++
Dear Annibal,
Sorry as I was out and busy in other matter, have not opened my mail, you
can erase a sector by
    mov    20H,#00
    setb    008h

    mov    0B1H,#00
    mov    r1,#8
    mov    dptr,#Sector Address
    call     1ff0h
    mov    0b1h,#01h

Your programme must be executing above 2000h, while executing above code.
It is recommnaded that you after finishing you IAP call you better start a
fresh, as IAP uses some registers from 30H to 35H and 80H.

Harshadbhai.

++++++++++++++++++++++++++++++++++++++++++++++++++++

Dear Annibal Abreu,
  You can erase any sector of 128 bytes.  
  Set DPH and DPL for the add. locs to be erased.  Make sure that bits  0-6   of  DPL are zeroes. ( DPH - higher address & DPL-Lower address)
  Clear bit 1 of FCF register (B1H). ( This has to be done once only after reset).
  Clear BSEL bit .  As mentioned in the data sheet ,avoid clearing BSEL bit  when the user program is operating in the range 0000-1FFFH.
  Set R1 = 08H
  Call PGM_MTP at 1FF0H
  Set BSEL bit.

S.Poduval.

M.SH

Dear sirs.
Thank you for your very interest site.
I use IAP free software for P89c51RD2 at my project.
please help me about observable notes and changes
for use this code for P89v51RD2.

Andy Ayre

Sorry, we only provide support for Flash Magic - however the datasheets will give you all the info you need.

Embedded Systems Academy, Inc.
support at esacademy dot com