LED光立方制作全过程(四十二)
Step65PCSoftware:CubeupdaterthreadIncube.cwehaveafunctioncalledcube_push().Thistakesthe64bytearrayandsendsitdowntheseriallinetotheLEDcube.Italsohandlestheformatting,sendingevery0xffbytetwicebecause0xffisourescapecharacter.0xffand0x00issentfirst
发表于 2011/5/15 上午12:12:50
阅读(1992)
LED光立方制作全过程(四十一)
Step63Software:RS-232inputTogeneratethemostawesomeeffects,weuseadesktopcomputer.Computerscandofloatingpointcalculationsandstufflikethatmuchquickerthanamicrocontroller.Andyoudonthavetore-programthemicrocontrollerforeveryeffectyoumake,oreverytime
发表于 2011/5/14 下午2:09:32
阅读(4257)
LED光立方制作全过程(三十八)
Step59Software:Effect3,sendvoxelsrandomZThiseffectsendsvoxelsupanddowntheZaxis,astheimplies.voidsendvoxels_rand_z()takesthreearguments.Iterationsisthenumberoftimesavoxelissentupordown.Delayisthespeedofthemovement(higherdelaymeanslowerspeed).Wai
发表于 2011/5/13 下午6:47:56
阅读(2157)
LED光立方制作全过程(三十五)
Step55Software:CubevirtualspaceNowthatwehaveacubebufferandanicelittlecollectionoflowleveldrawfunctionstopopulateit,weneedtoagreeonwhichwaysiswhat,andwhatisupandwhatisdown;)Fromnowon,thenativepositionoftheLEDcubewillbewiththecablesco
发表于 2011/5/12 下午11:10:09
阅读(2528)
LED光立方制作全过程(三十三)
Step53Software:InterruptroutineimagenotfoundTheinterruptroutinepullsOutputEnablehighwhilerunningtodisabletheoutputofthelatcharray.chriimagenotfoundLayer0isonchrLayer1isonchrMyoscilloscopedoesnthave8channels,soIcanonlyshowthefi
发表于 2011/5/11 下午4:01:06
阅读(2198)
LED光立方制作全过程(三十二)
Step52Software:ModeselectionandrandomseedimagenotfoundblinkblinkblinkchriWhenwefirststartedwritingeffectsanddebuggingthem,wenoticedthatthefunctionsusingrandomnumbersdisplayedtheexactsameanimationseverytime.Itwasrandomalright,butthesameran
发表于 2011/5/11 下午2:28:27
阅读(2065)
LED光立方制作全过程(三十)
Step49Software:IntroductionThesoftwareiswritteninCandcompiledwiththeopensourcecompileravr-gcc.ThisisthemainreasonweuseAtmelAVRmicrocontrollers.ThePICseriesfromMicrochipisalsoanicechoice,butmostoftheCcompilerscostmoney,andthefreeversionshavelimitation
发表于 2011/5/11 上午12:30:27
阅读(2202)
LED光立方制作全过程(二十九)
Step47TestthecubeThetestcodeyouprogrammedinthepreviousstepwillletyouconfirmthateverythingiswiredupcorrectly.Itwillstartbydrawingaplanealongoneaxis,thenmovingitalongall8positionsofthataxis.(byplanewemeanaflatsurface,notanairplane:p)Thetestcodewilltrav
发表于 2011/5/9 下午11:20:21
阅读(2550)
LED光立方制作全过程(二十八)
Step45ProgramtheAVR:SetthefusebitsTheATmega32hastwofusebytes.ThesecontainsettingsthathavetobeloadedbeforetheCPUcanstart,likeclocksourceandotherstuff.YouhavetoprogramyourATmegatouseanexternalhighspeedcrystaloscillatoranddisableJTAG.Wesetthelowerfuseby
发表于 2011/5/9 上午12:56:18
阅读(1851)
LED光立方制作全过程(二十六)
Step42Buildthecontroller:MakeanRS-232cable(这篇的图有些多了~)ToconnecttheLEDcubetoaserialportonyourcomputer,youneedtomakeaserialcablewithafemaleD-Sub9pinconnector.Ouremployerdeployed70Ethernetswitcheswithmanagementlastyear.WitheachswitchcomesanRS23
发表于 2011/5/8 上午12:15:11
阅读(1982)
LED光立方制作全过程(二十五)
Step41Buildthecontroller:RS-232Togetthetrulyamazinganimations,weneedtoconnecttheLEDcubetoaPC.ThePCcandofloatingpointcalculationsthatwouldhavetheAVRworkinginslowmotion.TheATmegahasabuiltinserialinterfacecalledUSART(UniversalSynchronousandAsynchronouss
发表于 2011/5/7 上午11:00:17
阅读(2622)
LED光立方制作全过程(二十四)
Step40Buildthecontroller:ButtonsandstatusLEDsimagenotfoundStartthecubeinautonomousmodechriYoucanmakeaLEDcubewithoutanybuttonsatall,butitsnicetohaveatleastonebuttonandsomestatusLEDsfordebugging.WeaddedoneawesomelookingbuttonwithtwobuiltinL
发表于 2011/5/6 下午12:48:58
阅读(31534)
LED光立方制作全过程(二十二)
Step38Buildthecontroller:AVRboardimagenotfoundiimagenotfoundiimagenotfoundiimagenotfoundIncircuitserialprogrammingheader.chriBraaaaainzz!!!ThisboardisthebrainoftheLEDcube.ThemaincomponentisanAtmelAVRATmega32.
发表于 2011/5/5 上午12:06:40
阅读(2785)
LED光立方制作全过程(二十一)
Step36Buildthecontroller:ConnecttheICs,8bitbus+OEimagenotfoundiInthepicture,youllnoticealotofwireshavecomeintoplace.Allthetinybluewiresmakeupthe8+1bitbusthatconnectsallthelatchICs.8bitsarefordata,andthe+1bitistheoutputenableline.Att
发表于 2011/5/4 上午8:49:43
阅读(6771)
LED光立方制作全过程(二十)
Step35Buildthecontroller:PowerrailsandICpowerimagenotfoundVCCcrossesGNDonceforeachrowofICschriimagenotfoundGNDandVCCrunsalongthelengthoftheboard.chriRememberthatprotoboardsolderingtrickweshowedyouinapreviousstep?Wetoldyouitwouldcome
发表于 2011/5/3 下午1:01:30
阅读(1836)
