Rev. 1.20 40 January 23, 2015 Rev. 1.20 41 January 23, 2015
BS82B12A-3/BS82C16A-3/BS82D20A-3
Touch Key 8-Bit Flash MCU with LED/LCD Driver
BS82B12A-3/BS82C16A-3/BS82D20A-3
Touch Key 8-Bit Flash MCU with LED/LCD Driver
EEPROM Data Memory
ThedevicescontainanareaofinternalEEPROMDataMemory.EEPROM,whichstandsfor
ElectricallyErasableProgrammableReadOnlyMemory,isbyitsnatureanon-volatileformof
memory,withdataretentionevenwhenitspowersupplyisremoved.Byincorporatingthiskind
ofdatamemory,awholenewhostofapplicationpossibilitiesaremadeavailabletothedesigner.
TheavailabilityofEEPROMstorageallowsinformationsuchasproductidenticationnumbers,
calibrationvalues,specicuserdata,systemsetupdataorotherproductinformationtobestored
directlywithintheproductmicrocontroller.TheprocessofreadingandwritingdatatotheEEPROM
memoryhasbeenreducedtoaverytrivialaffair.
EEPROM Data Memory Structure
TheEEPROMDataMemorycapacityis64×8bits.UnliketheProgramMemoryandRAMData
Memory,theEEPROMDataMemoryisnotdirectlymappedandisthereforenotdirectlyaccessible
inthesamewayastheothertypesofmemory.ReadandWriteoperationstotheEEPROMare
carriedoutinsinglebyteoperationsusinganaddressanddataregisterinSector0andasingle
controlregisterinSector1.
Device Capacity Address
BS82B12A-3
64×8 00H~3FHBS82C16A-3
BS82D20A-3
EEPROM Registers
ThreeregisterscontroltheoveralloperationoftheinternalEEPROMDataMemory.Thesearethe
addressregister,EEA,thedataregister,EEDandasinglecontrolregister,EEC.AsboththeEEA
andEEDregistersarelocatedinBank0,theycanbedirectlyaccessedinthesamewayasanyother
SpecialFunctionRegister.TheEECregisterhowever,beinglocatedinBank1,cannotbedirectly
addresseddirectlyandcanonlybereadfromorwrittentoindirectlyusingtheMP1MemoryPointer
andIndirectAddressingRegister,IAR1.BecausetheEECcontrolregisterislocatedataddress40H
inBank1,theMP1MemoryPointermustrstbesettothevalue40HandtheBankPointer,BP,set
tothevalue,01H,beforeanyoperationsontheEECregisterareexecuted.
EEPROM Control Registers List
Name
Bit
7 6 5 4 3 2 1 0
EEA — —
D5 D4 D3 D2 D1 D0
EED D7 D6
D5 D4 D3 D2 D1 D0
EEC — — — — WREN WR RDEN RD
EEA Register
Bit 7 6 5 4 3 2 1 0
Name — —
D5 D4 D3 D2 D1 D0
R/W — — R/W R/W R/W R/W R/W R/W
POR — — 0 0 0 0 0 0
Bit7~6 Unimplemented,readas"0"
Bit5~0 DataEEPROMaddress
DataEEPROMaddressbit5~bit0