自动化专业外文翻译--单片机基础

外文原文

A: Fundamentals of Single-chip Microcomputer

Th e s i n gl e-chi p m i cr o co m p ut er i s t h e cul m i n a t i o n of bot h t h e d e v el opm e nt o f t he di gi t a l c om p ut e r a n d t h e i n t e gr a t ed ci r cu i t a rgu a b l y t h e t ow m o st si gn i fi c ant i nv en t i on s of t h e 20t h ce n t u r y

T h es e t ow t yp e s o f a r chi t ec t u r e a re f ou nd i n s i n gl e-c hi p m i c r o com pu t e r.S om e e m p l o y t h e s pl i t p r o gr am/d at a m e m or y o f t h e H ar v a rd a r ch i t e c t ur e, ot h e rs fol l o w t h e ph i l os o ph y,wi d el y a d a pt ed f or ge n e r al-pu rp os e co m p ut er s an d m i c r op ro c es s o r s,o f m a ki n g no l o gi c a l d i st i n ct i o n b et w een pr o gr am an d d at a m em o r y a s i n t h e P r i n c et on a r c hi t ec t u r e, s ho w n i n Fi g.3-5A-2.

In ge n e r a l t e rm s a s i n gl e-chi p m i c ro co m p ut e r i s ch a r ac t e r i z ed b y t h e i n c o rp or a t i on o f al l t h e u ni t s o f a c om p ut e r i nt o a s i n gl e d e vi c e.

Read only memory (ROM)

R OM i s us ua l l y f o r t h e p er m an e nt,no n-vo l at i l e s t o ra ge o f a n a p pl i c a t i o ns p r o gr am .M an y m i c ro co m p ut e rs an d m i c ro c on t rol l ers a r e i n t en de d fo r h i gh-v ol u m e a pp l i c at i on s an d he n c e t h e e c o no m i c al m a nu f ac t ur e o f t h e d evi c es r e qui r es t h at t h e c o nt e nt s o f t h e p ro gr a m m e m or y b e c o m m i t t e d p er m a n en t l y d u r i n g t he m a nu f a ct ur e o f chi p s . C l e a rl y, t hi s i m pl i e s a r i go ro us ap p ro a c h t o R OM co d e d ev el op m ent s i n c e c h ange s c a nn ot b e m a d e af t er m a nu f a ct ur e.T hi s d e v el o pm e nt p r o ce s s m a y i n v ol v e em ul at i on u si n g a so ph i s t i ca t e d d ev el op m ent s ys t em wi t h a h a rd w a re e m ul at i on ca p ab i l i t y a s w el l a s t h e u s e of p ow e r fu l s o ft w ar e t ool s.

S om e m a nu f a ct ur er s p ro vi de ad di t i o n al R O M opt i o ns b y i n cl u di n g i n t h ei r r a n ge d evi c e s wi t h (o r i nt e nd e d fo r u s e wi t h) u s e r p r o gr am m a bl e m e m o r y.T he si m pl es t o f t h es e i s u s u al l y d e vi c e wh i ch c an op e r at e i n a m i c ro pro c e s s or m o d e b y u s i n g so m e o f t h e i np ut/o ut p ut l i n es a s an a dd r ess a nd d at a bu s f o r a c c e ss i n g ex t er n al m em o r y.T hi s t yp e o f d ev i ce c a n b e ha v e f un c t i on al l y a s t h e si n gl e chi p m i cr o c om p ut e r f r om wh i ch i t i s d er i v e d al b e i t w i t h r e st ri c t ed I/O an d a m od i f i ed ex t er n al c i r c ui t. T h e u s e o f t h es e R OM l ess d ev i c es i s c om m on e v en i n pr o du ct i o n ci r cu i t s w h e r e t h e v ol um e d o es n ot j us t i f y t h e d ev e l o pm e n t c os t s o f cu s t om on-ch i p R OM[2];t he r e c a n s t i l l be a si gni fi c an t s avi n g i n I/O an d ot h er c h i p s c om p ar e d t o a c on v en t i o n al m i c ro p ro c es so r ba s ed c i r c ui t. M o r e ex a c t r ep l ac em e nt f o r R O M de vi c es c an b e o bt ai ne d i n t h e f o rm o f v a ri a nt s wi t h 'pi gg y-b a c k' E P R OM(E ra s ab l e p ro gr a m m a bl e R OM)so ck e t s or de v i ce s wi t h EP R OM i n s t e ad o f R O M 。Th es e d e vi c es a re n a t u r al l y m o r e ex p en si v e t h a n e qu i v al e nt R OM d e vi c e, b ut d o p ro vi d e c om p l et e c i r c ui t eq ui v al e nt s. EP R O M b as ed d evi c es a r e al s o ex t r e m e l y at t r a ct i v e fo r l o w-v ol um e ap pl i c at i on s wh e r e t h e y p r o vi d e t h e ad v an t a ges o f a si ngl e-c hi p d e vi c e, i n t e rm s o f

o n-chi p I/O,et c. ,wi t h t h e c on ve n i en c e o f fl ex i b l e us er p r o gr am m a bi l i t y.

Random access memory (RAM).

R AM i s fo r t h e s t o r a ge o f w o rki n g v a ri a bl es a nd d a t a us e d d u ri n g p ro gr a m ex e c u t i o n.T h e si z e o f t hi s m em o r y v a r i es wi t h

d e vi c e t yp e b u t i t h a s t h e s a m e c h ar ac t e ri s t i c wi d t h(4,8,16b i t s

e t c.)as t he pr o c es s o r ,S p e ci a l

f un ct i o n r e gi s t er s,s u ch a s s t a c k p oi nt e r o r t i m e r r egi s t e r a r e o ft en l o gi c al l y i n c or po r at e d i nt o t he R AM a r e a. It i s al s o c om m o n i n H a rd t yp e m i c r o com pu t ers t o t r e at t h e R AM a re a as a c o l l e ct i on o f r e gi s t e r; i t i s u nn e c e s s a ry t o m a ke d i st i n ct i o n b e t w e en R AM an d pr o c ess o r r e gi s t e r as i s do n e i n t h e c a s e o f a m i c ro p roc e s so r s ys t e m si nce R AM an d r e gi s t er s a r e no t u su a l l y p h ys i c a l l y s e p a ra t ed i n a m i c ro c om put e r .

Central processing unit (CPU).

Th e C P U i s m u c h l i ke t h at o f a n y m i c ro p ro c es s or.M an y a p pl i c a t i o ns of m i c r o c om p ut e rs an d m i c r o co nt ro l l e rs i nv ol v e t he h a nd l i n g o f bi n a ry-c o d e d d e ci m al(B C D)d at a(f o r nu m er i cal d i s pl a ys, f o r ex a m pl e) ,h en c e i t i s com m on t o fi n d t h a t t he C P U i s w e l l a d ap t e d t o h an dl i n g t hi s t yp e o f d at a .It i s al s o com m o n t o f i nd goo d f a ci l i t i es fo r t es t i n g, s et t i n g a n d r es e t t i n g i n di vi du al b i t s o f m em o r y o r I/O s i n c e m a n y c on t rol l er a pp l i c at i ons i n vo l v e t h e t u r ni n g o n an d o ff of si n gl e out pu t l i n es o r t h e r e ad i n g t h e s i n gl e l i ne. T h es e l i n es ar e r ea di l y i n t e r f a c e d t o t wo-s t at e d ev i ces s u ch a s s wi t c h es,t h er m o st at s,s ol i d-s t at e re l a ys,v a l v es,m ot o r, e t c.

Parallel input/output.

P a r al l el i n pu t an d o ut pu t s ch e m e s v a r y s o m ew h at i n d i ffe r e nt m i c r o com pu t er;i n m os t a m e ch a ni sm i s p ro vi de d t o at l ea s t a l l o w s om e f l ex i bi l i t y o f c h oo s i n g w hi c h pi ns a r e out pu t s a nd wh i ch ar e i np ut s.T hi s m a y a p pl y t o al l o r s o m e o f t h e po rt s.S om e I/O l i n es a r e s ui t a bl e f o r di r e ct i n t er f a ci n g t o, f o r ex am pl e, fl u o r es c en t d i s pl a ys,o r c a n pr o vi de s u ffi ci en t cu r r e nt t o m a k e i nt e r f a c i n g o t h e r c om po n ent s s t r ai gh t f o rw a r d. S om e d e vi c es a l l ow an I/O po rt t o b e co nf i gu re d as a s ys t e m bu s t o al l o w o ff-c hi p m e m o ry a n d I/O ex p an si on. Th i s f ac i l i t y i s p ot e nt i al l y u s e f u l a s a p ro du c t r a n ge d e v el o p s,s i n c e s u cc e s si v e en h an c em en t s m a y b e c o m e t oo bi g fo r o n-chi p m em or y a n d i t i s u nd e si r abl e n ot t o bu i l d on t h e ex i s t i n g s o ft w ar e b a s e.

Serial input/output .

S e ri al c om m uni c a t i on wi t h t e rm i na l de vi c es i s co m m o n m e an s o f p ro vi d i n g a l i nk us i n g a sm al l n um b er o f l i n es.T hi s s o rt of c o m m u ni c at i o n can a l s o b e ex pl oi t e d f o r i n t er f a ci n g s p e ci al f u n ct i on c hi p s o r l i nk i n g s ev e r al m i cr o c om p ut e rs t o ge t he r.B ot h t h e c om m on as yn c h r on ou s s yn c h r o nou s c om m un i ca t i on s ch em e s

r e q ui r e p r ot oc ol s t h at p ro vi de fr a m i n g (s t a rt a nd st op) i n fo rm at i o n .Thi s c a n be i m p l em ent ed a s a ha r dw a r e fa c i l i t y o r U(S)ART(U n i v e rs al(s yn c h r o no us)as yn c h r on ou s r e c e i v e r/t r a nsm i t t er)r el i e vi n g t h e p roc e s so r(a nd t h e a ppl i c a t i o ns p r o gr am m e r) o f t hi s l ow-l e v el, t i m e-co ns um i n g, d et ai l. t i s m e r el y n e c e ss a r y t o s el e ct e d a b au d-r at e an d p os s i b l y o t h e r o pt i on s (n um be r o f s t o p bi t s, p a ri t y, e t c.) a nd l o a d (o r r e ad f rom) t h e s e ri a l t r an s m i t t e r (o r r ece i v er) bu ff e r. S er i a l i z a t i o n o f t h e d at a i n t h e a p p ro p ri at e f or m at i s t h en h a nd l e d b y t h e h ar d wa r e ci r cui t.

Timing/counter facilities.

M a n y a p p l i c at i o n of s i n gl e-c hi p m i c r o com pu t er s r eq ui r e

a c c u r at e e v al u at i on o f el a ps e d r e al t i m e .T hi s c an

b e d e t er m i n ed

b y

c a r e f u l as s es sm e n t of t h e ex e c ut i on t i m e o f e a ch b r anc h i n a

p r o gr am b ut t h i s r ap i d l y b e c o m es i n e ff i ci e nt f o r al l but s i m pl e s t

p r o gr am s .T h e p re fe r r e d a pp r oa c h i s t o us e t i m e r c i r c ui t t h at c a n i nd e p en de nt l y c o u nt p r e ci se t i m e i n c r em e nt s an d ge n e r at e a n

i nt e r ru pt a ft e r a p re s et t i m e h as e l ap s e d .Th i s t yp e o f t i m e r i s

u su a l l y a r r a n ge d t o b e r el o ad a bl e wi t h t h e r e qu i r e d c ou nt .Th e

t i m e r t h en d e c r em en t s t hi s v al u e p ro du c i n g a n i nt e r ru pt o r s et t i n g a fl a g ,w he n t h e co u nt er re a c h es z e ro. B et t e r t i m e rs t h e n h av e t h e a b i l i t y t o au t om at i c a l l y r e l o ad t he i ni t i a l c ou nt v al u e. Th i s

r e l i e v es t h e p ro gr a m m e r o f t h e re s p ons i bi l i t y o f r el o adi ng t h e

c o un t er an

d a ss es si n g

e l ap se d t i m e b e fo r e t h e t i m er

r e st a rt e d ,whi c h ot h e r wi s e wo un d b e n e c e s s a r y i f c ont i nu o us

p r e ci s el y t i m ed i nt e r r u pt s w e r e r e qu i re d(as i n a cl o ck ,fo r

ex a m pl e).S om e t i m es as s o ci a t e d wi t h t i m e r i s an e v en t c o un t e r.

Wi t h t h i s f a ci l i t y t h e r e i s u su al l y a s pe c i al i np ut pi n , t ha t ca n

d r i v

e t h e co unt e r di r e ct l y.

Timing components.

Th e cl o ck ci r cu i t r y o f m ost m i c r o c om p ut e rs r e qui r es on l y s i m pl e t i m i n g c om po n en t s. If m ax i m um p e r fo rm a n ce i s re q ui r ed, a c r ys t a l m u s t b e use d t o e ns ur e t he m ax i m u m cl o ck fr e qu e n c y i s a p p ro a ch e d b ut n ot ex c e e de d. Ma n y c l o c k ci r cu i t s al s o wo rk wi t h a r e si st or a nd c a p a ci t o r as l o w-c ost t i m i n g com po n en t s o r c a n b e d r i v en fr om a n ex t er n al s ou r c e. T hi s l at t e r a r r an ge m e nt i s u s e ful i s ex t er n al s yn c h r o ni z a t i on o f t he m i c r o co m p ut e r i s r e qui r e d.

中文译文

单片机基础

单片机是电脑和集成电路发展的巅峰,有据可查的是他们也是20世纪最有意义的两大发明。

这两种特性在单片机中得到了充分的体现。一些厂家用这两种特性区分程序内存和数据内存在硬件中的特性,依据同样的原理广泛的适用于一般目的的电脑和微电脑,一些厂家在程序内存和数据内存之间不区分的像Pr in ce to n特性。

只读存贮器(R O M)

RO M是通常的永久性的,非应用程序的易失性存储器。不少微机和单片机用于大批量应用,因此,经济的设备制造要求的程序存储器的内容是在制造期间永久性的刻录在芯片中,这意味着严谨的方法,因为修改RO M代码不能制造之后发展。这一发展过程可能涉及仿真,使用硬件仿真功能以及强大的软件工具使用先进的开发系统。

一些制造商在其提供的设备包括的范围(或拟使用)用户可编程内存.其中最简单的通常是设备能够运行于微处理器模式通过使用一些输入/输出作为地址线额外的RO M选项和数据总线访问外部内存.这种类型的设备可以表现为单芯片微型计算机尽管有限制的I / O和外部修改这些设备的电路.小内存装置的应用是非常普遍的在永久性内存的制造中[2];但仍然可以在我节省大量成本I/O和其它芯片相比,传统的基于微处理器电路.更准确的RO M设备更换,可在与'形式变种背驮式'E PR OM(可擦除可编程只读存储器)插座或存储器,而不是RO M器件。这些器件自然价格比同等RO M设备贵,但不提供完整的等效电路.EP R OM的设备也非常有吸引力对于低容量应用中,他们提供的单芯片器件的优势,在以下方面的板载I / O等,在灵活的用户可编程带来的便利。

随机存取存储器(R A M)

R A M用于变量和工作在程序使用该存储器的执行.随数据存储设备的大小不同类型而有所不同,但具有相同的特征宽度(4,8,16 比特等)作为处理器。特殊功能寄存器,如栈指针或定时器寄存器,往往逻辑纳入内存区域.它也在型微电脑的硬件中做集中内存,它是不必要的区分内存和处理器之间的区别在通常不物理上分开的微机中。

中央处理单元(C PU)

C P U是很象微型电子计算机和微控制器的任何微电脑.许多微电脑和微控制器涉及到二进制编码(十进制处理(B CD)的数据为例)数字显示,因而,常常可以发现该CP U是很适合处理这种类型的数据。对设施良好与否进行的测试,设置和重置单个位的内存或I / O控制器的应用程序,也是常见的因为许多涉及打开和关闭的单输出线或在单线.这些线很容易连接到二进制的设备,如开关,恒温器,固态继电器,阀门,电机等

并行输入/输出

并行输入和输出的计划有所不同,在不同的微机,在大多数设立一个机制,至少选择让其中一些引脚输出,一些引脚输如是非常灵活的。这可能适用于所有或端口.有些I /O线直接连接到适当的设备,例如,荧光显示器,也可以提供足够的电流,使接口和其他设备直接相连.一些设备允许一个I / O端口,其他组件将作为系统总线配置为允许片外存储器和I / O扩展。这个设施是潜在有用的一个产品系列的发展,因为连续增强可能成为太上存储器,这是不可取的,不是建立在现有的软件基础上的。串行输入/输出

串行通信是指与终端设备的链接使用少量的通讯线.这种通讯也可利用特殊的接口连接功能芯片使几个微型机连在一起。双方共同异步同步通信方案要求的规则提供成帧(启动和停止)的信息。这可以作为一个硬件设施或U(拧)艺术(通用执行(同步)异步接收器/发送器)减轻处理器(和应用程序)的这种低层次的确费时.它也只需要选择一个波特率及其他可能的选择(停止位,奇偶校验等)和负载号码(或读取),串行发送器(或接收)的缓冲器.进行适当的格式的数据串行处理,然后由硬件电路完成。

定时/计数器设施

许多应用的单片机需要对过去的真实时间准确的评价。这可以由每个程序中的执行时间分支认真评估,但除最简单的程序外,他的工作效率不高。首选方法是使用计时器电路,能独立计算精确的时间增量,并生成一个预设的时间后中断的时间。这种类型的定时器通常在所要求的数量可重载中应用。计时器然后减少此值产生中断或设置标记时,计数器到达零.更好的计时器有自动加载初始值的功能。这将缓解重新加载计数器和评估所用的时间,计时器重新启动之前这是必要的。有时候与定时器相关的是一个事件计数器。这个设备通常有一个特殊的输入引脚,可直接驱动计数器。

定时元件

大多数微型计算机时钟电路只需要简单的计时元件.如果要求最高性能,必须使用晶体以确保最大时钟频率接近,但不会超出。许多时钟电路,还具有电阻和低电容工作成本定时元件,也可以从外部源驱动。这后一种安排是有用的在微机外部同步是必需的时候。

相关文档
最新文档