mikroelektronika glcd font creator help · in mikrobasic, mikropascal and mikroc, glcd lib is the...
TRANSCRIPT
Introduction
mikroElektronikaGLCDFontCreatorVersion1.2.0
TheultimateSolutiontoCreatePersonalizedFonts,Symbolsand
IconsforGraphicLCD
GLCDFontCreatoristheultimatefontcreationutilityforembeddedsystems.ItletsyoucreatefontsforLiquidCrystalDisplays(HD44780LCD)andGraphicsLCD.Itprovidesaveryniceandintuitiveuserinterface.GLCDFontCreatorletsyoucreatefontsandsymbolsfromscratch,orby
importingexistingfontsonyoursystem.UnicodeFontsarefullysupported.Itletsyoumodifyandadjustthemforyourneeds,applyeffectstothem,andfinallyexportthemassourcecodeforuseinyourfavoritelanguagecompiler.
Features
CreateFonts,SymbolsandIconsforLiquidCrystalDisplays(LCD)andGraphicLCDfromscratch.
CreateFontsforyourHD44780alphanumericLCD.
ImportWindowsFontsandinstantlygetreadyfontsforyourGLCD.
ImportofUNICODEFontsandcharsaresupported.
Modifycharsforyourconvenience.
Applyeffectslikevideoinversion,outlining,shifting,...toeachcharorautomaticallytothewholefont.
Veryniceandintuitiveuserinterface.
FullsupportforMikroElektronikamikroBasicPRO,mikroPascalPROandmikroCPROcompilers.
FullX-GLCDLibrary(mikroPascal,mikroBasicandmikroCversion)thatenableslargefontsupportonMikroElektronikaPROcompilersforallplatforms(PIC,PIC32,dsPIC30/30andPIC24,AVRand8051).
FrequentlyAsquedQuestions
WhatisMikroElektronikaGLCDFontCreator?MikroElektronikaGLCDFontCreatorisatooltodrawfontsandexportthemforMikroElektronikacompilers.
CanIimporttheinstalledfontsonmyPC?
Yes,youcancreatefontsusingthefuntionnality:"NewProject:ByImportingSystemFont".
Whatareallthecompilerssupportedforexport?
Actually,thesupportedcompilersareALLMikroElektronikaProcompilers,mikroBasicPRO,mikroPascalPRO,mikroCPRO,forPIC,PIC32,dsPIC30/30andPIC24,AVRand8051.
Therearesomeuselesswhitespaceabovethecharacters,howtoremoveit?
It'seasy.YoucandeleteblanksoncharsusingDeleteRoworColumnfunctionfromanysideofyourchars.YoucanalsouseAutomaticOptimisationDialogtoletGLCDFontCreatorautomaticallydoitforyou.
CanIcreatefontswithvariablecharswidth?
Yesofcourse.Butindesigntime,allcharsarethesamewidth.AtEXPORTTIMEyoucanchoosetoexportyourfontsinFIXEDfontwidthorinPROPORTIONALfontwidth(inthislatercase,jumptablesare
automaticallycomputedandinsertedingeneratedsourcecode).WhatisXGlcdLibrary?
InmikroBasic,mikroPascalandmikroC,GLCDLibisthelibrarythatletusersdrawandpaintongraphicsLCD.Thislibraryislimitedtopaintingtextsonpages,i.e.onpositionsmultipleof8pixels.ThislimitationisduetothehardwareconfigurationofphysicalGLCDs.Thesecondlimitationisthefactthatthislibislimitedtofontswithamaximumof8pixelsheight.XGlcdLibisbreaksalltheselimitations.It'sawrapperarroundMikroElektronikaGLCDLib.ItletyoudrawfontsofanyheightatanypixelpositiononGLCDs.
WhenIusetheXGlcdLibthecompileralsolinkstheGLCDlibfromMikroElekronika?
Yes,theXGlcdLibisjustawrapperarroundMikroElektronikaGLCDLib.AnewrewriteofthefullXGLCDlibisplannedinordertoimproveitsperformancesandmakeitathigherlevelofabstraction(nomorehasslewithmanagingphysicalpagesandsidesofGLCD).
X-GLCDLibrary
X-GLCDlibraryformikroBasic,mikroPascalandmikroC
Pleasereadalldetailsbeforeusingthislibrary!!!
XGLCDlibraryisaimedatprovidingasolutiontobreakthelimitsofGLCDlibprovidedbyMikroElektronika.GLCDLibisconstrainedbythephysicalstructureofK0108/K0107GLCDcontrollers.Inthesecontrollers,thescreenissplitontwosides.Youcanthinkofa128*64LCDasa1024bytememory,everybitofwhichisvisible.Thedisplayissplitlogicallyinhalf.Itcontainstwocontrollerswithcontroller#1(Chipselect1)controllingthelefthalfofthedisplayandcontroller#2(Chipselect2)controllingtherighthalf.Eachcontrollermustbeaddressedindependently.Eachhalfconsistsof8horizontalpageswhichare8bits(1byte)high.Thepageaddresses,0-7,specifyoneofthe8pages.Thatisillustratedinthedrawingbelow.
BelowaretheKS0108&HD61202commands.Thesecontrollersdonothavetextcapabilityandthecommandsarefewandsimple.
Yaddress(0-63YaddresscounterdesignatesaddressoftheinternalDDRAM.Anaddressissetbyinstructionandisincreasedby1automaticallybyreadorwriteoperationsofdisplaydata.Yaddress0istheleftmostbayt,andYaddress63istherightmostbyteofapage.Xaddress(0-7):Thisisthepageaddressandhasnocountfunction.Displaystartline(0-63):ThedisplaystartlineregisterspecifiesthelineinRAMwhichcorrespondstothetoplineofLCDpanel,whendisplayingcontentsindisplaydataRAMontheLCDpanelTheGLCDLibfromMikroElektronikaletyou:
1- Chooseafontwithaheightof8bitsatmaximumbecauseofthehardwaredriverpages.
2- Writeonlyatpageslevel(8pages=8lines),soyoucantwriteforexampleastringatpixel3fromtopedge(Y=Multipleof8).
X-GLCDlibbreaksalltheselimitations.Itletyou
1- simplywriteanyfont,
2- withanysize(anyheight,evenbiggerthan8bits)
3- atanyPixelPositionwithtransparency(YhasNOTtobemultipleof8)
UnderstandtheExportFilterformikroBasic,mikroPascalandmicroC:Thisfilterletyouconvertanyfontyoucreated(evenfromscratchorimportedanexistingWindowsfont)toconstanttablesneededbyMikroElektronikacompilers.Thisfilteriseasytouse,justselectthetabcorrespondingtoyourfavoritelanguage(mikroBasic,mikroPascalormikroC)andthesourcecodeisautomaticallygeneratedforyou.BUT!!!!!!!!!!!!!!!!!FontsBiggerthant8bitsheight:ForfontsBiggerthan8bits(height):TheuseofX-GlcdLibraryismandatorytobeabletodrawthemonGLCD(seeX-GLCDsectionforusageguide).Forfontswithheightlessorequalto8bits:ThesefontscanberenderedusingeitherMikroElektronikaGLCDlib,orX-GLCDlib.GLCDlibisabitquickerthanX-GLCDlibwhenrenderingthesefonts.SoWhyuseX-GLCDlibwithfontswithheightlessorequalto8bits?Simplybecause
1- X-GLCDlibletyoudrawthesefontsatanyPIXELpositionfromtopandnotonlyatYpositionsmultipleof8bits(pages)
2- X-GLCDlibrendersfontswithPROPORTIONALcharwidth
X-GLCDlibusageguide:X-GLCDlibprovide3proceduresverysimilartotheoriginalGLCDLibprovidedbyMikroElektronika.
xGLCD_Set_Font()xGLCD_Write_Char()xGLCD_Write_Text()
theparametersareabsolutelythesameasGLCDlibequivalentfunctions/procedures.IMPORTANTNOTES:
1- TheCoordinatesystemisnotthesameasGLCDlibfromMikroElektronika!
2- FontsusedbyGLCDLibarenotcompatiblewithXGLCDlib!
X-GLCDlibaimsathidingthephysicalstructureorhardwareGLCD.SothebigdifferencebetweenX-GLCDandGLCDisthefactthatforcoordinates(X,Y)passedasparameterstoeachprocedure(xGLCD_Write_Char()andxGLCD_Write_Text())arethelogicalcoordinateyouwanttouseonthescreen.ThatmeansthattheXcoordinateisbetween0..127andtheYcoordinateisbetween0to63.IfyouwanttowriteacharatpositionX=69andY=72youhaveonlytocallxGLCD_Write_Char(myChar,69,72)WithX-GLCDLibYoudonothavetoworryaboutpagesorsides.Allisdoneautomaticallyforyou.
ThefutureofXGLCDlib:AfullrewriteofXGLCDlibisplanned(maybeinpureASM)tomakeitmoreuserfriendlyandmorequicker.ThefontsneededbyXGLCDlibwillcontainpre-computedjumptablessothatonlyreallyusebytesineachchararestoredinthetable,thiswillcompressthefonttablesbymorethan50%andmakeselectionofcharsquicker.SupportofBitmaps,iconsandsymbolsdrawingwillalsobeadded.ThenewXGLCDlibwillnotbebasedonGLCDLib.ItwillbereallystandaloneandwillofferfunctionsforLines,polygons,andotherstuff.Also,addressingthehardwareregistersofthegraphicalcontrollerwillmakeitreallyquicker.
UserInterfaceGLCDFontCreatorhasaveryniceandintuitiveinterface.
Themainscreenissplitin4majorzones.Almostallzonesaremoveableandcanbedisposedasyoufinditusefulforyourusage.
Zone1:CharEditorzone.Zone2:Thelistofcharsinthecurrentlyeditedfont.Zone3:ThecurrentlyeditedcharLCDViewer.Zone4:Thetoolspanelcontainsthemostusedtools.
ExportFiltersExportfiltersletyouexportyourfontsinsourcecodeformattobeusedinMikroelektronikacompilers.
mikroBasic,mikroPascalandmikroCfilterTheMikroElektronikacompilers'targetfilterletyouexportfontsinaformatcompatiblewithmikroBasic,mikroPascalandmikroC.ThisfilterisdirectlyrelatedtoX-GLCDlibrary.PleasereadthetopicrelatedtoX-GLCDlibfullytounderstandfullythisfilter.Fontswith8bitsheightorless:MikroelektronikaGLCDlibhandlesonlyfontswith8bitsheight.Sowhenyourfontis8bitsorlessinheight,invoquingthefilterforMikroElecktronikacompilerswillshowthefolowingscreen.
Inthisscreen,youhaveonlytochoosethetargetcompiler(language),tospecifytherangeofcharstoexportandeventuallythemodule/unitnametoaddtosourcecode.GeneratedsourcecodecanbecopiedtoclipboardandpastedinyourcompilerIDE,orcanbesaveddirectlytodisk.Themostimportantthingtonoteinthisscreenisthegroupofradio"GenerateCodeForUseWith"
miroBasic(ormikroPascalormikroC)GLCDLib:createsfontscompatiblewithMikroElektronikaGLCDLibrary.X-GLCDLib:createsfontscompatiblewithX-GLCDLibrary.TheusefulthingtonoteaboutX-GLCDlibisthatitletyoudrawfontsatanyYpositiononthescreenandnotonlyatpositionswithYisamultipleof8(becauseofthephysicalstructureofGLCDhardware).Fontswithheightbiggerthan8bits:GLCDlibraryfromMikroElektronikaisunabletohandlethesefonts.X-GLCDlibwaswrittenspeciallytohandlethem,andthusistheonlyoptionpossible.
PleasereadthetopicrelatedtoX-GLCDlibfullytounderstandfullythisfilter.
TechnicalSupport
TechnicalSupport
Incaseyouencounteranyproblem,youarewelcometooursupportforumsatwww.mikroe.com/forum/.Here,youmayalsofindhelpfulinformation,hardwaretips,andpracticalcodesnippets.YourcommentsandsuggestionsonfuturedevelopmentoftheMikroElektronikaGLCDFontCreatoralwaysappreciated—feelfreetodropanoteortwoonourWishlist.InourKnowledgeBasewww.mikroe.com/en/kb/youcanfindtheanswerstoFrequentlyAskedQuestionsandsolutionstoknownproblems.IfyoucannotfindthesolutiontoyourprobleminKnowledgeBasethenreportittoSupportDeskwww.mikroe.com/en/support/.Inthisway,wecanrecordandtrackdownbugsmoreefficiently,whichisinourmutualinterest.Werespondtoeverybugreportandquestioninasuitablemanner,everimprovingourtechnicalsupport.
License
mikroElektronikaAssociatesLicenseStatementandLimitedWarranty
IMPORTANT-READCAREFULLY
Thislicensestatementandlimitedwarrantyconstitutealegalagreement(“LicenseAgreement”)betweenyou(eitherasanindividualorasingleentity)andmikroElektronika(“mikroElektronikaAssociates”)forsoftwareproduct(“Software”)identifiedabove,includinganysoftware,media,andaccompanyingon-lineorprinteddocumentation.BYINSTALLING,COPYING,OROTHERWISEUSINGSOFTWARE,YOUAGREETOBEBOUNDBYALLTERMSANDCONDITIONSOFTHELICENSEAGREEMENT.UponyouracceptanceofthetermsandconditionsoftheLicenseAgreement,mikroElektronikaAssociatesgrantsyoutherighttouseSoftwareinawayprovidedbelow.ThisSoftwareisownedbymikroElektronikaAssociatesandisprotectedbycopyrightlawandinternationalcopyrighttreaty.Therefore,youmusttreatthisSoftwarelikeanyothercopyrightmaterial(e.g.,abook).YoumaytransferSoftwareanddocumentationonapermanentbasisprovided.YouretainnocopiesandtherecipientagreestothetermsoftheLicenseAgreement.ExceptasprovidedintheLicenseAgreement,youmaynottransfer,rent,lease,lend,copy,modify,translate,sublicense,time-shareorelectronicallytransmitorreceiveSoftware,mediaordocumentation.YouacknowledgethatSoftwareinthesourcecodeformremainsaconfidentialtradesecretofmikroElektronikaAssociatesandthereforeyouagreenottomodifySoftwareorattempttoreverseengineer,decompile,ordisassembleit,exceptandonlytotheextentthatsuchactivityisexpresslypermittedbyapplicablelawnotwithstandingthislimitation.IfyouhavepurchasedanupgradeversionofSoftware,itconstitutesasingleproductwiththemikroElektronikaAssociatessoftwarethatyouupgraded.YoumayusetheupgradeversionofSoftwareonlyinaccordancewiththeLicenseAgreement.
LIMITEDWARRANTY
RespectfullyexceptingtheRedistributables,whichareprovided“asis”,withoutwarrantyofanykind,mikroElektronikaAssociateswarrantsthatSoftware,onceupdatedandproperlyused,willperformsubstantiallyinaccordancewiththeaccompanyingdocumentation,andSoftwaremediawillbefreefromdefectsinmaterialsandworkmanship,foraperiodofninety(90)daysfromthedateofreceipt.AnyimpliedwarrantiesonSoftwarearelimitedtoninety(90)days.mikroElektronikaAssociates’anditssuppliers’entireliabilityandyourexclusiveremedyshallbe,atmikroElektronikaAssociates’option,either(a)returnofthepricepaid,or(b)repairorreplacementofSoftwarethatdoesnotmeetmikroElektronikaAssociates’LimitedWarrantyandwhichisreturnedtomikroElektronikaAssociateswithacopyofyourreceipt.DONOTRETURNANYPRODUCTUNTILYOUHAVECALLEDMIKROELEKTRONIKAASSOCIATESFIRSTANDOBTAINEDARETURNAUTHORIZATIONNUMBER.ThisLimitedWarrantyisvoidiffailureofSoftwarehasresultedfromanaccident,abuse,ormisapplication.AnyreplacementofSoftwarewillbewarrantedfortherestoftheoriginalwarrantyperiodorthirty(30)days,whicheverislonger.TOTHEMAXIMUMEXTENTPERMITTEDBYAPPLICABLELAW,MIKROELEKTRONIKAASSOCIATESANDITSSUPPLIERSDISCLAIMALLOTHERWARRANTIESANDCONDITIONS,EITHEREXPRESSEDORIMPLIED,INCLUDED,BUTNOTLIMITEDTOIMPLIEDWARRANTIESOFMERCHANTABILITY,FITNESSFORAPARTICULARPURPOSE,TITLE,ANDNON-INFRINGEMENT,WITHREGARDTOSOFTWARE,ANDTHEPROVISIONOFORFAILURETOPROVIDESUPPORTSERVICES.INNOEVENTSHALLMIKROELEKTRONIKAASSOCIATESORITSSUPPLIERSBELIABLEFORANYSPECIAL,INCIDENTAL,INDIRECT,ORCONSEQUENTIALDAMAGESWHATSOEVER(INCLUDING,WITHOUTLIMITATION,DAMAGESFORLOSSOFBUSINESSPROFITSANDBUSINESSINFORMATION,BUSINESSINTERRUPTION,ORANYOTHERPECUNIARYLOSS)ARISINGOUTOFTHEUSEOFORINABILITYTOUSESOFTWAREPRODUCTORTHEPROVISIONOFORFAILURETOPROVIDESUPPORTSERVICES,EVENIFMIKROELEKTRONIKAASSOCIATESHASBEENADVISEDOFTHEPOSSIBILITYOFSUCHDAMAGES.INANYCASE,MIKROELEKTRONIKAASSOCIATES’ENTIRELIABILITYUNDERANYPROVISIONOFTHISLICENSEAGREEMENTSHALLBELIMITEDTOTHEAMOUNTACTUALLYPAIDBYYOUFORSOFTWAREPRODUCT
PROVIDED,HOWEVER,IFYOUHAVEENTEREDINTOAMIKROELEKTRONIKAASSOCIATESSUPPORTSERVICESAGREEMENT,MIKROELEKTRONIKAASSOCIATES’ENTIRELIABILITYREGARDINGSUPPORTSERVICESSHALLBEGOVERNEDBYTHETERMSOFTHATAGREEMENT.
HIGHRISKACTIVITIES
Softwareisnotfault-tolerantandisnotdesigned,manufacturedorintendedforuseorresaleason-linecontrolequipmentinhazardousenvironmentsrequiringfail-safeperformance,suchasintheoperationofnuclearfacilities,aircraftnavigationorcommunicationsystems,airtrafficcontrol,directlifesupportmachines,orweaponssystems,inwhichthefailureofSoftwarecouldleaddirectlytodeath,personalinjury,orseverephysicalorenvironmentaldamage(“HighRiskActivities”).mikroElektronikaAssociatesanditssuppliersspecificallydisclaimanyexpressedorimpliedwarrantyoffitnessforHighRiskActivities.
GENERALPROVISIONS
ThisstatementmayonlybemodifiedinwritingsignedbyyouandanauthorisedofficerofmikroElektronikaAssociates.Ifanyprovisionofthisstatementisfoundvoidorunenforceable,theremainderwillremainvalidandenforceableaccordingtoitsterms.Ifanyremedyprovidedisdeterminedtohavefailedforitsessentialpurpose,alllimitationsofliabilityandexclusionsofdamagessetforthintheLimitedWarrantyshallremainineffect.Thisstatementgivesyouspecificlegalrights;youmayhaveothers,whichvary,fromcountrytocountry.mikroElektronikaAssociatesreservesallrightsnotspecificallygrantedinthisstatement.mikroElektronikaVisegradska1A,11000Belgrade,Europe.
Phone:+381113628830Fax:+381113628831Web:www.mikroe.comE-mail:[email protected]