;

hlxldb

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

Step65PCSoftware:CubeupdaterthreadIncube.cwehaveafunctioncalledcube_push().Thistakesthe64bytearrayandsendsitdowntheseriallinetotheLEDcube.Italsohandlestheformatting,sendingevery0xffbytetwicebecause0xffisourescapecharacter.0xffand0x00issentfirst

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

Step63Software:RS-232inputTogeneratethemostawesomeeffects,weuseadesktopcomputer.Computerscandofloatingpointcalculationsandstufflikethatmuchquickerthanamicrocontroller.Andyoudonthavetore-programthemicrocontrollerforeveryeffectyoumake,oreverytime

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

Step59Software:Effect3,sendvoxelsrandomZThiseffectsendsvoxelsupanddowntheZaxis,astheimplies.voidsendvoxels_rand_z()takesthreearguments.Iterationsisthenumberoftimesavoxelissentupordown.Delayisthespeedofthemovement(higherdelaymeanslowerspeed).Wai

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

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

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

Step53Software:InterruptroutineimagenotfoundTheinterruptroutinepullsOutputEnablehighwhilerunningtodisabletheoutputofthelatcharray.chriimagenotfoundLayer0isonchrLayer1isonchrMyoscilloscopedoesnthave8channels,soIcanonlyshowthefi

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

Step52Software:ModeselectionandrandomseedimagenotfoundblinkblinkblinkchriWhenwefirststartedwritingeffectsanddebuggingthem,wenoticedthatthefunctionsusingrandomnumbersdisplayedtheexactsameanimationseverytime.Itwasrandomalright,butthesameran

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

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

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

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

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

Step45ProgramtheAVR:SetthefusebitsTheATmega32hastwofusebytes.ThesecontainsettingsthathavetobeloadedbeforetheCPUcanstart,likeclocksourceandotherstuff.YouhavetoprogramyourATmegatouseanexternalhighspeedcrystaloscillatoranddisableJTAG.Wesetthelowerfuseby

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

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

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

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

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

Step40Buildthecontroller:ButtonsandstatusLEDsimagenotfoundStartthecubeinautonomousmodechriYoucanmakeaLEDcubewithoutanybuttonsatall,butitsnicetohaveatleastonebuttonandsomestatusLEDsfordebugging.WeaddedoneawesomelookingbuttonwithtwobuiltinL

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

Step38Buildthecontroller:AVRboardimagenotfoundiimagenotfoundiimagenotfoundiimagenotfoundIncircuitserialprogrammingheader.chriBraaaaainzz!!!ThisboardisthebrainoftheLEDcube.ThemaincomponentisanAtmelAVRATmega32.

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

Step36Buildthecontroller:ConnecttheICs,8bitbus+OEimagenotfoundiInthepicture,youllnoticealotofwireshavecomeintoplace.Allthetinybluewiresmakeupthe8+1bitbusthatconnectsallthelatchICs.8bitsarefordata,andthe+1bitistheoutputenableline.Att

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

Step35Buildthecontroller:PowerrailsandICpowerimagenotfoundVCCcrossesGNDonceforeachrowofICschriimagenotfoundGNDandVCCrunsalongthelengthoftheboard.chriRememberthatprotoboardsolderingtrickweshowedyouinapreviousstep?Wetoldyouitwouldcome
;
;