AT89S52外文文獻(xiàn)解析_第1頁
AT89S52外文文獻(xiàn)解析_第2頁
AT89S52外文文獻(xiàn)解析_第3頁
AT89S52外文文獻(xiàn)解析_第4頁
AT89S52外文文獻(xiàn)解析_第5頁
已閱讀5頁,還剩10頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

AT89S52TheAT89S52isalow-power,high-performanceCMOS8-bitmicrocomputerwith8KbytesofFlashprogrammableanderasablereadonlymemory(PEROM).ThedeviceismanufacturedusingAtmel’shigh-densitynonvolatilememorytechnologyandiscompatiblewiththeindustry-standard80S51and80S52instructionsetandpinout.Theon-chipFlashallowstheprogrammemorytobereprogrammedin-systemorbyaconventionalnonvolatilememoryprogrammer.Bycombiningaversatile8-bitCPUwithFlashonamonolithicchip,theAtmelAT89S52isapowerfulmicrocomputerwhichprovidesahighly-flexibleandcost-effectivesolutiontomanyembeddedcontrolapplications.TheAT89S52providesthefollowingstandardfeatures:8KbytesofFlash,256bytesofRAM,32I/Olines,three16-bittimer/counters,asix-vectortwo-levelinterruptarchitecture,afull-duplexserialport,on-chiposcillator,andclockcircuitry.Inaddition,theAT89S52isdesignedwithstaticlogicforoperationdowntozerofrequencyandsupportstwosoftwareselectablepowersavingmodes.TheIdleModestopstheCPUwhileallowingtheRAM,timer/counters,serialport,andinterruptsystemtocontinuefunctioning.ThePower-downmodesavestheRAMcontentsbutfreezestheoscillator,disablingallotherchipfunctionsuntilthenexthardwarereset.VCC:Supplyvoltage.GND:Ground.Port0:Port0isan8-bitopendrainbi-directionalI/Oport.Asanoutputport,eachpincansinkeightTTLinputs.When1sarewrittentoport0pins,thepinscanbeusedashigh-impedanceinputs.Port0canalsobeconfiguredtobethemultiplexedlow-orderaddress/databusduringaccessestoexternalpro-gramanddatamemory.Inthismode,P0hasinternalpullups.Port0alsoreceivesthecodebytesduringFlashprogrammingandoutputsthecodebytesduringprogramverification.Externalpullupsarerequiredduringprogramverification.Port1:Port1isan8-bitbi-directionalI/Oportwithinternalpullups.ThePort1outputbufferscansink/sourcefourTTLinputs.When1sarewrittentoPort1pins,theyarepulledhighbytheinternalpullupsandcanbeusedasinputs.Asinputs,Port1pinsthatareexternallybeingpulledlowwillsourcecurrent(IIL)becauseoftheinternalpullups.Inaddition,P1.0andP1.1canbeconfiguredtobethetimer/counter2externalcountinput(P1.0/T2)andthetimer/counter2triggerinput(P1.1/T2EX),respectively,asshowninthefollowingtable.Port1alsoreceivesthelow-orderaddressbytesduringFlashprogrammingandverification.Port2:Port2isan8-bitbi-directionalI/Oportwithinternalpullups.ThePort2outputbufferscansink/sourcefourTTLinputs.When1sarewrittentoPort2pins,theyarepulledhighbytheinternalpullupsandcanbeusedasinputs.Asinputs,Port2pinsthatareexternallybeingpulledlowwillsourcecurrent(IIL)becauseoftheinternalpullups.Port2emitsthehigh-orderaddressbyteduringfetchesfromexternalprogrammemoryandduringaccessestoexternaldatamemorythatuse16-bitaddresses(MOVX@DPTR).Inthisapplication,Port2usesstronginternalpullupswhenemitting1s.Duringaccessestoexternaldatamemorythatuse8-bitaddresses(MOVX@RI),Port2emitsthecontentsoftheP2SpecialFunctionRegister.Port2alsoreceivesthehigh-orderaddressbitsandsomecontrolsignalsduringFlashprogrammingandverification.Port3:Port3isan8-bitbi-directionalI/Oportwithinternalpullups.ThePort3outputbufferscansink/sourcefourTTLinputs.When1sarewrittentoPort3pins,theyarepulledhighbytheinternalpullupsandcanbeusedasinputs.Asinputs,Port3pinsthatareexternallybeingpulledlowwillsourcecurrent(IIL)becauseofthepullups.Port3alsoservesthefunctionsofvariousspecialfeaturesoftheAT89C51,asshowninthefollowingtable.Port3alsoreceivessomecontrolsignalsforFlashprogrammingandverification.RST:Resetinput.Ahighonthispinfortwomachinecycleswhiletheoscillatorisrunningresetsthedevice.ALE/:AddressLatchEnableisanoutputpulseforlatchingthelowbyteoftheaddressduringaccessestoexternalmemory.Thispinisalsotheprogrampulseinput(PROG)duringFlashprogramming.Innormaloperation,ALEisemittedataconstantrateof1/6theoscillatorfrequencyandmaybeusedforexternaltimingorclockingpurposes.Note,however,thatoneALEpulseisskippedduringeachaccesstoexternaldatamemory.Ifdesired,ALEoperationcanbedisabledbysettingbit0ofSFRlocation8EH.Withthebitset,ALEisactiveonlyduringaMOVXorMOVCinstruction.Otherwise,thepinisweaklypulledhigh.SettingtheALE-disablebithasnoeffectifthemicrocontrollerisinexternalexecutionmode.:ProgramStoreEnableisthereadstrobetoexternalpro-grammemory.WhentheAT89S52isexecutingcodefromexternalpro-grammemory,isactivatedtwiceeachmachinecycle,exceptthattwoactivationsareskippedduringeachaccesstoexternaldatamemory./VPP:ExternalAccessEnable.mustbestrappedtoGNDinordertoenablethedevicetofetchcodefromexternalprogrammemorylocationsstartingat0000HuptoFFFFH.Note,however,thatiflockbit1isprogrammed,willbeinternallylatchedonreset.shouldbestrappedtoVccforinternalprogramexecutions.Thispinalsoreceivesthe12-voltprogrammingenablevoltage(Vpp)duringFlashprogrammingwhen12-voltprogrammingisselected.XTAL1:Inputtotheinvertingoscillatoramplifierandinputtotheinternalclockoperatingcircuit.XTAL2:Outputfromtheinvertingoscillatoramplifier.SpecialFunctionRegisters:Amapoftheon-chipmemoryareacalledtheSpecialFunctionRegister(SFR)spaceisshowninTable1.Notethatnotalloftheaddressesareoccupied,andunoccupiedaddressesmaynotbeimplementedonthechip.Readaccessestotheseaddresseswillingeneralreturnrandomdata,andwriteaccesseswillhaveanindeterminateeffect.Usersoftwareshouldnotwrite1stotheseunlistedlocations,sincetheymaybeusedinfutureproductstoinvokenewfeatures.Inthatcase,theresetorinactivevaluesofthenewbitswillalwaysbe0.Timer2RegistersControlandstatusbitsarecontainedinregistersT2CON(showninTable2)andT2MOD(showninTable4)forTimer2.Theregisterpair(RCAP2H,RCAP2L)aretheCapture/ReloadregistersforTimer2in16-bitcapturemodeor16-bitauto-reloadmode.InterruptRegistersTheindividualinterruptenablebitsareintheIEregister.TwoprioritiescanbesetforeachofthesixinterruptsourcesintheIPregister.DataMemory:TheAT89S52implements256bytesofon-chipRAM.Theupper128bytesoccupyaparalleladdressspacetotheSpecialFunctionRegisters.Thatmeanstheupper128byteshavethesameaddressesastheSFRspacebutarephysicallyseparatefromSFRspace.Whenaninstructionaccessesaninternallocationaboveaddress7FH,theaddressmodeusedintheinstructionspecifieswhethertheCPUaccessestheupper128bytesofRAMortheSFRspace.InstructionsthatusedirectaddressingaccessSFRspace.Forexample,thefollowingdirectaddressinginstructionaccessestheSFRatlocation0A0H(whichisP2).MOV0A0H,#dataInstructionsthatuseindirectaddressingaccesstheupper128bytesofRAM.Forexample,thefollowingindirectaddressinginstruction,whereR0contains0A0H,accessesthedatabyteataddress0A0H,ratherthanP2(whoseaddressis0A0H).MOV@R0,#dataNotethatstackoperationsareexamplesofindirectaddressing,sotheupper128bytesofdataRAMareavailableasstackspace.

Infrared

Infrared

(IR)

light

is

electromagnetic

radiation

with

a

wavelength

longer

than

that

of

visible

light,

measured

from

the

nominal

edge

of

visible

red

light

at

0.74

microm-etres

(μm),

and

extending

conventionally

to

300

μm.

These

wavelengths

correspond

to

a

frequency

range

of

approximately

1

to

400

THz,

and

include

most

of

the

thermal

radiation

emitted

by

objects

near

room

temperature.

Microscopically,

IR

light

is

typically

emitted

or

absorbed

by

molecules

when

they

change

their

rotational-vibrational

movements.

Infrared

light

is

used

in

industrial,

scientific,

and

medical

applications.

Night-vision

devices

using

infrared

illumination

allow

people

or

animals

to

be

observed

without

the

observer

being

detected.

In

astronomy,

imaging

at

infrared

wavelengths

allows

observation

of

objects

obscured

by

interstellar

dust.

Infrared

imaging

cameras

are

used

to

detect

heat

loss

in

insulated

systems,

observe

changing

blood

flow

in

the

skin,

and

overheating

of

electrical

apparatus.Much

of

the

energy

from

the

Sun

arrives

on

Earth

in

the

form

of

infrared

radiation.

Sunlight

at

zenith

provides

an

irradiance

of

just

over

1

kilowatt

per

square

meter

at

sea

level.

Of

this

energy,

527

watts

is

infrared

radiation,

445

watts

is

visible

light,

and

32

watts

is

ultraviolet

radiation.

The

balance

between

absorbed

and

emitted

infrared

radiation

has

a

critical

effect

on

the

Earth's

climate.

Objects

generally

emit

infrared

radiation

across

a

spectrum

of

wavelengths,

but

sometimes

only

a

limited

region

of

the

spectrum

is

of

interest

because

sensors

usually

collect

radiation

only

within

a

specific

bandwidth.

Therefore,

the

infrared

band

is

often

subdivided

into

smaller

sections.Much

of

the

energy

from

the

Sun

arrives

on

Earth

in

the

form

of

infrared

radiation.

Sunlight

at

zenith

provides

an

irradiance

of

just

over

1

kilowatt

per

square

meter

at

sea

level.

Of

this

energy,

527

watts

is

infrared

radiation,

445

watts

is

visible

light,

and

32

watts

is

ultraviolet

radiation.The

balance

between

absorbed

and

emitted

infrared

radiation

has

a

critical

effect

on

the

Earth's

climate.

Objects

generally

emit

infrared

radiation

across

a

spectrum

of

wavelengths,

but

sometimes

only

a

limited

region

of

the

spectrum

is

of

interest

because

sensors

usually

collect

radiation

only

within

a

specific

bandwidth.

Therefore,

the

infrared

band

is

often

subdivided

into

smaller

sections.Heat/Heating

Infrared

radiation

is

popularly

known

as

"heat

radiation",

but

light

and

electromagnetic

waves

of

any

frequency

will

heat

surfaces

that

absorb

them.Infraredlight

from

the

Sun

only

accounts

for

49%

of

the

heating

of

the

Earth,

with

the

rest

being

caused

by

visible

light

that

is

absorbed

then

re-radiated

at

longerwavelengths.

Visible

light

or

ultraviolet-emitting

lasers

can

char

paper

and

incandescently

hot

objects

emit

visible

radiation.

Objects

at

room

temperature

will

emit

radiation

mostly

concentrated

in

the

8

to

25

μm

band,

but

this

is

not

distinct

from

the

emission

of

visible

light

by

incandescent

objects

and

ultraviolet

by

even

hotter

objects

(see

black

body

and

Wien's

displacement

law).

Heat

is

energy

in

transient

form

that

flows

due

to

temperature

difference.

Unlike

heat

transmitted

by

thermal

conduction

or

thermal

convection,

radiation

can

propagate

through

a

vacuum.

The

concept

of

emissivity

is

important

in

understanding

the

infrared

emissions

of

objects.

This

is

a

property

of

a

surface

which

describes

how

its

thermal

emissions

deviate

from

the

ideal

of

a

black

body.

To

further

explain,

two

objects

at

the

same

physical

temperature

will

not

"appear"

the

same

temperature

in

an

infrared

image

if

they

have

differing

emissivities.ThermographyInfrared

radiation

can

be

used

to

remotely

determine

the

temperature

of

objects

(if

the

emissivity

is

known).

This

is

termed

thermography,

or

in

the

case

of

very

hot

objects

in

the

NIR

or

visible

it

is

termed

pyrometry.

Thermography

(thermal

imaging)

is

mainly

used

in

military

and

industrial

applications

but

the

technology

is

reaching

the

public

market

in

the

form

of

infrared

cameras

on

cars

due

to

the

massively

reduced

production

costs.

Thermographic.cameras

detect

radiation

in

the

infrared

range

of

the

electromagnetic

spectrum

(roughly

900–14,000

nanometers

or

0.9–14

μm)

and

produce

images

of

that

radiation.

Since

infrared

radiation

is

emitted

by

all

objects

based

on

their

temperatures,

according

to

the

black

body

radiation

law,

thermography

makes

it

possible

to

"see"

one's

environment

with

or

without

visible

illumination.

The

amount

of

radiation

emitted

by

an

object

increases

with

temperature,

therefore

thermography

allows

one

to

see

variations

in

temperature

(hence

the

name).Infrared

radiation

can

be

used

as

a

deliberate

heating

source.

For

example

it

is

used

in

infrared

saunas

to

heat

the

occupants,

and

also

to

remove

ice

from

the

wings

of

aircraft

(de-icing).

FIR

is

also

gaining

popularity

as

a

safe

heat

therapy

method

of

natural

health

care

&

physiotherapy.

Infrared

can

be

used

in

cooking

and

heating

food

as

it

predominantly

heats

the

opaque,

absorbent

objects,

rather

than

the

air

around

them.

Infrared

heating

is

also

becoming

more

popular

in

industrial

manufacturing

processes,

e.g.

curing

of

coatings,

forming

of

plastics,

annealing,

plastic

welding,

print

drying.

In

these

applications,

infrared

heaters

replace

convection

ovens

and

contact

heating.

Efficiency

is

achieved

by

matching

the

wavelength

of

the

infrared

heater

to

the

absorption

characteristics

of

the

material.ClimatologyIn

the

field

of

climatology,

atmospheric

infrared

radiation

is

monitored

to

detect

trends

in

the

energy

exchange

between

the

earth

and

the

atmosphere.

These

trends

provide

information

on

long

term

changes

in

the

Earth's

climate.

It

is

one

of

the

primary

parameters

studied

in

research

into

global

warming

together

with

solar

radiation.

A

pyrgeometer

is

utilized

in

this

field

of

research

to

perform

continuous

outdoor

measurements.

This

is

a

broadband

infrared

radiometer

with

sensitivity

for

infrared

radiation

between

approximately

4.5

μm

and

50

μm.

Night

vision

Infrared

is

used

in

night

vision

equipment

when

there

is

insufficient

visible

light

to

see.

Night

vision

devices

operate

through

a

process

involving

the

conversion

of

ambient

light

photons

into

electrons

which

are

then

amplified

by

a

chemical

and

electrical

process

and

then

converted

back

into

visible

light.

Infrared

light

sources

can

be

used

to

augment

the

available

ambient

light

for

conversion

by

night

vision

devices,

increasing

in-the-dark

visibility

without

actually

using

a

visible

light

source.

The

use

of

infrared

light

and

night

vision

devices

should

not

be

confused

withthermal

imaging

which

creates

images

based

on

differences

in

surface

temperature

by

detecting

infrared

radiation

(heat)

that

emanates

from

objects

and

their

surrounding

environment.Astronomy

Astronomers

observe

objects

in

the

infrared

portion

of

the

electromagnetic

spectrum

using

optical

components,

including

mirrors,

lenses

and

solid

state

digital

detectors.

For

this

reason

it

is

classified

as

part

of

optical

astronomy.

To

form

an

image,

the

components

of

an

infrared

telescope

need

to

be

carefully

shielded

from

heat

sources,

and

the

detectors

are

chilled

using

liquid

helium.

The

sensitivity

of

Earth-based

infrared

telescopes

is

significantly

limited

by

water

vapor

in

the

atmosphere,

which

absorbs

a

portion

of

the

infrared

radiation

arriving

from

space

outside

of

selected

atmospheric

windows.

This

limitation

can

be

partially

alleviated

by

placing

the

telescope

observatory

at

a

high

altitude,

or

by

carrying

the

telescope

aloft

with

a

balloon

or

an

aircraft.

Space

telescopes

do

not

suffer

from

this

handicap,

and

so

outer

space

is

considered

the

ideal

location

for

infrared

astronomy.The

infrared

portion

of

the

spectrum

has

several

useful

benefits

for

astronomers.

Cold,

dark

molecular

clouds

of

gas

and

dust

in

our

galaxy

will

glow

with

radiated

heat

as

they

are

irradiated

by

imbedded

stars.

Infrared

can

also

be

used

to

detect

protostars

before

they

begin

to

emit

visible

light.

Stars

emit

a

smaller

portion

of

their

energy

in

the

infrared

spectrum,

so

nearby

cool

objects

such

as

planets

can

be

more

readily

detected.

(In

the

visible

light

spectrum,

the

glare

from

the

star

will

drown

out

the

reflected

light

from

a

planet.)

Infrared

light

is

also

useful

for

observing

the

cores

of

active

galaxies

which

are

often

cloaked

in

gas

and

dust.

Distant

galaxies

with

a

high

redshift

will

have

the

peak

portion

of

their

spectrum

shifted

toward

longer

wavelengths,

so

they

are

more

readily

observed

in

the

infrared.

The

discovery

of

infrared

radiation

is

ascribed

to

William

Herschel,

the

astronomer,

in

the

early

19th

century.

Herschel

published

his

results

in

1800

before

the

Royal

Society

of

London.

Herschel

used

a

prism

to

refract

light

from

the

sun

and

detected

the

infrared,

beyond

the

red

part

of

the

spectrum,

through

an

increase

in

the

temperature

recorded

on

a

thermometer.

He

was

surprised

at

the

result

and

called

them

"Calorific

Rays".

The

term

'Infrared'

did

not

appear

until

late

in

the

19th

century.

The

discovery

of

infrared

radiation

is

ascribed

to

William

Herschel,

the

astronomer,

in

the

early

19th

century.

Herschel

published

his

results

in

1800

before

the

Royal

Society

of

London.

Herschel

used

a

prism

to

refract

light

from

the

sun

and

detected

the

infrared,

beyond

the

red

part

of

the

spectrum,

through

an

increase

in

the

temperature

recorded

on

a

thermometer.

He

was

surprised

at

the

result

and

called

them

"Calorific

Rays".

The

term

'Infrared'

did

not

appear

until

late

in

the

19th

century.AT89S52AT89S52是美國ATMEL公司生產(chǎn)的低電壓,高性能CMOS8位單片機(jī),片內(nèi)含8kbytes的可反復(fù)擦寫的只讀程序存儲(chǔ)器(PEROM)和256bytes的隨機(jī)存取數(shù)據(jù)存儲(chǔ)器(RAM)器件采用ATMEL公司的高密度、非易失性存儲(chǔ)技術(shù)生產(chǎn),與標(biāo)準(zhǔn)MCS-51指令系統(tǒng)及8052產(chǎn)品引腳兼容,片內(nèi)置通用8位中央處理器(CPU)和Flash存儲(chǔ)單元,功能強(qiáng)大AT89S52單片機(jī)適合于許多較為復(fù)雜控制應(yīng)用場合。主要性能參數(shù)有·與MCS-51產(chǎn)品指令和引腳完全兼容·8k字節(jié)可重擦寫Flash閃速存儲(chǔ)器·1000次擦寫周期·全靜態(tài)操作:0Hz-24MHz·三級加密程序存儲(chǔ)器·256×8字節(jié)內(nèi)部RAM·32個(gè)可編程I/O口線·3個(gè)16位定時(shí)/計(jì)數(shù)器·8個(gè)中斷源·可編程串行UART通道·低功耗空閑和掉電模式功能特性概述:AT89S52提供以下標(biāo)準(zhǔn)功能:8k字節(jié)Flash閃速存儲(chǔ)器,256字節(jié)內(nèi)部RAM,32個(gè)I/O口線,3個(gè)16位定時(shí)/計(jì)數(shù)器,一個(gè)6向量兩級中斷結(jié)構(gòu),一個(gè)全雙工串行通信口,片內(nèi)振蕩器及時(shí)鐘電路。同時(shí),AT89S52可降至0Hz的靜態(tài)邏輯操作,并支持兩種軟件可選的節(jié)電工作模式??臻e方式停止CPU的工作,但允許RAM,定時(shí)/計(jì)數(shù)器,串行通信口及中斷系統(tǒng)繼續(xù)工作。掉電方式保存RAM中的內(nèi)容,但振蕩器停止工作并禁止其它所有部件工作直到下一個(gè)硬件復(fù)位?!0口:P0口是一組8位漏極開路型雙向I/O口,也即地址/數(shù)據(jù)總線復(fù)用口。作為輸出口用時(shí),每位能吸收電流的方式驅(qū)動(dòng)8個(gè)TTL邏輯門電路,對端口P0寫“l(fā)”時(shí),可作為高阻抗輸入端用。在訪問外部數(shù)據(jù)存儲(chǔ)器或程序存儲(chǔ)器時(shí),這組口線分時(shí)轉(zhuǎn)換地址(低8位)和數(shù)據(jù)總線復(fù)用,在訪問期間激活內(nèi)部上拉電阻。在Flash編程時(shí),P0口接收指令字節(jié)。而在程序校驗(yàn)時(shí),輸出指令字節(jié),校驗(yàn)時(shí),要求外接上拉電阻?!1口:P1是一個(gè)帶內(nèi)部上拉電阻的8位雙向I/O口,P1的輸出緩沖級可驅(qū)動(dòng)(吸收或輸出電流)4個(gè)TTL邏輯門電路。對端口寫“l(fā)”,通過內(nèi)部的上拉電阻把端口拉到高電平,此時(shí)可作輸入口。作輸入口使用時(shí),因?yàn)閮?nèi)部存在上拉電阻,某個(gè)引腳被外部信號(hào)拉低時(shí)會(huì)輸出一個(gè)電流()。與AT89C5l不同之處是,P1.0和P1.1還可分別作為定時(shí)/計(jì)數(shù)器2的外部計(jì)數(shù)輸入(P1.0/T2)和輸入(P1.1/T2EX)。Flash編程和程序校驗(yàn)期間,Pl接收低8位地址?!2口:P2是一個(gè)帶有內(nèi)部上拉電阻的8位雙向I/O口,P2的輸出緩沖級可驅(qū)動(dòng)(吸收或輸出電流)4個(gè)TTL邏輯門電路。對端口P2寫“l(fā)”,通過內(nèi)部的上拉電阻把端口拉到高電平,此時(shí)可作輸入口,作輸入口使用時(shí),因?yàn)閮?nèi)部存在上拉電阻,某個(gè)引腳被外部信號(hào)拉低時(shí)會(huì)輸出一個(gè)電流()。在訪問外部程序存儲(chǔ)器或16位地址的外部數(shù)據(jù)存儲(chǔ)器(例如執(zhí)行MOVX@DPTR指令)時(shí),P2口送出高8位地址數(shù)據(jù)。在訪問8位地址的外部數(shù)據(jù)存儲(chǔ)器(如執(zhí)行MOVX@RI指令)時(shí),P2口輸出P2鎖存器的內(nèi)容。Flash編程或校驗(yàn)時(shí),P2亦接收高位地址和一些控制信號(hào)?!3口:P3口是一組帶有內(nèi)部上拉電阻的8位雙向I/O口。P3口輸出緩沖級可驅(qū)動(dòng)(吸收或輸出電流)4個(gè)TTL邏輯門電路。對P3口寫入“l(fā)”時(shí),它們被內(nèi)部上拉電阻拉高并可作為輸入端口。此時(shí),被外部拉低的P3口將用上拉電阻輸出電流()。P3口除了作為一般的I/0口線外,更重要的用途是它的第二功能,。此外,P3口還接收一些用于Flash閃速存儲(chǔ)器編程和程序校驗(yàn)的控制信號(hào)?!ST:復(fù)位輸入。當(dāng)振蕩器工作時(shí),RST引腳出現(xiàn)兩個(gè)機(jī)器周期以上高電平將使單片機(jī)復(fù)位?!LE/:當(dāng)訪問外部程序存儲(chǔ)器或數(shù)據(jù)存儲(chǔ)器時(shí),ALE(地址鎖存允許)輸出脈沖用于鎖存地址的低8位字節(jié)。一般情況下,ALE仍以時(shí)鐘振蕩頻率的l/6輸出固定的脈沖信號(hào),因此它可對外輸出時(shí)鐘或用于定時(shí)目的。要注意的是:每當(dāng)訪問外部數(shù)據(jù)存儲(chǔ)器時(shí)將跳過一個(gè)ALE脈沖。對Flash存儲(chǔ)器編程期間,該引腳還用于輸入編程脈沖()。如有必要,可通過對特殊功能寄存器(SFR)區(qū)中的8EH單元的D0位置位,可禁止ALE操作。該位置位后,只有一條MOVX和MOVC指令才能將ALE激活。此外,該引腳會(huì)被微弱拉高,單片機(jī)執(zhí)行外部程序時(shí),應(yīng)設(shè)置ALE禁止位無效?!ぃ撼绦騼?chǔ)存允許()輸出是外部程序存儲(chǔ)器的讀選通信號(hào),當(dāng)AT89S52由外部程序存儲(chǔ)器取指令(或數(shù)據(jù))時(shí),每個(gè)機(jī)器周期兩次有效,即輸出兩個(gè)脈沖。在此期間,當(dāng)訪問外部數(shù)據(jù)存儲(chǔ)器,將跳過兩次信號(hào)?!?VPP:外部訪問允許。欲使CPU僅訪問外部程序存儲(chǔ)器(地址為0000H—FFFFH),端必須保持低電平(接地)。需注意的是:如果加密位LB1被編程,復(fù)位時(shí)內(nèi)部會(huì)鎖存EA端狀態(tài)。如EA端為高電平(接Vcc端),CPU則執(zhí)行內(nèi)部程序存儲(chǔ)器中的指令。Flash存儲(chǔ)器編程時(shí),該引腳加上+12V的編程允許電源Vpp,當(dāng)然這必須是該器件是使用12V編程電壓Vpp?!TAL1:振蕩器反相放大器的及內(nèi)部時(shí)鐘發(fā)生器的輸入端?!TAL2:振蕩器反相放大器的輸出端?!ぬ厥夤δ芗拇嫫鳎涸贏T89S52片內(nèi)存儲(chǔ)器中,80H-FFH共128個(gè)單元為特殊功能寄存器(SFR)。并非所有的地址都被定義,從80H-FFH共128個(gè)字節(jié)只有一部分被定義,還有相當(dāng)一部分沒有定義。對沒有定義的單元讀寫將是無效的讀出的數(shù)值將不確定,而寫入的數(shù)據(jù)也將丟失。不應(yīng)將數(shù)據(jù)“1”寫入未定義的單元,由于這些單元在將來的產(chǎn)品中可能賦予新的功能,在這種情況下,復(fù)位后這些單元數(shù)值總是“0”。AT89S52除了與AT89C51所有的定時(shí)/計(jì)數(shù)器0和定時(shí)/計(jì)數(shù)器l外還增加了一個(gè)定時(shí)/計(jì)數(shù)器2。定時(shí)/計(jì)數(shù)器2的控制和狀態(tài)位位于T2CON。T2MOD寄存器對(RCA02H、RCAP2L)是定時(shí)器2在16位捕獲方式或16位自動(dòng)重裝載方式下的捕獲/自動(dòng)重裝載寄存器?!ぶ袛嗉拇嫫鳎篈T89S52有6個(gè)中斷源,2個(gè)中斷優(yōu)先級IE寄存器控制各中斷位,IP寄存器中6個(gè)中斷源的每一個(gè)可定為2個(gè)優(yōu)先級。數(shù)據(jù)存儲(chǔ)器:AT89S52有256個(gè)字節(jié)的內(nèi)部RAM,80H-FFH高128個(gè)字節(jié)與特殊功能寄存器(SFR)地址是重疊的,也就是高128字節(jié)的RAM和特殊功能寄存器的地址是相同的,但物理上它們是分開的。當(dāng)一條指令訪問7FH以上的內(nèi)部地址單元時(shí),指令中使用的尋址方式是不同的,也即尋址方式?jīng)Q定是訪問高128字節(jié)RAM還是訪問特殊功能寄存器。如果指令是直接尋址方式則為訪問特殊功能寄存器。例如直接尋址指令訪問特殊功能寄存器0A0H,即P2口地址單元。MOV0A0H,#data間接尋址指令訪問高128字節(jié)RAM例如下面的間接尋址指令中R0的內(nèi)容為0A0H則訪問數(shù)據(jù)字節(jié)地址為0A0H而不是P2口(0A0H)。MOV@R0,#data堆棧操作也是間接尋址方式所以高128位數(shù)據(jù)RAM亦可作為堆棧區(qū)使用。紅外光紅外(IR)是一種比可見光的波長還長的電磁輻射,從可見紅光在0.74

微米(

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論