Chip Erase

The Chip Erase will erase the Flash, the SRAM and the EEPROM memories plus Lock bits. The Lock bits are not reset until the program memory has been completely erased. The Fuse bits are not changed. A Chip Erase must be performed before the Flash and/or EEPROM are reprogrammed.

Note: The EEPROM memory is preserved during Chip Erase if the EESAVE Fuse is programmed.

Load Command “Chip Erase”:

  1. 1.Set XA1, XA0 to “10”. This enables command loading.
  2. 2.Set BS1 to “0”.
  3. 3.Set DATA to “1000 0000”. This is the command for Chip Erase.
  4. 4.Give XTAL1 a positive pulse. This loads the command.
  5. 5.Give WR a negative pulse. This starts the Chip Erase. RDY/BSY goes low.
  6. 6.Wait until RDY/BSY goes high before loading a new command.