外文翻译格式参考.docx
- 文档编号:3494096
- 上传时间:2022-11-23
- 格式:DOCX
- 页数:13
- 大小:350.76KB
外文翻译格式参考.docx
《外文翻译格式参考.docx》由会员分享,可在线阅读,更多相关《外文翻译格式参考.docx(13页珍藏版)》请在冰豆网上搜索。
外文翻译格式参考
IntroductiontoµC/GUI
µC/GUIisUniversalgraphicsoftwareforembeddedapplications.Itisdesignedtoprovideanefficient,processorandLCD-controllerindependentgraphicaluserinterfacetoanyapplicationusingagraphicalLCD.Itworksinsingleaswellasinmulti-taskenvironments.µC/GUIcanbeadaptedtoanalyzeofphysicalandvirtualdisplaywithanyLCD-controllerandCPU.
Itsdesignismodular,consistingofdifferentlayersindifferentmodules.Onelayer-calledtheLCD-driver-coversallaccesstotheLCD.µC/GUIworkswithallCPUs,sinceitiswrittenin100%ANSI-"C".
µC/GUIiswell-suitedformostapplicationsusingblack/whiteandcolorLCDs.Ithasaverygoodcolormanagementwhichallowsittohandlesgrayscales.µC/GUIalsofeaturesanextensive2-DgraphiclibraryandawindowmanagerwhichsupportswindowswhileusingaminimumofRAM.
1.1µC/GUIfeatures
µC/GUIisdesignedtoprovideanefficient,processor-andLCDcontroller-indepen-dentgraphicaluserinterfaceforanyapplicationthatoperateswithagraphicalLCD.Itiscompatiblewithsingle-taskandmultitaskenvironments,withaproprietaryoperatingsystemorwithanycommercialRTOS.µC/GUIisshippedas"C"sourcecode.ItmaybeadaptedtoanysizephysicalandvirtualdisplaywithanyLCDcon-trollerandCPU.Itsfeaturesincludethefollowing:
1.1.1General
Any8/16/32-bitCPU;onlyanANSI"C"compilerisrequired.
Any(monochrome,grayscaleorcolor)LCDwithanycontrollersupported(iftherightdriverisavailable).
MayworkwithoutLCDcontrolleronsmallerdisplays.
Anyinterfacesupportedusingconfigurationmacros.
Display-sizeconfigurable.
CharactersandbitmapsmaybewrittenatanypointontheLCD,notjustoneven-numberedbyteaddresses.
Routinesareoptimizedforbothsizeandspeed.
Compiletimeswitchesallowfordifferentoptimizations.
ForslowerLCDcontrollers,LCDcanbecachedinmemory,reducingaccesstoaminimumandresultinginveryhighspeed.
Clearstructure.
Virtualdisplaysupport;thevirtualdisplaycanbelargerthantheactualdisplay.
1.1.2Graphiclibrary
Bitmapsofdifferentcolordepthssupported.
Bitmapconverteravailable.
Absolutelynofloating-pointusage.
Fastline/pointdrawing(withoutfloating-pointusage).
Veryfastdrawingofcircles/polygons.
Differentdrawingmodes.
1.1.3Fonts
Avarietyofdifferentfontsareshippedwiththebasicsoftware:
4*6,6*8,6*9,8*8,8*9,8*16,8*17,8*18,24*32,andproportionalfontswithpixel-heightsof8,10,13,16.Formoreinformation,seeChapter25:
"StandardFonts".
Newfontscanbedefinedandsimplylinkedin.
Onlythefontsusedbytheapplicationareactuallylinkedtotheresultingexecut-able,resultinginminimumROMusage.
Fontsarefullyscalable,separatelyinXandY.
Fontconverteravailable;anyfontavailableonyourhostsystem(i.e.Microsoft
Windows)canbeconverted.
1.1.4String/valueoutputroutines
Routinestoshowvaluesindecimal,binary,hexadecimal,anyfont.
Routinestoeditvaluesindecimal,binary,hexadecimal,anyfont.
1.1.5Windowmanager(WM)
Completewindowmanagementincludingclipping.OverwritingofareasoutsideaWindow’sclientareaisimpossible.
Windowscanbemovedandresized.
Callbackroutinessupported(usageoptional).
WMusesminimumRAM(app.20bytesperwindow).
1.1.6OptionalwidgetsforPClookandfeel
Widgets(windowobjects,alsoknownascontrols)areavailable.TheygenerallyOperateautomaticallyandaresimpletouse.
Touch-screen&mousesupport
Forwindowobjectssuchasthebuttonwidget,µC/GUIofferstouch-screenand
Mousesupport.
1.1.7PCtools
Simulationplusviewer.
Bitmapconverter.
Fontconverter
1.2HowtoconnecttheLCDtothemicrocontroller
µC/GUIhandlesallaccesstotheLCD.VirtuallyanyLCDcontrollercanbesupported,independentlyofhowitisaccessed.Fordetails,pleaserefertoChapter20:
"Low-LevelConfiguration".Also,pleasegetincontactwithusifyourLCDcontrollerisnotsupported.WearecurrentlywritingdriversforallLCDcontrollersavailableonthemarketandmayalreadyhaveaprovendriverfortheLCDcontrollerthatyouintendtouse.Itisusuallyverysimpletowritetheroutines(ormacros)usedtoaccesstheLCDinyourapplication.MIcriumoffersthecustomizationservices,ifnecessarywithyourtargethardware.
ItdoesnotreallymatterhowtheLCDisconnectedtothesystemaslongasitissomehowaccessiblebysoftware,whichmaybeaccomplishedinavarietyofways.Mostoftheseinterfacesaresupportedbyadriverwhichissuppliedinsourcecodeform.Thisdriverdoesnotnormallyrequiremodifications,butisconfiguredforyourhardwarebymakingchangesinthefileLCDConf.h.DetailsabouthowtocustomizeadrivertoyourhardwareasnecessaryareexplainedinChapter22:
"LCDDrivers".ThemostcommonwaystoaccesstheLCDaredescribedasfollows.IfyousimplywanttounderstandhowtouseµC/GUI,youmayskipthissection.
1.2.1LCDwithmemory-mappedLCDcontroller:
TheLCDcontrollerisconnecteddirectlytothedatabusofthesystem,whichmeansthecontrollercanbeaccessedjustlikeaRAM.Thisisaveryefficientwayofaccess-ingtheLCDcontrollerandismostrecommended.TheLCDaddressesaredefinedtothesegmentLCDSEG,andinordertobeabletoaccesstheLCDthelinker/locatorsimplyneedstobetoldwheretolocatethissegment.Thelocationmustbeidenticaltotheaccessaddressinphysicaladdressspace.DriversareavailableforthistypeofinterfaceandfordifferentLCDcontrollers.
1.2.2LCDwithLCDcontrollerconnectedtoport/buffer
ForslowerLCDcontrollersusedonfastprocessors,theuseofport-linesmaybetheonlysolution.ThismethodofaccessingtheLCDhasthedisadvantageofbeingsome-whatslowerthandirectbus-interfacebut,particularlywithacachethatminimizestheaccessestotheLCD,theLCDupdateisnotsloweddownsignificantly.Allthatneedstobedoneistodefineroutinesormacroswhichsetorreadthehardwareports/buffersthattheLCDisconnectedto.ThistypeofinterfaceisalsosupportedbydifferentdriversforthedifferentLCDcontrollers.
1.2.3Proprietarysolutions:
LCDwithoutLCDcontroller
TheLCDcanalsobeconnectedwithoutanLCDcontroller.Inthiscase,theLCDdataisusuallysupplieddirectlybythecontrollerviaa4-or8-bitshiftregister.Thesepro-prietaryhardwaresolutionshavetheadvantageofbeinginexpensive,butthedisad-vantageofusingupmuchoftheavailablecomputationtime.DependingontheCPU,thiscanbeanythingbetween20andalmost100percent;withslowerCPUs,itisreallynotpossibleatall.ThistypeofinterfacedoesnotrequireaspecificLCDdriverbecauseµC/GUIsimplyplacesallthedisplaydataintotheLCDcache.Youmustwritethehardware-dependentportionthatperiodicallytransfersthedatainthecachememorytoyourLCD.Samplecodefortransferringthevideoimageintothedisplayisavailableinboth"C"andoptimizedassemblerforM16CandM16C/80.
1.3ConfiguringµC/GUI
TheConfigfoldershouldcontaintheconfigurationfilesmatchingyourorder.ThefileLCDConf.hnormallycontainsallthedefinitionsnecessarytoadoptµC/GUItoyourLCD,whichisthemaintaskwhenconfiguringµC/GUI.Fordetails,pleaseseeChapter20:
"Low-LevelConfiguration".
IfµC/GUIisnotconfiguredcorrectly,becauseyoudidnotselecttherightdisplayres-olutionorchosethewrongLCDcontroller,itwillprobablynotdisplayanythingatallordisplaysomethingthatdoesnotresemblewhatyouexpected.Sotakecaretotai-lorLCDConf.htoyourneeds.Ifyoudonotwishtodealwiththisprocess,Micriµmcandoitforyou,aswellastestµC/GUIinyourapplicationwithyourhardwareandyourLCD.
Typesofconfigurationmacros
Thefollowingtypesofconfigurationmacrosexist:
1.3.1Binaryswitches"B"
Switchescanhaveavalueofeither0or1,where0meansdeactivatedand1meansactivated(actuallyanythingotherthan0wouldwork,butusing1makesiteasiertoreadaconfigfile).Theseswitchescanenableordisableacertainfunctionalityorbehavior.Switchesarethesimplestformofconfigurationmacro.
1.3.2Numericalvalues"N"
Numericalvaluesareusedsomewhereinthecodeinplaceofanumericalconstant.TypicalexamplesareintheconfigurationoftheresolutionofanLCD.
1.3.3Selectionswitches"S"
Selectionswitchesareusedtoselectoneoutofmultipleoptionswhereonlyoneofthoseoptionscanbeselected.AtypicalexamplemightbetheselectionofthetypeofLCDcontrollerused,wherethenumberselecteddenoteswhichsourcecode(inwhichLCDdriver)isusedtogenerateobjectcode.
1.3.4Alias"A"
Amacrowhichoperateslikeasimpletextsubstitute.AnexamplewouldbethedefineU8,inwhichthepreprocessorwouldreplacewithunsignedchar.
1.3.5Functionreplacements"F"
Macroscanbasicallybetreatedlikeregularfunctionsalthoughcertainlimitationsapply,asamacroisstillputintothecodeassimpletextreplacement.Functionreplacementsaremainlyusedtoaddspecificfunctionalitytoamodule(suchastheaccesstoanLCD)whichishighlyhardware-dependent.Thistypeofmacroisalwaysdeclaredusingbrackets(andoptionalparameters).µC/GUI
1.4InitializingµC/GUI
TheroutineGUI_Init()initializestheLCDandtheinternaldatastructuresofµC/GUI,andmustbecalledbeforeanyotherµC/GUIfunction.Thisisdonebyplacingthefollowinglineintotheinitsequenceofyourprogram:
GUI_Init();
Ifthiscallisleftout,theentiregraphicssystemwillnotbeinitializedandwillthere-forenotbeready.
1.5UsingµC/GUIwithtargethardware
ThefollowingisjustabasicoutlineofthegeneralstepsthatshouldbetakenwhenstartingtoprogramwithµC/GU
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 外文 翻译 格式 参考
![提示](https://static.bdocx.com/images/bang_tan.gif)