i@.
HARDWARE DESCRIPTION OFTHE 8051,8052 AND 80C51
OFFH,ven~g the byte will prqduce the encryption
byte value. If a large block of code is letl unpro-
grammed,a verificationroutinewilldisplaythe encryp-
tion array contents. For this reason all unused code
bytea should be progrsmm
ed with some
value other
than OFFH,
and not all of them the same value.This
willensuremaximumprogramprotection.
Prosram Lack Bita: Also included in the Program
Lack schemeare Lock Bits whichcsn be enabledto
providevaryingdegreesof protection,Table 5 lists the
L.cckBitsand their
correspondingeffecton the micro-
controller.Referto Table6 for the Lock Bitsavailable
on the variousproducts.
Erasingthe EPROMalso erasesthe EncryptionArray
andtheLackBits,returningthe part to fullfunctionali-
ty.
Table 5. Program Lo
Program Loci
——
LB1
P
P
—
LB2
Y-
T
P
P
—
3ita
gremmed
mogrammed
LB3
u
u
u
P
—
kBits and their Features
Protection Type
No programlockfeatures
enabled.(Codeverifywill
stillbe encryptedbythe
encryptionarrayif
programmed.)
MOVC instructions
executedfromexternal
programmemoryare
disabledfromfetching
code bytesfrominternal
memory,EA issampled
and latchedon reset,and
furtherprogrammingof
the EPROMisdisabled.
Same as 2, also verifyis
disabled. -
Same as 3, alsoexternal
executionisdisabled.
Anyother combinationofthe LockBitsis not defied.
Table6.ProgramProtection
Device
LocfrBite Enorypt Any
8751BH
LB1,LB2
32 Bytes
8752BH
LB1,LB2
32 Bytes
87C51 LB1,LB2,LB3
84 Bfles
WhenLock Bit 1is programm~ the logiclevelat the
~ pin is sampledand latchedduring react. If the de-
viceis poweredup withouta reset, the latch inidalizes
to a random value, and holds that valueuntil reset is
activated.It is ncassary
that the latched valueof ~
be in agreementwiththe current logiclevelat that pin
in order for the device
to functionproperly.
ROM PROTECTION
The 8051AHP and 30C51BHP are
ROM Protectrd
versionsofthe 3051AHand30C51BH,respectively.To
incorporate this ProtectionFeature, program verifica-
tion has been disabledand extcrnaf memory amessca
have been limited to 4K. Refer to the data sheets on
theseparts for moreinformation.
ONCETMMode
The ONCE (“on-circuit emulation”) mode facilitates
testingand debuggingofsystemsusingthe devicewith-
out the &vice havingto be removedfrom the
circuit.
The
ONCE modeis invokedby:
1. Pull ALE lowwhilethe deviceis in reactand PSEN
is high;
2. Hold ALE lowas RSTis deactivated.
Whilethe deviceis in ONCEmodq the Port Opinsgo
into a float state, and theother port pinsand ALE and
~ are weakly pulled high. The oscillator circuit
remains active. While the device is in this modq an
emulator or teat CPU can be used to drivethe circuit.
Normal operation is restored after a normal reset is
applied.
THE ON-CHIPOSCILLATORS
HMOSVersions
The cm-chip oscillator circuitry for the HMOS
(HMOS-Iand HMOS-11)membersofthe MCS-51fsm-
ilyis a singlestagetinearinverter(Figure29),intended
for usc as a crystal-controlled,positivereactance oscil-
lator (Figure30).In this appficstionthe crystal is oper-
ated in ita fundsmentafresponsemode as an inductive
reactarw in psralfel resonancewith capacitance-exter-
nal to the crystal.
3-30