Rev. 1.20 156 January 23, 2015 Rev. 1.20 157 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
CPLA [m]
ComplementDataMemorywithresultinACC
Description EachbitofthespeciedDataMemoryislogicallycomplemented(1′scomplement).Bitswhich
previouslycontaineda1arechangedto0andviceversa.Thecomplementedresultisstoredin
theAccumulatorandthecontentsoftheDataMemoryremainunchanged.
Operation ACC←[m]
Affectedag(s) Z
DAA [m]
Decimal-AdjustACCforadditionwithresultinDataMemory
Description ConvertthecontentsoftheAccumulatorvaluetoaBCD(BinaryCodedDecimal)value
resultingfromthepreviousadditionoftwoBCDvariables.Ifthelownibbleisgreaterthan9
orifACagisset,thenavalueof6willbeaddedtothelownibble.Otherwisethelownibble
remainsunchanged.Ifthehighnibbleisgreaterthan9oriftheCagisset,thenavalueof6
willbeaddedtothehighnibble.Essentially,thedecimalconversionisperformedbyadding
00H,06H,60Hor66HdependingontheAccumulatorandagconditions.OnlytheCag
maybeaffectedbythisinstructionwhichindicatesthatiftheoriginalBCDsumisgreaterthan
100,itallowsmultipleprecisiondecimaladdition.
Operation [m]←ACC+00Hor
[m]←ACC+06Hor
[m]←ACC+60Hor
[m]←ACC+66H
Affectedag(s) C
DEC [m]
DecrementDataMemory
Description DatainthespeciedDataMemoryisdecrementedby1.
Operation [m]←[m]−1
Affectedag(s) Z
DECA[m] DecrementDataMemorywithresultinACC
Description DatainthespeciedDataMemoryisdecrementedby1.Theresultisstoredinthe
Accumulator.ThecontentsoftheDataMemoryremainunchanged.
Operation ACC←[m]−1
Affectedag(s) Z
HALT
Enterpowerdownmode
Description Thisinstructionstopstheprogramexecutionandturnsoffthesystemclock.Thecontentsof
theDataMemoryandregistersareretained.TheWDTandprescalerarecleared.Thepower
downagPDFissetandtheWDTtime-outagTOiscleared.
Operation TO←0
PDF←1
Affectedag(s) TO,PDF
INC [m]
IncrementDataMemory
Description DatainthespeciedDataMemoryisincrementedby1.
Operation [m]←[m]+1
Affectedag(s) Z
INCA [m]
IncrementDataMemorywithresultinACC
Description DatainthespeciedDataMemoryisincrementedby1.TheresultisstoredintheAccumulator.
ThecontentsoftheDataMemoryremainunchanged.
Operation ACC←[m]+1
Affectedag(s) Z