hlxldb

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&

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

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

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

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

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

Step35Buildthecontroller:PowerrailsandICpowerimagenotfoundVCCcrossesGNDonceforeachrowofICschriimagenotfoundGNDandVCCrunsalongthelengthoftheboard.chriRememberthatprotoboardsolderingtrickweshowedyouinapreviousstep?Wetoldyouitwouldcome

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

Step34Buildthecontroller:ICsockets,resistorsandconnectorsimagenotfoundInputsidenotsolderedyet.chrResistorsolderedtoICchrResistorsolderedtoconnectorchriimagenotfoundiInthisstepyouwillbesolderinginthemaincomponentsofthemultiplexerarra

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

Step33Buildthecontroller:PowerterminalandfilteringcapacitorsThecubeiscomplete,nowallthatremainsisamonstercircuittocontrolthething.Letsstartwiththeeasiestpart,the"powersupply".ThepowersupplyconsistsofascrewterminalwhereyouconnecttheGNDandVCC

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

Step31Buildthecontroller:clockfrequencyWeuseanexternalcrystalof14.7456MHztodrivetheATmegasystemclock.Youmaybethinkingthatthisisanoddnumbertouse,andwhywedidntruntheATmegaatthe16MHzitisratedfor.WewanttobeabletocontroltheLEDcubefromacomputer,using

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

Step29Buildthecube:attachcables64+8wireshavetogofromthecontrollertotheLEDcube.Weusedribboncabletomakethingsalittleeasier.Thegroundlayersusean8-wireribboncable.Thecathodesareconnectedwith416-wireribboncables.Eachoftheseribboncablesaresplitintwoateithe