毕业设计说明书外文文献及翻译.docx
- 文档编号:12053881
- 上传时间:2023-04-16
- 格式:DOCX
- 页数:22
- 大小:30.98KB
毕业设计说明书外文文献及翻译.docx
《毕业设计说明书外文文献及翻译.docx》由会员分享,可在线阅读,更多相关《毕业设计说明书外文文献及翻译.docx(22页珍藏版)》请在冰豆网上搜索。
毕业设计说明书外文文献及翻译
外文文献:
EmbeddedSystemsDesignusingtheTIMSP430Series(selection)
Thisbookisintendedfortheembeddedengineerwhoisnewtothefield,andasanintroductionandreferenceforthoseexperiencedwithmicro-controllerdevelopment,butarenewtotheMSP430familyofdevices.Ihaveassumedthatthereaderhassomeexperiencewithmicrocontroller-baseddesign,eitherprofessionallyoracademically.Asanexample,thebookde-scribesinterruptfunctionalityindetail,butassumesthatyou,thereader,alreadyknowwhataninterruptisandhowtouseit.Itisalsoimportanttonotethat,whilemuchoftheinformationinthisbookisidenticaltothatwhichisavailablefromtheTIdocumentation,thisbookisintendedtosupplement,notreplacethatvaluablesourceofinformation.TheUsersGuidesandApplicationNotestogetherofferadepthandbreadthoftechnicalinformationthatwouldbedifficulttoreplicateinasinglesource.Theintentofthisbookistohighlightsomeofthemostcommonlyusedinformation,alongwithsomehelpfulsuggestionsandrulesofthumb.
TheMSP430Family
TheMSP430familyisabroadfamilyoflowpower,featurerich16-bitmicrocontrollersfromTexasInstruments.Theyshareacommon,RISC-type,NeumannCPUcore.The'430iscompetitiveinpricewiththe8-bitcontrollermarket,andsupportsboth8and16-bitinstructions,allowingmigrationfrommostsimilarlysizedplatforms.
Thefamilyofdevicesrangesfromtheverysmall(1kROM,128bytesforRAM,sub-dollar)uptolarger(60kROM,2kRAM,withpricesinthe$10range)devices.Currently,thereareatleast40flavorsavailable,withmorebeingaddedregularly.Thedevicesaresplitintothreefamilies:
theMSP430x3xx,whichisabasicunit,theMSP430x1xx,whichisamorefeature-richfamily,andtheMSP430x4xx,whichissimilartothe'1xx,withabuiltinLCDdriver.Youwillfindthesereferredtoas'1xx,'3xx,and'4xxdevicesthroughoutthisbook.
PartNumberingConvention
PartnumbersforMSP430devicesaredeterminedbasedontheircapabilities.Alldevicepartnumbersfollowthefollowingtemplate:
MSP430MtFaFbMc
M:
MemoryType
C:
ROM
F:
Flash
P:
OTP
E:
EPROM(fordevelopmentaluse.Therearefewofthese.)
Fa,Fb:
FamilyandFeatures
10,11:
Basic
12,13:
HardwareUART
14:
HardwareUART,HardwareMultiplier
31,32:
LCDController
33:
LCDController,HardwareUART,HardwareMultiplier
41:
LCDController
43:
LCDController,HardwareUART
44:
LCDController,HardwareUART,HardwareMultiplier
Mc:
MemoryCapacity
0:
1kbROM,128bRAM
1:
2kbROM,128bRAM
2:
4kbROM,256bRAM
3:
8kbROM,256bRAM
4:
12kbROM,512bRAM
5:
16kbROM,512bRAM
6:
24kbROM,1kbRAM
7:
32kbROM,1kbRAM
8:
48kbROM,2kbRAM
9:
60kbROM,2kbRAM
Example:
TheMSP430F435isaFlashmemorydevicewithanLCDcontroller,ahardwareUART,16kbofcodememory,and512bytesofRAM.
Thepartnumberingschemedescribedaboveisabitfragmented.Therearecommonfeaturesnotconsistentlyrepresented(typeofADC,numberoftimers,etc),andtherearesomeotherinconsistencies(forexample,the33familyhasthemultiplier,butthe13and43sdonot).Iwouldrecommendagainstselectingpartsbasedontheirnumberingscheme.Rather,onceyouhaveavagueideaofyourrequirements,gototheTIwebsite(www.TI.com),andusetheirparametricsortfeature.
Architecture:
CPUandMemory
Asdiscussedinchapter1,theMSP430utilizesa16-bitRISCarchitecture,whichiscapableofprocessinginstructionsoneitherbytesorwords.TheCPUisidenticalforallmembersofthe'430family.Itconsistsofa3-stageinstructionpipeline,instructiondecoding,a16-bitALU,fourdedicated-useregisters,andtwelveworking(orscratchpad)registers.TheCPUisconnectedtoitsmemorythroughtwo16-bitbusses,oneforaddressing,andtheotherfordata.Allmemory,includingRAM,ROM,informationmemory,specialfunctionregisters,andperipheralregistersaremappedintoasingle,contiguousaddressspace.
Thisarchitectureisuniqueforseveralreasons.First,thedesignersatTexasInstrumentshaveleftanawfullotofspaceforfuturedevelopment.AlmosthalftheStatusRegisterremainsavailableforfuturegrowth,roughlyhalfoftheperipheralregisterspaceisunused,andonlysixofthesixteenavailablespecialfunctionregistersareimplemented.
Second,thereareplentyofworkingregisters.Afteryearsofhavingoneortwoworkingregisters,Igreatlyenjoyedmyfirstexperiencewiththetwelve16-bitCPUscratchpads.Theprogrammingstyleisslightlydifferent,andcanbemuchmoreefficient,especiallyinthehandsofaprogrammerwhoknowshowtousethisfeaturetoitsfullest.
Third,thisarchitectureisdeceptivelystraightforward.Itisveryflexible,andtheaddressingmodesaremorecomplicatedthanmostothersmallprocessors.But,beyondthat,thisarchitectureissimple,efficientandclean.Therearetwobusses,asinglelinearmemoryspace,arathervanillaprocessorcore,andallperipheralsarememory-mapped.
CPUFeatures
TheALU
The'430processorincludesaprettytypicalALU(arithmeticlogicunit).TheALUhandlesaddition,subtraction,comparisonandlogical(AND,OR,XOR)operations.ALUoperationscanaffecttheoverflow,zero,negative,andcarryflags.Thehardwaremultiplier,whichisnotavailableinalldevices,isimplementedasaperipheraldevice,andisnotpartoftheALU(seeChapter6).
WorkingRegisters
The'430givesthedevelopertwelve16-bitworkingregisters,R4throughR15.(R0throughR3areusedforotherfunctions,asdescribedlater.)Theyareusedforregistermodeoperations(seeAddressingModes,Chapter8),whicharemuchmoreefficientthanoperationswhichrequirememoryaccess.Someguidelinesfortheiruse:
Usetheseregistersasmuchaspossible.Anyvariablewhichisaccessedoftenshouldresideinoneoftheselocations,forthesakeofefficiency.
Generallyspeaking,youmayselectanyoftheseregistersforanypurpose,eitherdataoraddress.However,somedevelopmenttoolswillreserveR4andR5fordebuginformation.Differentcompilerswillusetheseregistersindifferentfashions,aswell.Understandyourtools.
Beconsistentaboutuseoftheworkingregisters.Clearlydocumenttheiruse.Ihavecode,writtenabout8monthsago,thatperformsextensiveoperationsonR8,R9,andR15.Unfortunately,Idon'tknowtodaywhatthevaluesinR8,R9andR15represent.ThiswascodeIwrotetoquicklyvalidateanalgorithm,ratherthanproductioncode,soIdidn'tdocumentitsufficiently.Now,itisrelativegibberish.Don'tletthishappentoyou.Nomatterhowobviousortrivialregisteruseseems,documentitanyway.
ConstantGenerators
R2andR3functionasconstantgenerators,sothatregistermodemaybeusedinsteadofimmediatemodeforsomecommonconstants.(R2isadualuseregister.ItservesastheStatusRegister,aswell.)Generatedconstantsincludesomecommonsingle-bitvalues(0001h,0002h,0004h,and0008h),zero(0000h),andanall1sfield(0FFFFh).GenerationisbasedontheW(S)valueintheinstructionword,andisdescribedbythetablebelow.
W(S)valueinR2valueinR3
00————0000h
01(0)(absolutemode)0001h
100004h0002h
110008h0FFFFh
ProgramCounter
TheProgramCounterislocatedinR0.Sinceindividualmemorylocationaddressesare8-bit,butallinstructionsare16bit,thePCisconstrainedtoevennumbers(i.e.theLSBofthePCisalwayszero).Generallyspeaking,itisbesttoavoiddirectmanipulationofthePC.Oneexceptiontothisruleofthumbistheimplementationofaswitch,wherethecodejumpstoaspot,dependentonagivenvalue.(I.e.,ifvalue=0,jumptolocation0,ifvalue=1,jumptolocation1,etc.)ThisprocessisshowninExample3.1.
Example3.1SwitchStatementviaManualPCControl
Movvalue,R15;puttheswitchvalueintoR15
CmpR15,#8;rangechecking
Jgeoutofrange;ifR15>7,donotusePCswitch
Cmp#0,R15;morerangechecking
Jnoutofrange;
RlaR15;multiplyR15bytwo,sincePCisalwayseven
RlaR15;doubleR15again,sincesymbolicjmpis2wordslong
AddR15,PC;PCgoestoproperjump
Jmpvalue0
Jmpvalue1
Jmpvalue2
Jmpvalue3
Jmpvalue4
Jmpvalue5
Jmpvalue6
Jmpvalue7
Outofrange
JmpRangeError
Thisisarelativelycommonapproach,andmostCcompilerswillimplementswitchstatementswithsomethingsimilar.Whenimplementingthismanually(i.e.,inassemblylanguage),theprogrammerneedstokeepseveralthingsinmind:
Alwaysdoproperrangechecking.Intheexample,wecheckedforconditionsoutsidebothendsofthevalidrange.Ifthisisnotperformedcorrectly,thecodecanjumptoanunintendedlocation.
Paycloseattentiontotheaddressingmodesofthejumpstatements.TheseconddoublingofR15,priortotheaddstatement,isaddedbecausethejumpstatementrequirestwowordswhensymbolicmodeaddressingisused.
Becarefulthatnoneofyourinterrupthandlershavethepotentialtoaffectyourvalueregister(R15intheexample).Iftheinterrupthandlerneedstouseoneoftheseregisters,thehandlerneedstostorethevaluetoRAMfirst.ThemostcommonprocedureistopushtheregistertothestackatthebeginningoftheISR,andtopoptheregisterattheendoftheISR.(SeeExample3.2.)
Example3.2Push/PopCombinationinISR
Timer_A_Hi_Interrupt
PushR12;WewilluseR12
MovP1IN,R12;useR12asweplease
RlaR12
RlaR12
MovR12&BAR;DonewithR12
PopR12;RestorepreviousvaluetoR12
Reti;returnfrominterrupt
ORG0FFF0h
DWTimer_A_Hi_Interrupt
StatusRegister
TheStatusRegisterisimplementedinR2,andiscomprisedofvarioussystemflags.Theflagsarealldirectlyaccessiblebycode,andallbutthreeofthemarechangedautomaticallybytheprocessoritself.The7mostsig
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 毕业设计 说明书 外文 文献 翻译