外文翻译格式参考Word文档格式.docx

上传人:b****4 文档编号:16399493 上传时间:2022-11-23 格式:DOCX 页数:13 大小:350.76KB
下载 相关 举报
外文翻译格式参考Word文档格式.docx_第1页
第1页 / 共13页
外文翻译格式参考Word文档格式.docx_第2页
第2页 / 共13页
外文翻译格式参考Word文档格式.docx_第3页
第3页 / 共13页
外文翻译格式参考Word文档格式.docx_第4页
第4页 / 共13页
外文翻译格式参考Word文档格式.docx_第5页
第5页 / 共13页
点击查看更多>>
下载资源
资源描述

外文翻译格式参考Word文档格式.docx

《外文翻译格式参考Word文档格式.docx》由会员分享,可在线阅读,更多相关《外文翻译格式参考Word文档格式.docx(13页珍藏版)》请在冰豆网上搜索。

外文翻译格式参考Word文档格式.docx

1.1µ

C/GUIfeatures

C/GUIisdesignedtoprovideanefficient,processor-andLCDcontroller-indepen-dentgraphicaluserinterfaceforanyapplicationthatoperateswithagraphicalLCD.Itiscompatiblewithsingle-taskandmultitaskenvironments,withaproprietaryoperatingsystemorwithanycommercialRTOS.µ

C/GUIisshippedas"

sourcecode.ItmaybeadaptedtoanysizephysicalandvirtualdisplaywithanyLCDcon-trollerandCPU.Itsfeaturesincludethefollowing:

1.1.1General

Any8/16/32-bitCPU;

onlyanANSI"

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"

andoptimizedassemblerforM16CandM16C/80.

1.3Configuringµ

TheConfigfoldershouldcontaintheconfigurationfilesmatchingyourorder.ThefileLCDConf.hnormallycontainsallthedefinitionsnecessarytoadoptµ

C/GUItoyourLCD,whichisthemaintaskwhenconfiguringµ

C/GUI.Fordetails,pleaseseeChapter20:

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).µ

1.4Initializingµ

TheroutineGUI_Init()initializestheLCDandtheinternaldatastructuresofµ

C/GUI,andmustbecalledbeforeanyotherµ

C/GUIfunction.Thisisdonebyplacingthefollowinglineintotheinitsequenceofyourprogram:

GUI_Init();

Ifthiscallisleftout,theentiregraphicssystemwillnotbeinitializedandwillthere-forenotbeready.

1.5Usingµ

C/GUIwithtargethardware

Thefollowingisjustabasicoutlineofthegeneralstepsthatshouldbetakenwhenstartingtoprogramwithµ

C/GU

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 表格模板 > 合同协议

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1