滚球体育

芯片IC单片机解密百科

十年专注单片机解密

解密单片机C8051F020的RS485串行通信电路设计

SUIZHEJISUANJIJISHUHECEKONGJISHUDEBUDUANFAZHAN,ZAIYIDANPIANJIWEIHEXINDESHUJUCAIJIXITONGZHONG,XUYAOSHIXIANDANPIANJIHEJISUANJIZHIJIANDESHUJUJIAOHUAN,BINGYICILAIFAHUIDANPIANJIHEJISUANJIGEZIDEZHANGCHU,TISHENGZHENGGEXITONGDEXINGNENGJIAGEBI。ZAIJISUANJIWANGLUOHEGONGYEKONGZHIXITONGZHONG,JINGCHANGXUYAOCAIYONGCHUANXINGTONGXINLAISHIXIANYUANCHENGSHUJUCHUANSHU。

MUQIAN,YOUDUOZHONGJIEKOUBIAOZHUNKEYONGYUCHUANXINGTONGXIN,BAOKUORS232、RS422、RS485DENG。RS232SHIZUIZAODECHUANXINGJIEKOUBIAOZHUN,ZAIDUANJULI、JIAODIBOTELVCHUANXINGTONGXINZHONGDEDAOLEGUANGFANYINGYONG。DANSHI,RS232 TONGXINCUNZAIZHECHUANSHUSUDUMAN、CHUANSHUJULIDUAN、XINHAORONGYISHOUDAOGANRAODENGBUZU,QIYINGYONGJUXIANXINGYIRIYITUCHU。ERRS485 TONGXINCAIYONGCHAFENFANGSHILAIXIAOCHUZAOSHENG,JIXINHAOZAIFASONGQIANHUIFENJIEWEIZHENGFU2 TIAOXIANLU,DANGDAODAJIESHOUDUANSHIJIANGXINHAOXIANGJIAN,SHIZAOSHENGXIANGHUDIXIAO,HAIYUANCHENGYUANLAIDEXINHAO,ZHEIZHONGFANGSHIDUIGONGMOGANRAOYIZHINENGLIJIAOQIANG,YIGUANGFANYINGYONGYUGONGYEKONGZHIDENGLINGYU。

滚球体育YAOSHIXIANDANPIANJIYUJISUANJIZHIJIANDERS485TONGXIN,YIBANKEYICAIYONG2 ZHONGFANGFA:YIZHONGFANGFASHIZAIDANPIANJIYUJISUANJILIANGDUANFENBIECAIYONGRS232YURS485 DIANPINGZHUANHUANZHUANGZHI;LINGYIZHONGFANGFASHICAIYONGRS485TONGXINKA,BINGJIANGQICHAZAIJISUANJIZHUBANSHANG。CAIYONGQIANYIZHONGFANGFADEYOUDIANSHIYINGJIANZHUANGZHIANZHUANGJIANBIAN,RUANJIANBIANCHENGXIANGDUIJIANDAN;QUEDIANSHITONGXINSULVBEIXIANZHIZAI20 kb/sYINEI。DIERZHONGFANGFADEYOUDIANSHITONGXINJULIJIAOYUAN,SULVJIAOGAO,KEDA10 Mb/s;QUEDIANSHIXUYAOANZHUANGTONGXUNKAHEQUDONGCHENGXU,BINGJINXINGBIYAODESHEZHI。BENWENCAIYONGDIERZHONGFANGFA。

DIANLUSHEJI

CAIYONGUART CHUANXINGZONGXIANJINXINGTONGXIN,YINWEIUART SHIYIZHONGGUANGFANYINGYONGYUYUANJULI、DISULV、DICHENGBENTONGXINDECHUANXINGCHUANSHUJIEKOU,YOUYUQIJUYOUSHUJUXIANSHAODETEDIAN,ZAISHUZIXITONGSHEJIZHONGDEDAOLEDALIANGYINGYONG。JIBENDEUART TONGXINZHIXUYAOLIANGGENSHUJUXIAN(RXD、TXD)JIKEWANCHENGSHUJUDEXIANGHUTONGXIN,JIESHOUHEFASONGDOUSHIQUANSHUANGGONGXINGSHI,QIZHONGRXD SHIJIESHOUDUAN,TXD SHIFASONGDUAN。

       C8051F020单片机有2 个UART(UART0 和UARTl),以UART0 为例,它的TxD 和RXD 分别与数字I/0 引脚PO.O 和PO.1 复用,通过交叉开关配置寄存器进行选择。由于MAX485工作在半双工状态,它与单片机连接时的接线比较简单,只需要用单片机某一个引脚(如PO.2)来控制RE 和DE 这2 个引脚。PCL-846B 通信卡有4 个通道,选择通道1 与单片机进行通信,另外将通道2 和通道4 进行连接,以自发自收的方式实现通信卡的自检。

ZAISHIYONGRS485TONGXINKAJINXINGTONGXINSHI,DANGXINHAOCHUANDIDAOTONGXINXIANLULIANGDUANSHI,RUGUOZUKANGBUPIPEI,KENENGHUICHANSHENGXINHAOFANSHEWENTI。XINHAOFANSHEHUIZAOCHENGXINHAODESHIZHENHEBIANXING,CONGERDAOZHITONGXINCUOWU。QIJIEJUEFANGFAJIUSHIZAITONGXINXIANLUDELIANGDUANGELIANJIEYIGEZHONGDUANPIPEIDIANZU,BAOZHENGZUKANGPIPEI。DANGTONGXINJULIJIAODUAN, YIBANZAIXIAOYU300 m SHI,KEBUSHIYONGZHONGDUANDIANZU。DANGTONGXINJULIDAYU300 m SHI,YINGDANGSHIYONGZHONGDUANDIANZU,QIZUZHIBIXUYUTONGXINXIANLUDEXIANXINGZUKANGXIANGTONG。DIANZUZHIYIBANXUANQU120 ΩZUOYOU,DANGTONGXINJULIJIAOZHANGSHI,KEYIXUANYONG300 Ω。