欢迎来到冰点文库! | 帮助中心 分享价值,成长自我!
冰点文库
全部分类
  • 临时分类>
  • IT计算机>
  • 经管营销>
  • 医药卫生>
  • 自然科学>
  • 农林牧渔>
  • 人文社科>
  • 工程科技>
  • PPT模板>
  • 求职职场>
  • 解决方案>
  • 总结汇报>
  • ImageVerifierCode 换一换
    首页 冰点文库 > 资源分类 > DOCX文档下载
    分享到微信 分享到微博 分享到QQ空间

    毕业论文外文翻译--RS232串口通讯(外文原文+中文翻译)Word文件下载.docx

    • 资源ID:811033       资源大小:54.25KB        全文页数:17页
    • 资源格式: DOCX        下载积分:15金币
    快捷下载 游客一键下载
    账号登录下载
    微信登录下载
    三方登录下载: 微信开放平台登录 QQ登录
    二维码
    微信扫一扫登录
    下载资源需要15金币
    邮箱/手机:
    温馨提示:
    快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。
    如填写123,账号就是123,密码也是123。
    支付方式: 支付宝    微信支付   
    验证码:   换一换

    加入VIP,免费下载
     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    毕业论文外文翻译--RS232串口通讯(外文原文+中文翻译)Word文件下载.docx

    1、TDTransmit Data (Serial data output)74RTSRequest to send (acknowledge to modem that UART is ready to exchange data85CTSClear to send (i.e.; modem is ready to exchange data)6DSRData ready state (UART establishes a link)SGSignal ground1DCDData Carrier detect (This line is active when modem detects a c

    2、arrier20DTRData Terminal Ready.922RIRing Indicator (Becomes active when modem detects ringing signal from PSTNAbout DTE & DCE:Devices, which use serial cables for their communication, are split into two categories. These are DCE (Data Communications Equipment) and DTE (Data Terminal Equipment.) Data

    3、 Communications Equipments are devices such as your modem, TA adapter, plotter etc while Data Terminal Equipment is your Computer or Terminal. A typical Data Terminal Device is a computer and a typical Data Communications Device is a Modem. Often people will talk about DTE to DCE or DCE to DCE speed

    4、s. DTE to DCE is the speed between your modem and computer, sometimes referred to as your terminal speed. This should run at faster speeds than the DCE to DCE speed. DCE to DCE is the link between modems, sometimes called the line speed.Most people today will have 28.8K or 33.6K modems. Therefore, w

    5、e should expect the DCE to DCE speed to be either 28.8K or 33.6K. Considering the high speed of the modem we should expect the DTE to DCE speed to be about 115,200 BPS. (Maximum Speed of the 16550a UART) . The communications program, which we use, has settings for DCE to DTE speeds. However, the spe

    6、ed is 9.6 KBPS, 144 KBPS etc and the modem speed.If we were transferring that text file at 28.8K (DCE- DCE), then when the modem compresses it you are actually transferring 115.2 KBPS between computers and thus have a DCE- DTE speed of 115.2 KBPS. Thus, this is why the DCE- DTE should be much higher

    7、 than the modems connection speed. Therefore, if our DTE to DCE speed is several times faster than our DCE to DCE speed the PC can send data to your modem at 115,200 BPS.What is NULL MODEM?Null modem is used to connect two DTEs together. This is used to transfer files between the computers using pro

    8、tocols like Zmodem protocol, xmodem protocol, etc Figure :Above shows the connections of the Null modem using RS-232D connecterAbove-mentioned figure shows the wiring of the null modem. The main feature indicated here is that the to make the computer to chat with the modem rather than another comput

    9、er. The guest & host computer connected through the TD, RD, and SG pins. Any data that is transmitted through TD line from the Host to Guest is received on RD line. The Guest computer must have the same setup as the Host. The signalground (SG) line of the both must be shorted so that grounds are com

    10、mon to each computer.The Data Terminal Ready (DTR) is looped back to Data Set Ready and Carrier Detect on both computers. When the Data Terminal Ready is asserted active, then the Data Set Ready and Carrier Detect immediately become active. At this point, the computer thinks the Virtual Modem to whi

    11、ch it is connected is ready and has detected the carrier of the other modem.All left to worry about now is the Request to Send and Clear To Send. As bothcomputers communicate together at the same speed, flow control is not needed thus these two lines are also linked together on each computer. When t

    12、he computer wishes to send data, it asserts the Request to Send high and as it is hooked together with the Clear to Send, It immediately gets a reply that it is ok to send and does so.The Ring indicator line is only used to tell the computer that there is a ringing signal on the phone line. As we do

    13、 not have, a modem connected to the phone line this is left disconnectedTo know about the RS232 ports available in your computer, Right click on My Computer, Goto Properties, Select tab Device Manager, go to Ports( COM & LPT ),In that you will find Communication Port(Com1) etc. If you right click on

    14、 that and go to properties, you will get device status. Make sure that you have enabled the port( Use this port is selected).How to program the Serial Port using C/C+?There are two popular methods of sending data to or from the serial port in Turbo C. One is using outportb(PORT_ID, DATA) or outport(

    15、PORT_ID,DATA) defined in “dos.h”. Another method is using bioscom() function defined in “bios.h”. Using outportb() :The function outportb () sends a data byte to the port PORT_ID. The function outport() sends a data word. These functions can be used for any port including serial port, parallel ports

    16、. Similarly to receive data these are used. inport reads a word from a hardware port inportb reads a byte from a hardware port outport outputs a word to a hardware port outportb outputs a byte to a hardware port Declaration: int inport(int portid); unsigned char inportb(int portid); void outport(int

    17、 portid, int value); void outportb(int portid, unsigned char value); Remarks: inport works just like the 80x86 instruction IN. It reads the low byte of a word from portid, the high byte from portid + 2. inportb is a macro that reads a byte outport works just like the 80x86 instruction OUT. It writes

    18、 the low byte of value to portid, the high byte to portid + 1. outportb is a macro that writes value Argument portid: Inport- port that inport and inportb read from; Outport- port that outport and outportb write to value: Word that outport writes to portid; Byte- that outportb writes to portid.If yo

    19、u call inportb or outportb when dos.h has been included, they are treated as macros that expand to inline code.If you dont include dos.h, or if you do include dos.h and #undef the macro(s), you get the function(s) of the same name.Return Value:# inport and inportb return the value read # outport and

    20、 outportb do not returnFor more details of these functions read article from Using bioscom:The macro bioscom () and function _bios_serialcom() are used in this method in the serial communication using RS-232 connecter. First we have to set the port with the settings depending on our need and availab

    21、ility. In this method, same function is used to make the settings using control word, to send data to the port and check the status of the port. These actions are distinguished using the first parameter of the function. Along with that we are sending data and the port to be used to communicate.Here

    22、are the deatails of the Turbo C Functions for communication ports.Declaration:bioscom(int cmd, char abyte, int port)_bios_serialcom(int cmd ,int port, char abyte)bioscom() and _bios_serialcom() uses the bios interrupt 0x14 to perform various communicate the serial communication over the I/O ports gi

    23、ven in port.cmd: The I/O operation to be performed.cmd (boiscom)cmd(_bios_serialcom)Action_COM_INITInitialise the parameters to the port_COM_SENDSend the character to the port_COM_RECEIVEReceive character from the port_COM_STATUSReturnsrhecurrentstatusofthe communication portportid: port to which da

    24、ta is to be sent or from which data is to be read. 0: COM11: COM22: COM3abyte:When cmd =2 or 3 (_COM_SEND or _COM_RECEIVE) parameter abyte is ignored.When cmd = 0 (_COM_INIT), abyte is an OR combination of the following bits (One from each group):value of abyteMeaningBioscom_bios_serialcom0x020x03_C

    25、OM_CHR7_COM_CHR87 data bits8 data bits0x000x04_COM_STOP1_COM_STOP21 stop bit2 stop bits0x080X10_COM_NOPARITY_COM_ODDPARITY_COM_EVENPARITYNo parity Odd parity Even parity0x200x400x600x800xA00xC00xE0_COM_110_COM_150_COM_300_COM_600_COM_1200_COM_2400_COM_4800_COM_9600110 baud150 baud300 baud600 baud120

    26、0 baud2400 baud4800 baud9600 baudFor example, if abyte = 0x8B = (0x80 | 0x08 | 0x00 | 0x03) = (_COM_1200 | COM_ODDPARITY | _COM_STOP1 | _COM_CHR8)he communications port is set to 1200 baud(0x80 = _COM_1200)Odd parity (0x08 = _COM_ODDPARITY) 1 stop bit (0x00 = _COM_STOP1)8 data bits (0x03 = _COM_CHR8)To initialise the port with above settings we have to write bioscom(0, 0x8B, 0); To send a data to COM1, the format of the function will be bioscom(1, data, 0). Similarly biosco


    注意事项

    本文(毕业论文外文翻译--RS232串口通讯(外文原文+中文翻译)Word文件下载.docx)为本站会员主动上传,冰点文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰点文库(点击联系客服),我们立即给予删除!

    温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。




    关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服 - 联系我们

    copyright@ 2008-2023 冰点文库 网站版权所有

    经营许可证编号:鄂ICP备19020893号-2


    收起
    展开