hlxldb

LED光立方制作全过程(三十七)

Step58Software:Effect2,planeboingiInstructJS.load(['instruct','imagespot'],function(){varspotspot740584=newImageSpot('spot740584',{loadID:'F6L3GT0GI0TMGUD',editimagedata:'false',imageDataEditorPlace:'',showInfo:true,size

LED光立方制作全过程(三十六)

Step57Software:Effect1,rainiInstructJS.load(['instruct','imagespot'],function(){varspotspot740426=newImageSpot('spot740426',{loadID:'FOY1PD8GICYB274',editimagedata:'false',imageDataEditorPlace:'',showInfo:true,size:'MEDIUM'});newIma

LED光立方制作全过程(三十五)

Step55Software:CubevirtualspaceNowthatwehaveacubebufferandanicelittlecollectionoflowleveldrawfunctionstopopulateit,weneedtoagreeonwhichwaysiswhat,andwhatisupandwhatisdown;)Fromnowon,thenativepositionoftheLEDcubewillbewiththecablesco

LED光立方制作全过程(三十四)

Step54Software:LowlevelfunctionsWehavemadeasmalllibraryoflowlevelgraphicfunctions.Therearethreemainreasonsfordoingthis.MemoryfootprintTheeasiestwaytoaddresseachvoxelwouldbethroughathreedimensionalbufferarray.Likethis:unsignedcharcube[x][y][z];(charme

LED光立方制作全过程(三十三)

Step53Software:InterruptroutineimagenotfoundTheinterruptroutinepullsOutputEnablehighwhilerunningtodisabletheoutputofthelatcharray.chriimagenotfoundLayer0isonchrLayer1isonchrMyoscilloscopedoesnthave8channels,soIcanonlyshowthefi

LED光立方制作全过程(三十二)

Step52Software:ModeselectionandrandomseedimagenotfoundblinkblinkblinkchriWhenwefirststartedwritingeffectsanddebuggingthem,wenoticedthatthefunctionsusingrandomnumbersdisplayedtheexactsameanimationseverytime.Itwasrandomalright,butthesameran

LED光立方制作全过程(三十一)

Step51Software:IOinitializationThefirstthingtheATmegadoesafterboot,istocalltheioinit()function.ThisfunctionsetsupIOports,timers,interruptsandserialcommunications.AllIOportsontheATmegaarebi-directional.Theycanbeusedeitherasaninputoranoutput.Weconfigur

LED光立方制作全过程(三十)

Step49Software:IntroductionThesoftwareiswritteninCandcompiledwiththeopensourcecompileravr-gcc.ThisisthemainreasonweuseAtmelAVRmicrocontrollers.ThePICseriesfromMicrochipisalsoanicechoice,butmostoftheCcompilerscostmoney,andthefreeversionshavelimitation

LED光立方制作全过程(二十九)

Step47TestthecubeThetestcodeyouprogrammedinthepreviousstepwillletyouconfirmthateverythingiswiredupcorrectly.Itwillstartbydrawingaplanealongoneaxis,thenmovingitalongall8positionsofthataxis.(byplanewemeanaflatsurface,notanairplane:p)Thetestcodewilltrav

LED光立方制作全过程(二十八)

Step45ProgramtheAVR:SetthefusebitsTheATmega32hastwofusebytes.ThesecontainsettingsthathavetobeloadedbeforetheCPUcanstart,likeclocksourceandotherstuff.YouhavetoprogramyourATmegatouseanexternalhighspeedcrystaloscillatoranddisableJTAG.Wesetthelowerfuseby

LED光立方制作全过程(二十七)

Step43Buildthecontroller:ConnecttheboardsThetwoboardsareconnectedbytwocables:AribboncablefortheDATAandAddressBUS.A2wirecableforGNDandVCC.Afterconnectingthesetwocables,yourboardiscomplete.Step44Buildthecontroller:ConnectthecubeConnecttheribboncablesac

LED光立方制作全过程(二十六)

Step42Buildthecontroller:MakeanRS-232cable(这篇的图有些多了~)ToconnecttheLEDcubetoaserialportonyourcomputer,youneedtomakeaserialcablewithafemaleD-Sub9pinconnector.Ouremployerdeployed70Ethernetswitcheswithmanagementlastyear.WitheachswitchcomesanRS23

LED光立方制作全过程(二十五)

Step41Buildthecontroller:RS-232Togetthetrulyamazinganimations,weneedtoconnecttheLEDcubetoaPC.ThePCcandofloatingpointcalculationsthatwouldhavetheAVRworkinginslowmotion.TheATmegahasabuiltinserialinterfacecalledUSART(UniversalSynchronousandAsynchronouss

LED光立方制作全过程(二十四)

Step40Buildthecontroller:ButtonsandstatusLEDsimagenotfoundStartthecubeinautonomousmodechriYoucanmakeaLEDcubewithoutanybuttonsatall,butitsnicetohaveatleastonebuttonandsomestatusLEDsfordebugging.WeaddedoneawesomelookingbuttonwithtwobuiltinL

LED光立方制作全过程(二十三)

Step39Buildthecontroller:TransistorarrayimagenotfoundPullupresistors.Thistypeofresistoriscalledaresistornetwork.Itjusthasabunchofresistorsconnectedtoacommonpin.chrTwoandtworesistorsworktogether.chriimagenotfoundiimagenotfound&