Transcript
Page 1: MikroElektronika GLCD Font Creator Help · In mikroBasic, mikroPascal and mikroC, GLCD Lib is the library that let users draw and paint on graphics LCD. This library is limited to

Introduction

mikroElektronikaGLCDFontCreatorVersion1.2.0

TheultimateSolutiontoCreatePersonalizedFonts,Symbolsand

IconsforGraphicLCD

GLCDFontCreatoristheultimatefontcreationutilityforembeddedsystems.ItletsyoucreatefontsforLiquidCrystalDisplays(HD44780LCD)andGraphicsLCD.Itprovidesaveryniceandintuitiveuserinterface.GLCDFontCreatorletsyoucreatefontsandsymbolsfromscratch,orby

Page 2: MikroElektronika GLCD Font Creator Help · In mikroBasic, mikroPascal and mikroC, GLCD Lib is the library that let users draw and paint on graphics LCD. This library is limited to

importingexistingfontsonyoursystem.UnicodeFontsarefullysupported.Itletsyoumodifyandadjustthemforyourneeds,applyeffectstothem,andfinallyexportthemassourcecodeforuseinyourfavoritelanguagecompiler.

Page 3: MikroElektronika GLCD Font Creator Help · In mikroBasic, mikroPascal and mikroC, GLCD Lib is the library that let users draw and paint on graphics LCD. This library is limited to

Features

CreateFonts,SymbolsandIconsforLiquidCrystalDisplays(LCD)andGraphicLCDfromscratch.

CreateFontsforyourHD44780alphanumericLCD.

ImportWindowsFontsandinstantlygetreadyfontsforyourGLCD.

ImportofUNICODEFontsandcharsaresupported.

Modifycharsforyourconvenience.

Applyeffectslikevideoinversion,outlining,shifting,...toeachcharorautomaticallytothewholefont.

Veryniceandintuitiveuserinterface.

FullsupportforMikroElektronikamikroBasicPRO,mikroPascalPROandmikroCPROcompilers.

Page 4: MikroElektronika GLCD Font Creator Help · In mikroBasic, mikroPascal and mikroC, GLCD Lib is the library that let users draw and paint on graphics LCD. This library is limited to

FullX-GLCDLibrary(mikroPascal,mikroBasicandmikroCversion)thatenableslargefontsupportonMikroElektronikaPROcompilersforallplatforms(PIC,PIC32,dsPIC30/30andPIC24,AVRand8051).

Page 5: MikroElektronika GLCD Font Creator Help · In mikroBasic, mikroPascal and mikroC, GLCD Lib is the library that let users draw and paint on graphics LCD. This library is limited to

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

Page 6: MikroElektronika GLCD Font Creator Help · In mikroBasic, mikroPascal and mikroC, GLCD Lib is the library that let users draw and paint on graphics LCD. This library is limited to

automaticallycomputedandinsertedingeneratedsourcecode).WhatisXGlcdLibrary?

InmikroBasic,mikroPascalandmikroC,GLCDLibisthelibrarythatletusersdrawandpaintongraphicsLCD.Thislibraryislimitedtopaintingtextsonpages,i.e.onpositionsmultipleof8pixels.ThislimitationisduetothehardwareconfigurationofphysicalGLCDs.Thesecondlimitationisthefactthatthislibislimitedtofontswithamaximumof8pixelsheight.XGlcdLibisbreaksalltheselimitations.It'sawrapperarroundMikroElektronikaGLCDLib.ItletyoudrawfontsofanyheightatanypixelpositiononGLCDs.

WhenIusetheXGlcdLibthecompileralsolinkstheGLCDlibfromMikroElekronika?

Yes,theXGlcdLibisjustawrapperarroundMikroElektronikaGLCDLib.AnewrewriteofthefullXGLCDlibisplannedinordertoimproveitsperformancesandmakeitathigherlevelofabstraction(nomorehasslewithmanagingphysicalpagesandsidesofGLCD).

Page 7: MikroElektronika GLCD Font Creator Help · In mikroBasic, mikroPascal and mikroC, GLCD Lib is the library that let users draw and paint on graphics LCD. This library is limited to

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.

Page 8: MikroElektronika GLCD Font Creator Help · In mikroBasic, mikroPascal and mikroC, GLCD Lib is the library that let users draw and paint on graphics LCD. This library is limited to

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,

Page 9: MikroElektronika GLCD Font Creator Help · In mikroBasic, mikroPascal and mikroC, GLCD Lib is the library that let users draw and paint on graphics LCD. This library is limited to

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)

Page 10: MikroElektronika GLCD Font Creator Help · In mikroBasic, mikroPascal and mikroC, GLCD Lib is the library that let users draw and paint on graphics LCD. This library is limited to

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.

Page 11: MikroElektronika GLCD Font Creator Help · In mikroBasic, mikroPascal and mikroC, GLCD Lib is the library that let users draw and paint on graphics LCD. This library is limited to

ThefutureofXGLCDlib:AfullrewriteofXGLCDlibisplanned(maybeinpureASM)tomakeitmoreuserfriendlyandmorequicker.ThefontsneededbyXGLCDlibwillcontainpre-computedjumptablessothatonlyreallyusebytesineachchararestoredinthetable,thiswillcompressthefonttablesbymorethan50%andmakeselectionofcharsquicker.SupportofBitmaps,iconsandsymbolsdrawingwillalsobeadded.ThenewXGLCDlibwillnotbebasedonGLCDLib.ItwillbereallystandaloneandwillofferfunctionsforLines,polygons,andotherstuff.Also,addressingthehardwareregistersofthegraphicalcontrollerwillmakeitreallyquicker.

Page 12: MikroElektronika GLCD Font Creator Help · In mikroBasic, mikroPascal and mikroC, GLCD Lib is the library that let users draw and paint on graphics LCD. This library is limited to

UserInterfaceGLCDFontCreatorhasaveryniceandintuitiveinterface.

Themainscreenissplitin4majorzones.Almostallzonesaremoveableandcanbedisposedasyoufinditusefulforyourusage.

Page 13: MikroElektronika GLCD Font Creator Help · In mikroBasic, mikroPascal and mikroC, GLCD Lib is the library that let users draw and paint on graphics LCD. This library is limited to

Zone1:CharEditorzone.Zone2:Thelistofcharsinthecurrentlyeditedfont.Zone3:ThecurrentlyeditedcharLCDViewer.Zone4:Thetoolspanelcontainsthemostusedtools.

Page 14: MikroElektronika GLCD Font Creator Help · In mikroBasic, mikroPascal and mikroC, GLCD Lib is the library that let users draw and paint on graphics LCD. This library is limited to

ExportFiltersExportfiltersletyouexportyourfontsinsourcecodeformattobeusedinMikroelektronikacompilers.

Page 15: MikroElektronika GLCD Font Creator Help · In mikroBasic, mikroPascal and mikroC, GLCD Lib is the library that let users draw and paint on graphics LCD. This library is limited to

mikroBasic,mikroPascalandmikroCfilterTheMikroElektronikacompilers'targetfilterletyouexportfontsinaformatcompatiblewithmikroBasic,mikroPascalandmikroC.ThisfilterisdirectlyrelatedtoX-GLCDlibrary.PleasereadthetopicrelatedtoX-GLCDlibfullytounderstandfullythisfilter.Fontswith8bitsheightorless:MikroelektronikaGLCDlibhandlesonlyfontswith8bitsheight.Sowhenyourfontis8bitsorlessinheight,invoquingthefilterforMikroElecktronikacompilerswillshowthefolowingscreen.

Page 16: MikroElektronika GLCD Font Creator Help · In mikroBasic, mikroPascal and mikroC, GLCD Lib is the library that let users draw and paint on graphics LCD. This library is limited to

Inthisscreen,youhaveonlytochoosethetargetcompiler(language),tospecifytherangeofcharstoexportandeventuallythemodule/unitnametoaddtosourcecode.GeneratedsourcecodecanbecopiedtoclipboardandpastedinyourcompilerIDE,orcanbesaveddirectlytodisk.Themostimportantthingtonoteinthisscreenisthegroupofradio"GenerateCodeForUseWith"

Page 17: MikroElektronika GLCD Font Creator Help · In mikroBasic, mikroPascal and mikroC, GLCD Lib is the library that let users draw and paint on graphics LCD. This library is limited to

miroBasic(ormikroPascalormikroC)GLCDLib:createsfontscompatiblewithMikroElektronikaGLCDLibrary.X-GLCDLib:createsfontscompatiblewithX-GLCDLibrary.TheusefulthingtonoteaboutX-GLCDlibisthatitletyoudrawfontsatanyYpositiononthescreenandnotonlyatpositionswithYisamultipleof8(becauseofthephysicalstructureofGLCDhardware).Fontswithheightbiggerthan8bits:GLCDlibraryfromMikroElektronikaisunabletohandlethesefonts.X-GLCDlibwaswrittenspeciallytohandlethem,andthusistheonlyoptionpossible.

Page 18: MikroElektronika GLCD Font Creator Help · In mikroBasic, mikroPascal and mikroC, GLCD Lib is the library that let users draw and paint on graphics LCD. This library is limited to

PleasereadthetopicrelatedtoX-GLCDlibfullytounderstandfullythisfilter.

Page 19: MikroElektronika GLCD Font Creator Help · In mikroBasic, mikroPascal and mikroC, GLCD Lib is the library that let users draw and paint on graphics LCD. This library is limited to

TechnicalSupport

Page 20: MikroElektronika GLCD Font Creator Help · In mikroBasic, mikroPascal and mikroC, GLCD Lib is the library that let users draw and paint on graphics LCD. This library is limited to

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.

Page 21: MikroElektronika GLCD Font Creator Help · In mikroBasic, mikroPascal and mikroC, GLCD Lib is the library that let users draw and paint on graphics LCD. This library is limited to

License

Page 22: MikroElektronika GLCD Font Creator Help · In mikroBasic, mikroPascal and mikroC, GLCD Lib is the library that let users draw and paint on graphics LCD. This library is limited to

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

Page 23: MikroElektronika GLCD Font Creator Help · In mikroBasic, mikroPascal and mikroC, GLCD Lib is the library that let users draw and paint on graphics LCD. This library is limited to

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

Page 24: MikroElektronika GLCD Font Creator Help · In mikroBasic, mikroPascal and mikroC, GLCD Lib is the library that let users draw and paint on graphics LCD. This library is limited to

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]


Recommended