滚球体育

芯片IC单片机解密百科

十年专注单片机解密

单片机设计中如何摆脱电磁干扰

 1.单片机设计程序会由于电磁干扰大致会一下几种情况:


  ①CHENGXUPAOFEI。

  ZHEIZHONGQINGKUANGSHIZUICHANGJIANDEGANRAOJIEGUO,YIBANLAISHUOYOUYIGEHAODEFUWEIXITONGHUORUANJIANZHENCEXITONGJIKE,DUIZHENGGEYUNXINGXITONGDEBUHUICHANSHENGTAIDADEYINGXIANG。


  ②SIXUNHUANHUOBUZHENGCHANGCHENGXUDAIMAYUNXING。

滚球体育  DANGRANZHEIZHONGSIXUNHUANHEBUZHENGCHANGCHENGXUDAIMABINGFEISHEJIZHIYUANYOUYIXIEJINDE,WOMENZHIDAOCHENGXUDEZHILINGSHIYOUZIJIEZUCHENGDE,YOUDESHIDANZIJIEZHILINGERYOUDESHIDUOZIJIEZHILING,DANGGANRAOCHANSHENGHOUSHIDEPCZHIZHENFASHENGBIANHUA,CONGERSHIYUANLAIDECHENGXUDAIMAFASHENGLEZHONGZUCHANSHENGLEBUKECAICEDEKEZHIXINGDECHENGXUDAIMA,NEIME,ZHEIZHONGCUOWUSHIZHIMINGDE,TAHUIYOUKENENGHUIWANGXIUGAIZHONGYAODESHUJUCANSHU,YOUKENENGCHANSHENGBUKECAICEDEKONGZHISHUCHUDENGYIXILIECUOWUZHUANGTAI。


  2.单片机设计对重要参数储存的措施


  YIBANQINGKUANGXIA,WOMENKEYICAIYONGCUOWUJIANCEYUJIUZHENGLAIYOUXIAODIJIANSHAOHUOBIMIANZHEIZHONGQINGKUANGDECHUXIAN。GENJUJIANCUO、JIUCUODEYUANLI,ZHUYAOSIXIANGSHIZAISHUJUXIEJINSHI,GENJUXIEJINDESHUJUTIANSHENGYIDINGWEISHUDEXIAOYANMA,YUXIANGYINGDESHUJUYIQIBAOCUNQILAI;DANGDUCHUSHI,TONGSHIYEJIANGXIAOYANMADUCHU,JINXINGPANJUE。JIARUCHUXIANYIWEICUOWUZEZIDONGJIUZHENG,JIANGZHENGQUEDESHUJUSONGCHU,BINGTONGSHIJIANGGAIZHENGYIHOUDESHUJUHUIXIEFUGAIYUANLAICUOWUDESHUJU;JIARUCHUXIANLIANGWEICUOWUZECHANSHENGZHONGDUANBAOGAO,TONGZHICPUJINXINGYICHANGCHULI。SUOYOUZHEIYIQIEDONGZUODOUSHIKAORUANJIANSHEJIZIDONGWANCHENGDE,JUYOUSHISHIXINGHEZIDONGWANCHENGDETEDIAN。TONGGUOZHEIYANGDESHEJI,NENGDADAJINBUXITONGDEKANGGANRAONENGLI,CONGERJINBUXITONGDEKEKAOXING。


  JIANCUOYUJIUCUOYUANLI:SHOUXIANLAIKANKANJIANCUOHEJIUCUODEJIBENYUANLI。JINXINGCHACUOKONGZHIDEJIBENSIXIANGSHIZAIXINXIMAZUZHONGYIYIDINGGUIZEJIAJINBUTONGFANGSHIDERONGYUMA,YIBIANZAIXINXIDUCHUDESHIHOUYIKAODUOYUDEJIANSHIMAHUOXIAOMAMALAIFAXIANHUOZIDONGJIUZHENGCUOWU。


  ZHENDUIWUMAFASHENGDETEDIAN,JICUOWUFASHENGDESUIJIXINGHEXIAOGAIRENXING,TAJIHUZONGSHISUIJIDIYINGXIANGMOUGEZIJIEZHONGDEMOUYIWEI(bit),YINCI,JIARUNENGGOUSHEJIZIDONGJIUZHENGYIWEICUOWU,ERJIANCHALIANGWEICUOWUDEBIANMAFANGSHI。JIUKEYIDADAJINBUXITONGDEKEKAOXING。


  3.单片机设计对RAM和FLASH(ROM)的检测


滚球体育  ZAIBIANZHICHENGXUSHIWOMENZUIHAOSHIXIEJINYIXIEJIANCECHENGXULAICESHIRAMHEFLASH(ROM)DESHUJUDAIMA,KANYOUWUFASHENGCUOWU,YIDANFASHENGYAOLIJIJIUZHENG,JIUZHENGBULEDEYAOJISHIJICHUCUOWUZHISHI,YIBIANYONGHUWANGCHULI。


滚球体育  LINGWAI,ZAIBIANZHICHENGXUSHIJIAJINCHENGXURONGYUSHIBUKEQUESHAODE。ZAIYIDINGDEDIFANGJIAJINSANTIAOHUOSANTIAOYISHANGNOPZHILINGDUICHENGXUDEZHONGZUYOUZHEHENYOUXIAOFANGZHIZUOYONG。TONGSHI,ZAICHENGXUDEYUNXINGZHUANGTAIZHONGYAOYINJINBIAOZHISHUJUHEJIANCEZHUANGTAI,CONGERJISHIFAXIANHEJIUZHENGCUOWUCHANSHENG。

    

DUIYUYIGEDIANZIGONGCHENGSHILAISHUO,ZAIDANPIANJIDEDIANLUSHEJIZHONGDIANCIGANRAOBUJINGUANXILEDANPIANJIZAIKONGZHIZAIZHONGDENENGLIHEZHUNQUEDU,HAIGUANXIDAOQIYEZAIXINGYEZHONGDEJINGZHENG。DUIDIANCIGANRAODESHEJIBENWENZHUYAOCONGYINGJIANHERUANJIANFANGMIANJINXINGSHEJICHULI,XIAMIANJIUSHICONGDANPIANJIDEPCBSHEJIDAORUANJIANCHULIFANGMIANLAIJIESHAODUIDIANCIJIANRONGXINGDECHULI。

 

一、影响EMC的因数


  1.电压


  DIANYUANDIANYAYUEGAO,YIWEIZHEDIANYAZHENFUYUEDA,FASHEJIUGENGDUO,ERDIDIANYUANDIANYAYINGXIANGMINGANDU。


  2.频率


滚球体育  GAOPINCHANSHENGGENGDUODEFASHE,ZHOUQIXINGXINHAOCHANSHENGGENGDUODEFASHE。ZAIGAOPINDANPIANJIXITONGZHONG,DANGQIJIANKAIGUANSHICHANSHENGDIANLIUJIANFENGXINHAO;ZAIMONIXITONGZHONG,DANGFUZAIDIANLIUBIANHUASHICHANSHENGDIANLIUJIANFENGXINHAO。


  3.接地


  ZAISUOYOUEMCTIMUZHONG,ZHUYAOTIMUSHIBUSHIDANGDEJIEDIYINQIDE。YOUSANZHONGXINHAOJIEDIFANGFA:DANDIAN、DUODIANHEHUNHE。ZAIPINLVDIYU1MHzSHI,KECAIYONGDANDIANJIEDIFANGFA,DANBUSHIYIGAOPIN;ZAIGAOPINYINGYONGZHONG,ZUIHAOCAIYONGDUODIANJIEDI。HUNHEJIEDISHIDIPINYONGDANDIANJIEDI,ERGAOPINYONGDUODIANJIEDIDEFANGFA。DIXIANBUJUSHIGUANJIAN,GAOPINSHUZIDIANLUHEDIDIANPINGMONIDIANLUDEJIEDIDIANLUJINBUNENGHUNHE。


  4.PCB设计


  SHIDANGDEYINSHUADIANLUBAN(PCB)BUXIANDUIFANGZHIEMISHIZHIGUANZHONGYAODE。


  5.电源往耦


滚球体育  DANGQIJIANKAIGUANSHI,ZAIDIANYUANXIANSHANGHUICHANSHENGSHUNTAIDIANLIU,BIXUSHUAIJIANHELVDIAOZHEIXIESHUNTAIDIANLIU。LAIZIGAOdi/dtYUANDESHUNTAIDIANLIUDAOZHIDIHEXIANJI“FASHE”DIANYA,GAOdi/dtCHANSHENGDAFANWEIDEGAOPINDIANLIU,JILIBUJIANHEXIANLANFUSHE。LIUJINGDAOXIANDEDIANLIUBIANHUAHEDIANGANHUIDAOZHIYAJIANG,JIANXIAODIANGANHUODIANLIUSUISHIJIANDEBIANHUAKESHIGAIYAJIANGZUIXIAO。


二、对干扰措施的硬件处理方法


  1.印刷线路板(PCB)的电磁兼容性设计


  PCB SHIDANPIANJIXITONGZHONGDIANLUYUANJIANHEQIJIANDEZHICHENGJIAN,TATIGONGDIANLUYUANJIANHEQIJIANZHIJIANDEDIANQILIANJIE。SUIZHEDIANZIJISHUDEFEISUFAZHAN,PCBDEMIDUYUELAIYUEGAO。PCBSHEJIDEHAOHUAIDUIDANPIANJIXITONGDEDIANCIJIANRONGXINGYINGXIANGHENDA,SHIJIANZHENGSHI,JISHIDIANLUYUANLITUSHEJIZHENGQUE,YINSHUADIANLUBANSHEJIBUDANG,YEHUIDUIDANPIANJIXITONGDEKEKAOXINGCHANSHENGBULIYINGXIANG。LIRU,JIARUYINSHUADIANLUBANDELIANGTIAOXIPINGXINGXIANKAODEHENJIN,HUIXINGCHENGXINHAOBOXINGDEYANCHI,ZAICHUANSHUXIANDEZHONGDUANXINGCHENGFANSHEZAOSHENG。YINCI,ZAISHEJIYINSHUADIANLUBANDESHIHOU,YINGLIUYICAIYONGZHENGQUEDEFANGFA,ZUNSHOUPCBSHEJIDEYIBANYUANZE,BINGYINGFUHEKANGGANRAODESHEJIYAOQIU。YAOSHIDIANZIDIANLUHUODEZUIJIAXINGNENG,YUANQIJIANDEBUJUJIDAOXIANDEBUSHESHIHENZHONGYAODE。


  2.输入/输出的电磁兼容性设计


  ZAIDANPIANJIXITONGZHONGSHUJIN/SHUCHUYESHIGANRAOYUANDECHUANDAOXIAN,HEJIESHOUSHEPINGANRAOXINHAODESHIJIANYUAN,WOMENSHEJISHIYIBANYAOCAIQUYOUXIAODECUOSHI:


滚球体育  ①CAIYONGBIYAODEGONGMO/CHAMOYIZHIDIANLU,TONGSHIYEYAOCAIQUYIDINGDELVBOHEFANGDIANCIPINGBICUOSHIYIJIANXIAOGANRAODEJINJIN。


  ②ZAITIAOJIANXUKEDEQINGKUANGXIAJINKENENGCAIQUGEZHONGGELICUOSHI(RUGUANGDIANGELIHUOZHECIDIANGELI),CONGERZUDUANGANRAODECHUANBO。


  3.单片机复位电路的设计


  ZAIDEDANPIANJIXITONGZHONG,KANMENGOUXITONGDUIZHENGGEDANPIANJIDEYUNXINGQIZHETEBIEZHONGYAODEZUOYONG,YOUYUSUOYOUDEGANRAOYUANBUKENENGQUANBUBEIGELIHUOWANGCHU,YIDANJINJINCPUGANRAOCHENGXUDEZHENGCHANGYUNXING,NEIMEFUWEIXITONGJIEHERUANJIANCHULICUOSHIJIUCHENGLEYIDAOYOUXIAODEJIUCUOFANGYUDEPINGZHANGLE。CHANGYONGDEFUWEIXITONGYOUYIXIALIANGZHONG:


  ① WAIBUFUWEIXITONG。WAIBU“KANMENGOU”DIANLUKEYIZIJISHEJIYEKEYIYONGZHUANMENDE“KANMENGOU”XINPIANLAIDAJIAN。RANER,TAMENGEYOUYOUQUEDIAN,DABUFENZHUANYONG“KANMENGOU”XINPIANDUIDIPIN“WEIGOU”XINHAOBUNENGXIANGYING,ERGAOPIN“WEIGOU”XINHAODOUNENGXIANGYING,SHIQIZAIDIPIN“WEIGOU”XINHAOXIACHANSHENGFUWEIDONGZUOERZAIGAOPINDE“WEIGOU”XINHAOXIABUCHANSHENGFUWEIDONGZUO,ZHEIYANG,JIARUCHENGXUXITONGXIANJINYIGESIXUNHUAN,ERGAIXUNHUANZHONGQIAQIAOYOUZHE“WEIGOU”XINHAODEHUA,NEIMEGAIFUWEIDIANLUJIUWUFASHIXIANTADEYINGYOUDEGONGNENGLE。RANER,WOMENZIJIKEYISHEJIYIGEJUYOUDAITONGDE“WEIGOU”DIANLUHEQITAFUWEIDIANLUGOUCHENGDEXITONGJIUSHIYIGEHENYOUXIAOWAIBUJIANKONGXITONGLE。

滚球体育  ②XIANZAIYUELAIYUEDUODEDANPIANJIDOUDAIYOUZIJIDEPIANSHANGFUWEIXITONG,ZHEIYANGYONGHUJIUKEYIHENFANGBIANDESHIYONGQINEIBUDEFUWEIDINGSHIQILE,DANSHI,YOUYIXIEXINGHAODEDANPIANJITADEFUWEIZHILINGTAIGUOYUJIANDAN,ZHEIYANGYEHUICUNZAIXIANGSHANGSHUSIXUNHUANNEIYANGDE“WEIGOU”ZHILING,SHIQISHIWANGJIANKONGZUOYONG。YOUYIXIEDANPIANJIDEPIANSHANGFUWEIZHILINGJIUZUODEBIJIAOHAO,YIBANTAMENBA“WEIGOU”XINHAOZUOCHENGGUDINGGESHIDEDUOTIAOZHILINGYISHUNXULAIZHIXING,JIARUYOUYIDINGCUOWUZEGAI“WEIGOU”CAOZONGWUXIAO,ZHEIYANGJIUDADAJINBULEFUWEIDIANLUDEKEKAOXING。


  4.振荡器


  DABUFENDEDANPIANJIDOUYOUYIGEOUHEYUWAIBUJINGTIHUOTAOCIXIEZHENQIDEZHENDANGQIDIANLU。ZAIPCBSHANG,YAOQIUWAIJIESHIDIANRONG、JINGTIHUOTAOCIXIEZHENQIDEYINXIANYUEDUANYUEHAO。RCZHENDANGQIDUIGANRAOXINHAOYOUQIANFUDEMINGANXING,TANENGCHANSHENGHENDUANDESHIZHONGZHOUQI,YINERZUIHAOXUANJINGTIHUOTAOCIXIEZHENQI。LINGWAI,SHIYINGJINGTIDEWAIQIAOYAOJIEDI。


  5.防雷击措施


滚球体育  SHIWAISHIYONGDEDANPIANJIXITONGHUOCONGSHIWAIPAIJIYINJINSHINEIDEDIANYUANXIAN、XINHAOXIAN,YAOKAOLVXITONGDEFANGLEIJITIMU。CHANGYONGDEFANGLEIJIQIJIANYOU:QITIFANGDIANGUAN、TVS(Transient Voltage Suppression)DENG。QITIFANGDIANGUANSHIDANGDIANYUANDEDIANYADAYUMOUYISHUZHISHI,TONGCHANGWEISHUSHIVHUOSHUBAIV,QITIJICHUANFANGDIAN,JIANGDIANYUANXIANSHANGQIANGCHONGJIMAICHONGDAOJINDADI。TVSKEYIKANCHENGLIANGGEBINGLIANQIEFANGXIANGXIANGFANDEQINAERJIGUAN,DANGLIANGDUANDIANYAGAOYUMOUYIZHISHIDAOTONG。QITEDIANSHIKEYISHUNTAITONGGUOSHUBAINAISHANGQIANADEDIANLIU。


三、对干扰措施的软件处理方法


  DIANCIGANRAOYUANSUOCHANSHENGDEGANRAOXINHAOZAIYIXIETEDINGDEQINGKUANGXIA(BIRUZAIYIXIEDIANCIHUANJINGBIJIAOELIEDEQINGKUANGXIA)SHIWUFAWANQUANXIAOCHUDE,ZHONGJIJIANGHUIJINJINCPUCHULIDEDEHEXINDANYUAN,ZHEIYANGZAIYIXIEDAGUIMOJICHENGDIANLUJINGCHANGHUISHOUDAOGANRAO,DAOZHIBUNENGZHENGCHANGGONGZUOHUOZAICUOWUZHUANGTAIXIAGONGZUO。TEBIESHIXIANGRAMZHEIZHONGLIYONGSHUANGWENTAIJINXINGCUNCHUDEQIJIAN,WANGWANGHUIZAIQIANGGANRAOXIAFASHENGFANZHUAN,SHIYUANLAICUNCHUDE“0”BIANWEI“1”,HUOZHE“1”BIANWEI“0”;YIXIECHUANXINGCHUANSHUDESHIXUJISHUJUHUIYINGANRAOERFASHENGGAIBIAN;GENGYANZHONGDEHUIPOHUAIYIXIEZHONGYAODESHUJUCANSHUDENG;ZAOCHENGDEHOUGUOWANGWANGSHIHENYANZHONGDE。ZAIZHEIZHONGQINGKUANGXIARUANJIANSHEJIDEHAOHUAIZHIJIEYINGXIANGDAOZHENGGEXITONGDEKANGGANRAONENGLIDEGAODI。