Copyright2014M.
J.
ButcherConsultingEmbeddingitbetter.
.
.
TaskerDocumentSegmentLCDuser'sguidewww.
uTasker.
comTasker–SegmentLCDuTasker_SLCD.
doc/1.
02/1627.
01.
2014TableofContents1.
Introduction.
32.
SLCDModulesandSLCDControllers33.
GLCDProgrammer'sModel.
73.
1.
KinetisFRDM-KL46ZSLCDConfigurationExample.
73.
2.
KinetisK40GLCDConfigurationExample.
93.
3.
KinetisK40GLCDControlExample.
104.
SLCDSimulator115.
PracticalExamples.
146.
Conclusion.
16www.
uTasker.
comTasker–SegmentLCDuTasker_SLCD.
doc/1.
03/1627.
01.
20141.
IntroductionSomeprocessorsincludeanSLCD(SegmentLCD)controller.
ThisdocumentdiscussesthebasicoperationofthesecontrollersandhowtheTaskerprojectsupportstheiruseandsimulation.
2.
SLCDModulesandSLCDControllersSLCDmodulesaresimpleandverylowpowerLCDdisplays.
Theycanhavealargenumberofsegmentsintheformofdots(pixels)orsymbols(partsof7segmentcharactersorspecialimages)andalargenumberofpinstoenablethesesegmentstobecontrolled.
SLCDcontrollerstendtohaveahighnumberofpinstohandlelargeGLCDmodules.
Thesepinscanbeconfiguredasback-planeorfront-planepinsandgeneratetherequiredmultiplexingandwaveformsneededtocontinuouslyrefreshtheSLCD.
SinceSLCDSareoftenusedinverylowpowerapplicationstheSLCDcontrollerstendtobeabletooperateautonomouslywhentheprocessorisinlowpowermodes(eg.
WAIT,SLEEPorSTOPmodes).
Specialfeaturessuchasautomaticblinkfieldsmaybesupportedwhichmayalsobeabletooperateautonomouslywhentheprocessorisnotrunning.
Ratherthanhaveoneconnectionforeachsegment,thesegmentsaretypicallymultiplexedsothatlesscontrollinesareneededtocontrolthesamenumberofindividualsegments.
Toillustratethis,theLuminexLCD-S401M16KR,asusedontheFreescaleFRDM-KL46Zisusedasreference.
Thefollowingisanexcerptfromitsdatasheetshowingitscharacteristicsandhowits12pinsareconnectedtoitselements:CharacteristicsandconnectiondetailsofLuminexLCD-S401M16KRAndthedisplay'selementsareillustratedbelowaccordingtotheirreferencesintheconnectiontableintheoriginaldatasheet:www.
uTasker.
comTasker–SegmentLCDuTasker_SLCD.
doc/1.
04/1627.
01.
2014123456789101112Dig.
1Dig.
2Dig.
3Dig.
4DP1DP2DP3COLABCDEFGThisdisplayhas12pins,whichareallconnectedtoadrivingpinontheSLCDcontroller.
Thereare4commonpinsandsothedrivingmodeisduty,sinceeachofthecommonpinsaredrivenforofthecycleperiod.
Eachofthecommonlinesisconnectedto8LCDsegments.
TakingCOM0asanexamplethe8segmentsthatarecontrolledbyitareshowinthefollowingdiagram.
123456789101112Dig.
1Dig.
2Dig.
3Dig.
4DP1DP2DP3COLThismeansthatwhentheCOM0lineisbeingdrivenupto8segmentscanbeturnedon,dependingonthestateofthe8segmentpins.
The8segmentpins(5.
.
12)thuscontrolthese8segmentsduringthisdrivingphaseandcanturnallon,alloff,orancombinationinbetween.
Sincethereare4phases(4COMpins),eachcontrolling8segmentsduringthatphase,atotalof32segmentscanbecontrolled–thiscorrespondstothenumberofsegmentsthattheSLCDphysicallyhas(notthattheCOLsegmentismadeupoftwopointswhichcannotbecontrolledindividually).
Theother3COMdrivecombinationsarenotshowninadiagramherebutcanbeeasilyreadfromtheoriginaldatasheettable.
InordertoconfiguretheSLCDdrivertomatchthisdisplay4ofitsLCDpinsareconfiguredasCOMdrivepinsand8assegmentdrivepins.
TheCOMdrivepinsareconfiguredtodriveindifferentphases(eg.
COM0inphase1,COM1inphase2,COM2inphase3andCOM3inphase4,whereeachofthephasesarerepeatedaccordingtodutydrivingmode).
ThedutymodeandanyotherspecificconfigurationarealsosetintheSLCDcontroller.
Eachsegmentdrivelineeachcancontrolanindividualsegmentineachofthe4phasesoftheoperation.
WhichsegmentthatisdependsontheconnectionintheSLCDitself(seeconnectiontableinthisexample)andhowtheSLCDpinsarephysicallyconnectedtotheSLCDmodule.
ThedesignedcanhoweverquiteeasilymakealistofwhichcontrolbitsinthesegmentdriveregisterscorrespondtowhichsegmentintheSLCDandthenusethisinformationtosettext,numbersorpatternsrequiredbytheapplicationsoftware.
TheSLCDwww.
uTasker.
comTasker–SegmentLCDuTasker_SLCD.
doc/1.
05/1627.
01.
2014controllerperformsthemultiplexingdisplaydrivingautonomouslybasedontheregisterstates.
InthecaseoftheFreescaleFRDM-KL46ZtheSLCDpinconnectionsareasfollows:Pin1(COM0)=LCD40Pin2(COM1)=LCD52Pin3(COM2)=LCD19Pin4(COM3)=LCD18Pin5(1D/1E/1G/1F)=LCD37Pin6(DP1/1C/1B/1A)=LCD17Pin7(2D/2E/2G/2F)=LCD7Pin8(DP2/2C/2B/2A)=LCD8Pin9(3D/3E/3G/3F)=LCD53Pin10(DP3/3C/3B/3A)=LCD38Pin11(4D/4E/4G/4F)=LCD10Pin12(COL/4C/4B/4A)=LCD11ThefollowingchaptershowshowanSLCDcontrollerisconfiguredtomatchthisSLCD.
TheKinetisSLCDdriverisusedasexamplebuttheprincipleoftheoperationshouldbeessentiallyvalidforalltypes.
ForcompletenessthecompletelistofsegmentcontrolbitsforthereferenceLCDusedontheFRDM-KL46Zisgivenbelow.
17-837-237-117-137-437-87-18-18-838-853-138-110-111-811-410-411-217-417-27-87-27-48-28-411-153-838-453-253-438-210-210-8Example:Segmentcontrol8-8isthebit0x08(phasecontrolledbyCOM3)intheregisterLCD_WF8,whichcorrespondstothe67thcontrolbitinthecontrolblock.
Toenableitthefollowingcanbeused:SET_SLCD(8,0x08),toclearitCLEAR_SLCD(8,0x08)andtotoggleitTOGGLE_SLCD(8,0x08).
www.
uTasker.
comTasker–SegmentLCDuTasker_SLCD.
doc/1.
06/1627.
01.
2014Thefollowingillustrationsshowtypicaldrivesignals.
TheSLCDmodulehasnopowersupplyanditisseenthatthedrivesignalshaveanACnature.
TheCOMlinesdriveinonephaseofthecyclebutphaseinvertedineachperiod.
Thesegmentdrivelineseitherdriveanmid-levelsignalwhennosegmentistobeenabledorelseanout-of-phasesignalintherespectiveCOMphasewhenitscorrespondingsegmentistobeon.
Thedutycycleperiodisconfigurableandtypicallyinthe100Hzregion.
COM0COM1COM2COM4IdleSegmentSegmentonCOM0SegmentonCOM1SegmentonCOM0+1www.
uTasker.
comTasker–SegmentLCDuTasker_SLCD.
doc/1.
07/1627.
01.
20143.
GLCDProgrammer'sModelDuetothefactthatSLCDcontrollerstakeoveralloftheactivecontrolofSLCDmodulestheSLCDinterfacetendstobeverysimplefromaprogrammer'sperspective.
ThecontrollerwilltendtobedisabledatresetandsotheprogrammerneedstoconfigureittosuittheSLCDinuse:-Controllerconfigurationtooperatefromthecorrectclockandinthecorrectmode-Front-planeandBack-planesignaldefaultconfigurationTypicallyallsegmentswillinitiallybeoffandtheSLCDwilldisplaynosegmentsoncetheinitialisationiscompleteandthentheprogrammercanindividuallycontrolsegmentstoindicatestates(eg.
Segmentimagesortext),ortogrouptogethertoformnumbers(eg.
sevensegmentnumbers)orcharacters(eg.
dotmatixsegments).
3.
1.
KinetisFRDM-KL46ZSLCDConfigurationExampleThefollowingcodeconfigurestheSLCDanditspins,aswellassettingthedrivingphaseofeachCOMline.
ThisconfigurationfollowsonfromtheintroductiontothespecificSLCDmoduleusedonthisboard://ConfiguretheSLCDmodebutdon'tenableityet//LCD_GCR=(LCD_GCR_RVEN|(0x08000000&LCD_GCR_RVTRIM_MASK)|LCD_GCR_CPSEL|LCD_GCR_LADJ_MASK|LCD_GCR_VSUPPLY|LCD_GCR_SOURCE|LCD_GCR_LCLK_1|LCD_GCR_DUTY_4BP);//ConfigurethepinstobeusedasCOMlines//LCD_BPENL=(SLCD_PIN_19|SLCD_PIN_18);LCD_BPENH=(SLCD_PIN_H_52|SLCD_PIN_H_40);//Configurethepinstobeusedassegmentdrivelines(plustheCOMlines)//LCD_PENL=((SLCD_PIN_17|SLCD_PIN_11|SLCD_PIN_10|SLCD_PIN_8|SLCD_PIN_7)|(SLCD_PIN_19|SLCD_PIN_18));LCD_PENH=((SLCD_PIN_H_53|SLCD_PIN_H_38|SLCD_PIN_H_37)|(SLCD_PIN_H_52|SLCD_PIN_H_40));//Setthe4COMlinephases//WRITE_SLCD(43TO40,0x00000001);//40tophase1(COM0)WRITE_SLCD(55TO52,0x00000002);//52tophase2(COM1)WRITE_SLCD(19TO16,0x04080000);//19tophase3(COM2)and18tophase3(COM3)//EnabletheSLCDoperation//LCD_GCR=(LCD_GCR_LCDEN|LCD_GCR_RVEN|(0x08000000&LCD_GCR_RVTRIM_MASK)|LCD_GCR_CPSEL|LCD_GCR_LADJ_MASK|LCD_GCR_VSUPPLY|LCD_GCR_SOURCE|LCD_GCR_LCLK_1|LCD_GCR_DUTY_4BP)www.
uTasker.
comTasker–SegmentLCDuTasker_SLCD.
doc/1.
08/1627.
01.
2014ToturnonandoffthesegmentCOLthefollowingtwocommandenableanddisablethecontrolontheSLCDmodule'spin12(LCD11)SET_SLCD(11TO8,0x01000000);CLEAR_SLCD(11TO8,0x01000000);Theequivalentcontrolofthesegment4C(alsocontrolledbythesamepin)showsthatthephasethattheoutputisenableinmakesthedifference.
SET_SLCD(11TO8,0x02000000);CLEAR_SLCD(11TO8,0x02000000);IfbothofthesesegmentsaretobeenabledtheoutputissimplydriveinmorethanoneofthephasesSET_SLCD(11TO8,0x03000000);Obviouslythemaximumnumberofsegmentsthatcanbecontrolledbythispinis4,wherethefollowingwouldenableCOL,4C,4Band4A–eachintheircorrespondingdrivephase[0x1isphase1,0x02isphase2,0x04isphase3and0x08isphase4].
SET_SLCD(11TO8,0x03000000);www.
uTasker.
comTasker–SegmentLCDuTasker_SLCD.
doc/1.
09/1627.
01.
20143.
2.
KinetisK40GLCDConfigurationExampleTheKinetisK40containsanSLCDcontrollerandisusedasillustrationoftheinitializationandcontrolintheTaskerproject.
TwoSLCDtypesarediscussed:-28segmentSLCDontheTWRPI-SLCDmodulewhichcanbeusedtogetherwiththeTWR-K40X256towerprocessorboard-306segmentSLCDontheK40KWIKSTIKDuringinitialisation,themacroCONFIGURE_SLCD()iscalled.
Thismacroisconfiguredinapp_hw_kinetis.
htosuitthedisplaytypes.
ThedefinesforthetwoSLCDtypesareshownbelow:TWRPI-SLCD#defineCONFIGURE_SLCD()MCG_C1|=MCG_C1_IRCLKEN;\POWER_UP(3,SIM_SCGC3_SLCD);\LCD_GCR=(LCD_GCR_VSUPPLY_VLL3|LCD_GCR_SOURCE|LCD_GCR_LCLK_4|LCD_GCR_DUTY_4BP|LCD_GCR_ALTDIV_NONE);\LCD_PENL=0x0070f00f;\LCD_PENH=0x00000000;\LCD_BPENL=0x0000000f;\LCD_BPENH=0x00000000;\fnClearSLCD();\WRITE_SLCD(3TO0,0x08040201);\LCD_GCR=(LCD_GCR_LCDEN|LCD_GCR_VSUPPLY_VLL3|LCD_GCR_SOURCE|LCD_GCR_LCLK_4|LCD_GCR_DUTY_4BP|LCD_GCR_ALTDIV_NONE);KWIKSTIK#defineCONFIGURE_SLCD()MCG_C1|=MCG_C1_IRCLKEN;\POWER_UP(3,SIM_SCGC3_SLCD);\LCD_GCR=(LCD_GCR_CPSEL|LCD_GCR_RVEN|LCD_GCR_RVTRIM_MASK|LCD_GCR_LADJ_MASK|LCD_GCR_LCLK_0|LCD_GCR_VSUPPLY_VLL3_EXT|LCD_GCR_SOURCE|LCD_GCR_DUTY_8BP|LCD_GCR_ALTDIV_NONE);\LCD_PENL=0xfffffffe;\LCD_PENH=0x0000ffff;\LCD_BPENL=0x00000000;\LCD_BPENH=0x0000ff00;\fnClearSLCD();\WRITE_SLCD(43TO40,0x08040201);\WRITE_SLCD(47TO44,0x80402010);\LCD_GCR=(LCD_GCR_LCDEN|LCD_GCR_CPSEL|LCD_GCR_RVEN|LCD_GCR_RVTRIM_MASK|LCD_GCR_LADJ_MASK|LCD_GCR_LCLK_0|LCD_GCR_VSUPPLY_VLL3_EXT|LCD_GCR_SOURCE|LCD_GCR_DUTY_8BP|LCD_GCR_ALTDIV_NONE);Theconfigurationsequenceinvolvesthefollowingsteps:-The32kHzinternalRCoscillatorisenabledsinceitcanbeusedasaclocksourcetothecontroller,whichrequiresaclockinthe30.
0kHzto39.
063kHzrange.
-TheSLCDmoduleispoweredup.
www.
uTasker.
comTasker–SegmentLCDuTasker_SLCD.
doc/1.
010/1627.
01.
2014-Thebasicconfigurationisset(thisdependsontherequirementsoftheSLCDmoduleinrespecttovoltages,etc.
)buttheoperationisnotyetenabled.
Notethattheclocksourcematchestherequiredclockspeedandsonoclockdividersareconfigured.
-Therequiredfrontplaneandbackplanesignalsareenabled(LCD_PENxandLCD_BPENx)whichdependsontheSLCDtype,sizeandconnection.
TheK40'sGPIOpinsassociatedwiththeSLCDalldefaulttoSLCDuseandnospecificGPIOconfigurationisnecessarytousethem.
-TheroutinefnClearSLCD()iscalledtoensurethatallsegmentsdefaulttotheoffstate.
IfthisisnotperformedsegmentsinitialstatescouldberandomontheK40.
Theroutineclearsallsegmentregistercontents.
-Thebackplanesignalsaresetactive.
-Finallytheoperationisenabled.
Whenusingdifferentmoduletypestheinitialisationmayneedtobemodifiedtosuititscharacteristics,sizeandconnection.
3.
3.
KinetisK40GLCDControlExampleTheK40SLCDcontrollercontainsanumberofregisterswhichmapeachindividualsegmentontheSLCDtoabit.
DependingontheconnectionandconfigurationthebitscontrollingeachsegmentwillbespecifictotheSLCDtype.
Theprogrammersimplyneedstosetabitwhenthecorrespondingsegmentshouldbeonandclearthebitwhenthesegmentistobeoff.
ThefactthatthereisnostandardcoordinationbetweenthebitsusedandalsowhatthesymbolsactuallyarethereisnoSLCDapplicationinterfacedefined.
Actualcontrolofthedisplaytendstoberelativelysimpleduetothefactthatthesegmentsseemtobecontrolledasindividualportbits.
ThefollowingsectionintroducestheTaskerSLCDsimulator,wheretheK40segmentregisterswillbeseeninmoredetail.
InordertoautomaticallyinterfacewiththesimulatorthefollowingmacrosareusedintheK40projecttomodifysegments:#defineWRITE_SLCD(reg,val);//writesegmentvalues#defineSET_SLCD(reg,val);//setspecifiedbits#defineCLEAR_SLCD(reg,val);//clearspecifiedbits#defineTOGGLE_SLCD(reg,val);//togglespecifiedbitsThereareanumberofregisters,eachcontrollingupto32individualsegments('1'isonand'0'isoff).
TheK40has16suchsegmentregistersnamedLCD_WF3TO0toLCD_WF63TO60.
Theprogrammermustknowwhichsegmentismappedtowhichbitinwhichregistertobeabletocontrolthedisplaystate.
Whenthemacrosareusedthesimulatoralsoautomaticallyupdatestheresultingimageaccordingly.
Ifregisterchangesbasedontechniquenotusingthemacros(eg.
directpointeraccess,whichmaybemorepracticalinsomecases)isused,afinalcalltooneofthemacroswillalsosynchronisethestateofthesimulatedimagetotheregistercontent.
Anexampleoftogglingthestateofaparticularsegmentwouldbe:TOGGLE_SLCD(3TO0,0x1000);www.
uTasker.
comTasker–SegmentLCDuTasker_SLCD.
doc/1.
011/1627.
01.
2014Inthiscasethe12thbitintheregisterLCD_WF3TO0willbetoggledandtheSLCDdisplaycorrespondinglyupdatedinthesimulator.
OntherealhardwaretheSLCDcontrollerwillofcoursealsomodifythecontroloftheinfluencedsegmentaccordingly.
4.
SLCDSimulatorTheTaskersimulatorincludesanSLCDsimulationmodulewhichautomaticallydisplaythecontentoftheSLCDbasedonthesettingofthesegmentregisters.
Asdetailedintheprevioussection,theuseofthesegmentcontrolmacrosensuresthattheseremainsynchronised,wherebythechangedsegmentsaremodifiedeachtimesuchamacrohasbeenexecuted.
ThesimulatorallowscompleteprojectcodetobeaccuratelytestedwithinthesimulationenvironmentwithouttheneedtoworkonHW.
Itcanalsobeusedforsimulatinguser-definedSLCDmoduleswhicharenotyetavailableashardwareinordertoaccelerateprojectdevelopments.
DuetothefactthatthereisnostandardSLCDthesimulatormakesuseofSLCDscriptfileswhichareuserdefinable.
ThesescriptfilesareusuallymaintainedinadirectorycalledSLCDintheprojectsimulationdirectory(eg.
\Applications\uTaskerV1.
4\Simulator\SLCD).
Iftheprojectisconfiguredwithasimulatorfilethesimulationwillbeincluded.
InadditionsomedetailsaboutthesizeandcolouroftheSLCDissupplied.
ThefollowingshowstheconfigurationoftheTWRPI-SLCDmodule:#defineSLCD_FILE"SLCD\\TWR_K40.
lcd"//SLCDsimulationfileinthesimulatordirectorySLCD//#defineBIG_PIXEL//showSLCDdoublesize#defineLCD_ON_COLOUR(COLORREF)RGB(210,220,210)//RGBcolourofLCDwhenbacklightison#defineLCD_OFF_COLOUR(COLORREF)RGB(10,10,10)//RGBcolourofLCDwhenbacklightisoff#defineLCD_PIXEL_COLOUR(COLORREF)RGB(0,0,0)//RGBcolourofLCDpixels#defineGLCD_X380#defineGLCD_Y90TheSLCDscriptfileisTWR_K40.
lcd.
TheLCDsizeisdefinedasbeing380pixelswideand90pixelshigh,wherebythisreferstothesimulatedimageandnotdirectlytothedisplaytypebeingusedsincetheyaregenerallynotpixeloriented.
IfBIG_PIXELisactivated,thedisplaysizeisdoubledinthesimulator.
InordertounderstandthescriptfilecontentthesimpleSLCDwillfirstbedisplayed:Thisexampleshows3x7-segmentdigits.
Thefirst'1'isasinglesegment,asarethe':','°','%',"AM","PM"andfreescalelogo.
Thismeansthatthereare28individualsegments,whicharecontrolledbyparticularbitsintheSLCDcontroller'sregistersLCD_WF15TO12andLCD_WF23TO20.
www.
uTasker.
comTasker–SegmentLCDuTasker_SLCD.
doc/1.
012/1627.
01.
2014Thescriptfilerequiresamonochromebitmapofeachofthesegmenttypes;theFreescalelogoisasinglebitmap,asarethe'°AM",etc.
;the7-segmentdigitsareacollectionof7differentbitmaps;thethree7-segmentdigitscansharethesamesegmentbitmapssincetheyareessentiallybuiltupofthesameshapes.
Thecompletescriptfileisshownbelow://SLCDdefinitionfortheTWRPI-SLCDontheTWR-K40x256board(350x90pixelsusedasbase)////bitmapdefines(theseshouldbemonochromebitmaps)-BMP0toBMP99possible//BMP0"freescale1.
bmp"BMP1"digit1.
bmp"BMP2"seven_seg_b_l.
bmp"BMP3"seven_seg_t_l.
bmp"BMP4"seven_seg_top.
bmp"BMP5"seven_seg_b_r.
bmp"BMP6"seven_seg_t_r.
bmp"BMP7"seven_seg_mid.
bmp"BMP8"seven_seg_bot.
bmp"BMP9"degree.
bmp"BMP10"percent.
bmp"BMP11"am.
bmp"BMP12"pm.
bmp"BMP13"dp.
bmp"//backplanebits//bx//notused//frontplanebits//segmentnumber,BMPnumber,x-coordinate,y-coordinate//f12302015//freescalelogof17911055//'1'f12031255//first7-segment-topleftf12221255//bottomleftf11361535//toprightf11451535//bottomrightf11241254//topf121712541//middlef115812578//bottomf1071318026//':'f10432055//second7-segment-topleftf10622055//bottomleftf9762335//toprightf9852335//bottomrightf9642054//topf105720541//middlef99820578//bottomf17632555//second7-segment-topleftf17822555//bottomleftf16162835//toprightf16252835//bottomrightf16042554//topf177725541//middlef163825578//bottomf16893107//°f1691033535//%f1701133053//AMf1711233069//PMwww.
uTasker.
comTasker–SegmentLCDuTasker_SLCD.
doc/1.
013/1627.
01.
2014//endoffileScriptfiledevelopmentisverysimpleandinvolvesthefollowingsteps:1.
Eachsegmenttypeisassignedamonochromebitmap,whichshouldbeinthesamedirectoryasthescriptfileitself.
EachisgivenauniquereferenceBMPx.
2.
Inthisversionthebackplanesignalsarenotdefined.
3.
Thesegmentsaredefinedinthefrontplanesectionbyreferencingeachpossiblesegmenttoitsbitmapanditsx,ycoordinates.
Eg.
f12302015meansthatthesegmentnumber123(countingfrom0.
.
123)ismappedtothebitmapnumber0(referenceBMP0).
ItisdrawnatSLCDlocation20,15.
NotethatthesegmentnumberitselfisSLCDspecificandsothisusermustknowwhichregisterbitactuallycontrolseachsegment.
Thesegmentnumber123isinfactthe124thbitintheK40segmentcontrolregisterset,whichcorrespondstoLCD_WF15TO12,bit27,controlledbyTOGGLE_SLCD(15TO12,0x08000000);Notethatsegmentscansharebitmapreferencespositionedatdifferentlocations.
Thisisillustratedwellbythe7-segmentdefinition,wherethethree7-segmentgroupsareconstrictedbysharingthesamebitmapspositionedatlocationsoffsetinthex-directiononly.
TheTaskerprojectfortheKinetisincludesscriptfilesandbitmapsetsforthetwodisplaymentionedearlier,wherebytheKWIKSTIKdisplayisrathermorecomplicatedthanthissimplerexample.
Userscandefinetheirwonscriptfilesbasedontheexampleabovetosupportdifferenttypesoruser-specificones.
Thefollowingpracticaltipssimplifytheprocess:-Itisrecommendedfirsttomeasurethephysicaldisplaysizetogetanideaofdimensions.
Forexample,adisplayof3cmx1cmcouldberepresentedbyasimulatedimagesizeof300x100pixels,allowingpixellocationstocalculatedeasily.
-Beforeallbitmapsareavailableitisadvisabletousedummybitmapsofapproximatesizeoftheonesfinallytobeused.
ThesecansimplybeblackimagessothattheycanbeviewedandthenadjustedtotheirexactlocationsbytuningtheBMPsizeitselfandadjustingthex,ycoordinatesinthescriptfile.
Oncetheimagesizesandlocationsareaccuratetheircontentcanbeoptimised.
-Thesimulatorincludesamenuitem"SLCD|Showallsegments"whichallowsallexistingsegmentstobedisplayedatthesametimewithouttheneedtowriteanyspecialapplicationcodetoaidthescriptfiledevelopment.
Torevertbacktonormaldisplaythecommand"SLCD|Releasesegments"canbeused.
Resultsofsimulationsareshowninthenextchapterwhereworkingdemonstrationsareshown.
NotethatthebehaviourinthesimulatoristhesameasthebehaviourontheHWtarget,whichisthegoalofthesimulator,thusremovingthenecessitytodevelopprojectsonthehardwareitselfandcorrespondinglyimproveprojectdevelopmentefficiency.
www.
uTasker.
comTasker–SegmentLCDuTasker_SLCD.
doc/1.
014/1627.
01.
20145.
PracticalExamplesSincetheSLCDoperationrequiresverylittleprojectcode,controloftheSLCDwasaddedtotheK40USBbootloadertoillustrateitsoperationonthehardwareandinthesimulator.
WhenthebootloaderisrunningtheFreescalelogosareflashedonthedisplay.
WhentheUSBconnectionisestablishedtheUSBsymbolisdisplayedontheKWIKSTIKSLCDandthelettersUSBaredisplayedonthetowerboardSLCD.
Whensimulating,thecompleteSLCDdisplaycanbeshownbyexecutingthemenucommand"SLCD|Showallsegments".
Toreturntonormalviewthecommand"SLCD|Releasesegments"canbeexecuted.
ThefollowingimagesshowthesimulateddisplaysshowingallSLCDsymbolsaswellastheenumeratedUSBimagestate(thisisthecasewheneithertheUSBcableisconnectedtothecorrespondingprocessormoduleorelsetheenumerationsequenceissuccessfullysimulatedintheTaskersimulator(byexecutingthemenu"USB|Enumeration").
TWR-K40X256simulationshowingallSLCDsegmentsonwww.
uTasker.
comTasker–SegmentLCDuTasker_SLCD.
doc/1.
015/1627.
01.
2014TWR-K40X256simulationshowingenumeratedUSBKWIKSTIKsimulationshowingallSLCDsegmentsonwww.
uTasker.
comTasker–SegmentLCDuTasker_SLCD.
doc/1.
016/1627.
01.
2014KWIKSTIKsimulationshowingenumeratedUSBTheoperationoftherealmodulesareshowinthefollowingshortvideo:http://www.
youtube.
com/watchv=nm2DmZv1rj86.
ConclusionThisdocumenthasgivenabriefintroductiontotheoperationofSLCDmodulesandSLCDcontrollers.
TheSLCDsupportintheTaskerprojecthasbeendiscussedbasedonsimulationandpracticalexamplesoftheSLCDoperationonKinetisKL46andK40modules.
Modifications:-V0.
022.
07.
2011Firstdraft–inprogress-V1.
027.
01.
2014FRDM-KL46Zaddedplusadditionalgenericoperationdetails-released
racknerd从成立到现在发展是相当迅速,用最低的价格霸占了大部分低端便宜vps市场,虽然VPS价格便宜,但是VPS的质量和服务一点儿都不拉跨,服务器稳定、性能给力,尤其是售后方面时间短技术解决能力强,估计这也是racknerd这个品牌能如此成功的原因吧! 官方网站:https://www.racknerd.com 多种加密数字货币、信用卡、PayPal、支付宝、银联、webmoney,可...
LOCVPS在农历新年之后新上架了日本大阪机房软银线路VPS主机,基于KVM架构,配备原生IP,适用全场8折优惠码,最低2GB内存套餐优惠后每月仅76元起。LOCVPS是一家成立于2012年的国人VPS服务商,提供中国香港、韩国、美国、日本、新加坡、德国、荷兰、俄罗斯等地区VPS服务器,基于KVM或XEN架构(推荐选择KVM),线路方面均选择国内直连或优化方案,访问延迟低,适合建站或远程办公使用。...
韩国服务器怎么样?韩国云服务器租用推荐?韩国服务器距离中国近,有天然的地域优势,韩国服务器速度快而且非常稳定!有不少有亚洲市场的外贸公司选择韩国服务器开拓业务,韩国服务器因自身的优势也受到不少用户的青睐。目前的IDC市场上,韩国、香港、美国三个地方的服务器几乎占据了海外服务器的百分之九十以上。韩国服务器相比美国服务器来说速度更快,而相比香港机房来说则带宽更充足,占用市场份额非常大。那么,韩国服务器...
youtubemp3mp4为你推荐
木马病毒什么是木马病毒?站长故事部队里什么是站长?最低是什么级别?都有哪些级别啊?vista系统重装怎样重装vista系统缓冲区溢出教程溢出攻击法使用什么样的原理网站运营一般网站如何运营淘宝店推广如何推广淘宝店申请证书求高手教下怎么申请证书网易公开课怎么下载手机上的网易公开课的付费课程怎么下载??????硬盘人电脑对人有多大辐射?mate8价格手机华为mat8售价多少
东莞虚拟主机 fc2新域名 edis 名片模板psd 发包服务器 hinet 最好的qq空间 空间技术网 hktv 支付宝扫码领红包 流媒体加速 台湾google vul web应用服务器 免费网络 wordpress中文主题 中国联通宽带测速 域名转入 谷歌搜索打不开 远程登录 更多