国产成人永久免费视频_一区二区三区四区高清精品免费观看_成人午夜视频免费观看_在线电影一区二区三区_国产成人a人亚洲精品无码_欧美日韩在线观看一区_国产精品美女久久久久久_免费av手机在线观看_国产欧美日韩精品一区_国产精品日韩一区二区免费视频_亚洲一区精彩视频_youjizz在线视频

CAN bus based on RS-232 Serial Remote Communication

1 Introduction

Industrial equipment, communication usually involves a lot of hardware and software products as well as for connecting a standard computer platform (PC or workstation) and industrial automation equipment, protocol, and the use of a wide range of devices and protocols. Therefore, the majority of automation applications want to implement a simple serial command, and that these commands with the personal computer or additional serial port serial port compatible with the standards board. RS-232 is PC computer and communications industry, the most widely used as a serial interface. RS-232 is defined as a low-speed serial communications to increase communication distance of the single-ended standards. As the RS-232 transmit and receiver signal ground between the public, so it can not use double-ended signals, or, common-mode noise will be coupled to the signal system. RS-232 standard provides that the maximum distance of only 15m, the signal transmission rate of up to 20kbit / s.

CAN, all known as the "Controller Area Network", the Controller Area Network, is the internationally most widely used field bus, one composed of a single CAN bus network, network hardware electrical characteristics of the restrictions. CAN as a multi-master mode serial communication bus, the basic design specifications of its high speed and high resistance to electromagnetic interference, and to be able to detect the communication bus to generate any errors. When the signal transmission distance up to 10km when, CAN can provide up to 50kbit / s data transfer rate. Table 1 for the CAN bus maximum transmission between any two nodes from their corresponding relationship between the bit rate.

Table 1 CAN bus system any two rival powers of the potential maximum distance between the

Bit rate / kbps 1000 500 250 125 100
Maximum distance / m 40 130 270 530 620
Bit rate / kbps 50 20 10 5
Maximum distance / m 1300 3300 6700 1000 0

Thus, in terms of real-time, adaptability, flexibility, or reliability point of view, CAN bus is a kind of a more excellent than the RS-232 serial bus. When the far distance between two serial devices, RS-232 can not be directly used to connect them when you can convert the RS-232 CAN, CAN bus via the serial port device to achieve network interconnection.

However, RS-232 and CAN frames in the level and format are very different. Specific performance is as follows:

RS-232 standard using negative logic levels, regulations 3V ~ 15V at any level between a logic "0" level,-3V ~-15V at any level between a logic "1" level. The CAN signal is transmitted using differential voltage, the two signal wires called "CAN_H" and "CAM_L", when all the static around 2.5V, then the state is represented as logic "1", also called a "hidden"; CAN_L higher than that with CAN_H logic "0", referred to as "dominant." Dominant, usually voltage value: CAN_H = 3.5V, CAN_L = 1.5V;

RS-232 serial frame format: one start bit, 8 data bits, a programmable 9th bit (this bit is sent and received address / data bits), one stop bit. The CAN data frame format: Frame Information ID data (can be divided into the standard frame and extended frame format).

CAN bus based on RS-232 Serial Remote Communication

Therefore, the design requires a micro-controller to achieve the level and frame format conversion. The conversion shown in Figure 1.

2 RS-232 to CAN converter for hardware design

In the design of RS-232 to CAN conversion device, a microprocessor chip microcomputer AT89C52; used as a CAN microcontroller SJA1000, SJA1000 CAN protocol integrates the physical layer and data link layer function, the passive situation of the communication data frame processing; AT82C250 CAN controller and physical bus as the interface between the bus used to provide differential to send power and CAN controller and differential receive capability, through the AT82C250 pin 3 can choose from three different ways of working (high-speed, slope control and standby). One pin 3 grounded for high-speed mode; high-speed optical compartment with 6N137 to achieve, its role is to prevent signal interference in series; MAX232 is used to complete the 232 level to the micro-controller interface chip TTL level conversion. See the specific hardware interface circuit SJA1000 of the resources, I will not do more to explain. However, the following points need attention.

(1) CAN bus connected via a 120Ω resistor, whose role is to match bus impedance, improve data communication and reliable anti-interference lines. But in fact, only to ensure CAN network "CAN_H" and "CAN_L" bridging between the resistance of 60Ω can.

(2) SJA1000 20-pin RX1 ground when not in use (see the specific reasons for software design), the Set with CDR.6 can greatly increase the length of the bus.

(3) pin TX0, TX1 determine the access method of serial output level. Refer to the specific relationship OCR output control register settings.

(4) AT82C250 the RS pin and indirectly has a slope resistance. Resistor size can adjust the speed of the bus communication, usually between 16kΩ ~ 140kΩ.

(5) MAX232 requires four external electrolytic capacitors C1, C2, C3, C4, the capacitor capacitance is required for the internal power conversion, its values are 1μF/25V, tantalum capacitor should be chosen and the location of application volume close to the chip, power supply VCC and to be connected between a 0.1μF decoupling capacitor.

CAN bus based on RS-232 Serial Remote Communication

3 RS-232 to CAN converter for software design

Under the control of the microprocessor, RS-232 and CAN data exchange, the use of serial port receive and CAN interrupt can improve efficiency. The main program flow chart shown in Figure 2. SJA1000 in reset mode, the initialization can be, including work settings, the clock frequency and the acceptance filter register settings, baud rate parameter settings and interrupt register settings allow.

Can accurate data transfer also depends on the baud rate and flow control, which is software designed place can not be ignored. So then introduces the CAN baud rate settings, automatic detection of serial port baud rate, serial data flow control.

3.1 CAN filtering rate settings

CAN protocol is one of the elements in the baud rate. Users can set the bit cycle of the Wei and Caiyangcishuo sampling point location, to enable the user freedom to optimize Ying Yong network performance but 優化 process, we must focus time Shen Shu Wei Shen Kao oscillator basis of tolerance and Jitong different Xinhaozhuanbo The relationship between delayed.

System bit rate fBil that transmit data bits per unit amount of time that the baud rate fBit = 1/tBit. Nominal bit time by the three non-overlapping segments SYNC_SEG, TSEG1 and TSEG2 composition, this three time periods are TSYNC_SEG, TSEG1 and TSEG2 composition, this three time periods are tSYNC_SEG, tTSEG1 and tTSEG2. Therefore, the amount of positioning cycle tBit are three time periods and.

tBit = tSYNC_SEG tTSEG1 tTSEG2

Bit period of these paragraphs are an integer number of basic time unit used to express. The unit of time is called time share TQ, the duration of time share is a CAN system clock cycle tSCL, can be obtained from the oscillator clock cycles tCLK. Pre-programmed frequency factor (baud rate default BRP) can adjust the CAN system clock. As follows:

tSCL = BRP × 2tCLK = 2BPR/fCLK

CAN Bit Timing Calculation on another very important time is synchronized jump width (SJW), duration is tSJW. SJW is not the bit period of a paragraph, but the definition of events in the re-synchronization is the bit period increase or decrease the maximum number of TQ. In addition, CAN protocol also allows the user to specify the bit sampling mode (SAM), respectively, and three single-sample sampling mode (the results in the three samples selected one). In the single sample mode, the sampling points in TESG1 the end of paragraph. The three sampling mode more than the single sample taken two samples, they end in front of TSEG1 section, a difference between a TQ.

Mentioned above, BPR, SJW, SAM, TESG1, TESG2 CAN controller can be adopted by the user's contents in register BTR0 and BTR1 to define. Specifically shown in Figure 3. Set up BTR0 and BTR1, the actual transmission baud rate range:

Maximum = 1 / (tBit-tSJW), minimum = 1 / (tBit tSJW)

3.2 serial baud rate detection

When the serial device is a host, additional testing at this time converter serial baud rate, can host the first to receive baud rate (9600 baud for example) to set, and in the terminal to send a specific character ( a carriage return as an example), so that the host of characters according to the information received on the conversion device can determine the communication baud rate. The ASCII value of carriage is 0DH, to receive at different baud rate to the value listed in Table 2.

Table 2 under different baud rate of bytes received

Baud rate (bit / s) to receive bytes (hex) Baud rate (bit / s) to receive bytes (hexadecimal)
1200 80 4800 E6
1800 F0 9600 0D
2400 78 19200 F *

3.3 Serial Port Flow Control

Here talked about the "flow" refers to the data stream. Between the two serial data transmission, data loss is often the phenomenon occurs. As the MCU buffer is limited, such as receiving data buffer is full, then continue to send to the data at this time will be lost. The flow control can effectively solve the problem, data processing, but when the receiver came, flow control system will issue "no longer receive" the signal, Er Shi sender to stop sending until receiving "can continue to send a" signal then send the data. Therefore, data flow control can control the process, to prevent data loss. Two common flow control is hardware flow control (including RTS / CTS, DTR / CTS) and software flow control XON / XOFF (continue / stop), the following only in respect of hardware flow control RTS / CTS illustration.

When using hardware flow control, serial console RTS, CTS received a microcontroller I / O port, by setting the I / O port to 1 or 0 to receive and send signals from the stop. Data terminal equipment (such as computer) microcontroller using RTS to start the flow of data sent, while the MCU is used to start and pause CTS data flow from the computer. When hardware handshaking way to achieve this, the programming according to the size of the receiver buffer to set a high mark and a low mark, when the buffer data to high levels, the CTS line at the receiving end will be set low (to send Luoji 0 ), and when the program detects the transmitter is lower after the CTS, it stops sending data until the receiver buffer data will be lower than low and high CTS set up. RTS is used to indicate the receiving device to receive data have good accuracy.

CAN bus based on RS-232 Serial Remote Communication

3.4 CAN receiver subroutine

PeliCAN send both standard frame format can be sent to extend the frame, use the clock divider registers CDR.7 tuned to the CAN mode (0-BasicCAN, 1 - PeliCAN), received CAN data, frame information in accordance with FF bits to determine a standard frame or frame extension, and RTR bit to determine the data frame or remote frame. The following is a CAN receiver subroutine:

;///////////////////////////////////////////////// /////////////////
; / / CAN data reception / unified into a two-byte ID of the frame format / /
;///////////////////////////////////////////////// //////////////////////
RECAN:
MOV R0, # C_RE; microcontroller within the buffer start address
MOV DPTR, # RXBUF; read and save the contents of receive buffer
MOVX A, @ DPTR; read buffer of 2 byte CAN
MOV @ R0, A; Save
JB ACC.7, EFF_RE; FF bit ,0-SFF ,1-EFF
MOV R2, # 0
SJMP SFF_RE; ID number is different from the interception of "data byte" in different positions
EFF_RE: MOV R2, # 2
SFF_RE: MOV R2, # 2
SFF_RE:
JB ACC.6, EXIT_RECAN; RTR bit to judge, 1 - a remote frame, then jump out
ANL A, # 0FH
MOV R3, A; then the middle four is the interception of data length
MOV C_NUM, A; R3, R5 to receive frames stored in the length of
RDATA0:
INC DPTR; 2 bytes ID
INC R0
MOVX A, @ DPTR
MOV @ R0, A
INC DPTR
MOVX A, @ R0, A
INC DPTR
MOVX A, @ DPTR
MOV @ R0, A
MOV A, R2; if you skip two byte ID EFF
JZ DRATA1
INC DPTR
INC DPTR
DATA1:; data bytes
INC DPTR
INC R0
MOVX A, @ DPTR
MOV @ R0, A
DJNZ R3, RDATA1
EXIT_RECAN:
RET

4 Conclusion

Micro-computer into an intelligent measurement and control instrumentation to provide the necessary conditions in which the terminal device with a microprocessor with a better digital communications. As more and more intelligent terminals Chu Xian, Wu Lun yes right network's architecture, protocol, Shi Shi Xing, or the applicability, flexibility, reliability Naizhi Chengbendouyou a higher demand, so good in the Fa Zhan Xian Chang bus Youzhao prospects. CAN bus frame structure has a logo ID, which makes network equipment, has more than one network in the host as possible, which can be monitored by network hosts work of Zheng Ge devices and the network to the corresponding control decision-making. This device has accomplished and achieved in practice very good results.

Declined comment

中文字幕网av| 亚洲第九十七页| 在线观看免费av网址| 激情六月丁香婷婷| 国产精品久久久影院| 成年人黄色在线观看| 亚洲高清精品中出| 日韩久久久久久久| 国产精品ⅴa在线观看h| 国产欧美精品一区二区三区-老狼| 国产xxx69麻豆国语对白| 午夜美女久久久久爽久久| 日韩成人在线视频观看| 亚洲激情视频在线播放| 精品国产123| 亚洲精品99久久久久中文字幕| 亚洲免费小视频| 中文字幕av一区中文字幕天堂| 一区二区成人精品| 日韩国产欧美精品一区二区三区| 亚洲视频999| 少妇久久久久久| 欧美日韩高清区| 国产精品久久久久久久久影视| 91免费看国产| 国内精品一区二区| 国产又粗又爽又黄的视频| 任我爽在线视频精品一| 91精品国产吴梦梦| 日日摸天天爽天天爽视频| 自拍偷拍21p| 香蕉视频污视频| 成年人av电影| 99re这里只有精品在线| 亚洲a视频在线| 国产在线不卡一卡二卡三卡四卡| 久久午夜色播影院免费高清| 国产精品麻豆视频| 欧美一级黄色录像| 欧美成年人视频网站| 国产成人涩涩涩视频在线观看| 99久热re在线精品996热视频| 中文字幕中文字幕在线中一区高清 | 亚洲第一天堂av| 久久国产精品久久精品| 97碰碰视频| 亚洲国产精品一区在线观看不卡| www.国产在线播放| 国产成人免费观看网站| 国产美女www爽爽爽| 久久亚洲二区| 国产亚洲成av人在线观看导航| 亚洲国产日韩在线一区模特| 91精品国产综合久久久久久久 | 天天色 色综合| 亚洲欧洲在线播放| 99在线看视频| 一区二区不卡在线观看| 日本福利视频在线观看| 中文文字幕文字幕高清| 久久国产精品二区| 久久久噜噜噜| 亚洲狠狠丁香婷婷综合久久久| 欧美成人官网二区| 国产成人jvid在线播放| 影音先锋欧美资源| 国产毛片久久久久久久| 国产情侣在线播放| 成人免费毛片片v| 亚洲无人区一区| 97在线观看视频国产| 一区精品视频| 精品成人av一区二区三区| 亚洲av无码乱码国产精品久久| 99久久精品国产麻豆演员表| 亚洲成人动漫在线观看| 美女国内精品自产拍在线播放| 国产精品对白刺激久久久| 欧美日韩在线一| 日韩av电影网| 成av人片一区二区| 日韩欧美中文字幕一区| 国产精品视频男人的天堂| 国产精品wwwww| 亚洲GV成人无码久久精品 | 久久久久久久久电影| 香蕉精品视频在线| 国产农村妇女精品一区| 国产麻豆9l精品三级站| 欧美日韩亚洲另类| 国产精品爱久久久久久久| 国产精品亚洲a| 国产精品.www| 亚洲美女在线一区| 欧美伦理91i| 日本在线xxx| 中文字幕在线有码| 韩国欧美国产1区| 在线免费不卡电影| 亚洲一区二区三| 国产伦理在线观看| 狠狠色狠狠色综合| 欧美成人综合网站| 成人免费91在线看| 天堂网中文在线观看| 成人精品高清在线| 中文字幕欧美在线| 国产av天堂无码一区二区三区| 顶臀精品视频www| 香蕉视频网站在线| 91精品国产综合久久精品| 91嫩草国产在线观看| 欧美日韩高清丝袜| 国产日韩在线不卡| 久久精品视频导航| 久色视频在线播放| 亚洲精品成av人片天堂无码 | 在线播放国产一区| 欧美日韩免费不卡视频一区二区三区| 91色p视频在线| 中日韩一级黄色片| 久久影院电视剧免费观看| 中日韩美女免费视频网站在线观看| 日本精品免费| 一级特黄免费视频| 日本久久精品电影| 九色91视频| 亚洲永久精品在线观看| 亚洲一级二级三级| 国产精成人品localhost| 麻豆亚洲av熟女国产一区二| 午夜精品免费在线| 国产精品一区二区免费| 亚洲天堂网av在线| 亚洲一线二线三线视频| www.成人av.com| 国产一级视频在线播放| 亚洲精品国产无套在线观| 成人免费xxxxx在线观看| 国产免费无码一区二区| 成人精品电影在线观看| 日韩美女视频免费在线观看| 黄色国产在线观看| 99国产精品久| 91国在线精品国内播放| 草视频在线观看| 色屁屁一区二区| 福利视频一二区| 久久一区二区三区超碰国产精品| 中文字幕在线国产精品| 国产乱了高清露脸对白| 亚洲一区二区视频在线观看| 精品视频高清无人区区二区三区| www.五月婷婷.com| 亚洲精品国产福利| 国产精品嫩草影院8vv8| 日本一区二区综合亚洲| 91影视免费在线观看| 97在线视频人妻无码| 亚洲国产精品va在看黑人| 亚洲第一香蕉网| 欧美日韩亚洲天堂| 丰满女人性猛交| 国产一区二区三区中文字幕| 国产亚洲欧洲在线| 国产一区二区三区精品在线| 亚洲国产欧美在线人成| 国产精品久久中文字幕| 99精品视频一区二区| 国产一区二区黄色| 亚洲精华国产精华精华液网站| 亚洲欧洲激情在线| 色老板免费视频| 欧美一级日韩免费不卡| 免费观看污网站| 欧美日韩另类在线| 福利在线一区二区三区| 综合激情成人伊人| 性高湖久久久久久久久aaaaa| 成人一二三区视频| 秋霞在线观看一区二区三区| 国产一区二区剧情av在线| 成人激情视频网| 午夜小视频免费| 国产日韩欧美视频| 成人激情四射网| 欧美在线视频网站| 中文字幕在线播放日韩| 高清欧美性猛交xxxx| 免费观看成人毛片| 少妇高潮久久77777| 欧美精品成人久久| 久久久久久有精品国产| 麻豆国产91在线播放| 成人午夜精品久久久久久久蜜臀| 免费观看在线综合| 欧美黑人3p| 开心九九激情九九欧美日韩精美视频电影 | 成人久久久久久久久| 亚洲国产日韩一级| 俄罗斯女人裸体性做爰| 午夜不卡av在线| 亚洲精品视频三区| 亚洲综合色噜噜狠狠| 色91精品久久久久久久久| 欧美日韩国产不卡| 自拍偷拍中文字幕| 日韩欧美国产三级| 久久久久久久国产精品毛片| 亚洲性视频网址| 一区二区三区免费在线视频| 亚洲r级在线观看| av亚洲产国偷v产偷v自拍| 亚洲高清视频在线观看| 一区二区三区小说| 潘金莲激情呻吟欲求不满视频| 国产suv精品一区二区33| 中文字幕在线观看日韩| 成人涩涩小片视频日本| 亚洲男人av电影| aaa人片在线| 久久久中精品2020中文| 国产又粗又黄又爽的视频| 91亚洲精华国产精华| 99久久亚洲一区二区三区青草| 看一级黄色录像| 岛国av午夜精品| 国产综合精品久久久久成人av| 亚洲精品永久免费精品| 久久精品这里有| 97热在线精品视频在线观看| 精品人妻无码一区二区色欲产成人 | 欧美高清视频在线高清观看mv色露露十八 | 一本久久a久久精品vr综合| 久久久久久一二三区| 中文字幕第三区| 亚洲性无码av在线| 狠狠躁日日躁夜夜躁av| 精品免费日产一区一区三区免费| 成人av在线一区二区三区| 天天影视综合色| 日韩你懂的在线播放| 99在线观看免费| 免费精品视频一区| 欧美国产精品v| 加勒比综合在线| 国产精品视频中文字幕91| 久久精品在线免费观看| 波多野结衣有码| 九九九久久久久久| 一区二区三区高清| 乱码一区二区三区| 亚洲人成在线一二| 日韩av高清在线观看| 国产熟人av一二三区| 中文字幕日韩免费视频| 91丨porny丨户外露出| 911国产在线| 日韩国产伦理| 日韩精品免费综合视频在线播放 | 影音先锋在线亚洲| 国产一区二区三区四区福利| 不卡的av网站| 影音先锋男人看片资源| 久久久综合香蕉尹人综合网| 欧美一区二区视频在线观看2020| 久久婷婷一区| 美女洗澡无遮挡| 精品一区久久久久久| 亚洲第一区第一页| av在线不卡免费看| 亚洲第一精品区| 6080日韩午夜伦伦午夜伦| 成人免费一级视频| 五月天av在线播放| 性亚洲最疯狂xxxx高清| 亚洲精选视频免费看| 成人a v视频| 永久免费看av| www.久久撸.com| 国产精品你懂的在线| 国产婷婷色一区二区在线观看 | 国产精品情侣自拍| 色久优优欧美色久优优| 午夜久久久久久噜噜噜噜| 国产福利一区视频| 国产精品91视频| 欧美三级xxx| 免费看国产片在线观看| 香蕉在线观看视频| 99re在线观看| 日韩激情在线视频| 久久久国产午夜精品| 精品国产xxx| 激情文学亚洲色图| 成人精品水蜜桃| 欧美丰满少妇xxxx| 在线中文字幕一区二区| 国产一区二区在线观看视频| 亚洲欧美精品一区二区三区| 韩国无码一区二区三区精品| 中文字幕中文字幕一区三区| 九九久久久久99精品| 亚洲午夜国产一区99re久久| 国产成人精品白浆久久69| 免费在线观看毛片网站| 亚洲自拍高清视频网站| 欧美理论片在线| 美国毛片一区二区三区| 国产免费美女视频| 成年人网站免费视频| 成人乱色短篇合集| 欧美自拍偷拍一区| www.亚洲激情.com| 动漫精品一区一码二码三码四码| 免费高清在线观看免费| 成人福利网站在线观看| 亚洲欧美另类在线观看| 国产精品免费久久| 污视频软件在线观看| 天天躁日日躁aaaa视频| 六月婷婷激情综合| 成人国产精品av| 精品乱码亚洲一区二区不卡| 一区二区中文视频| 日韩电影一区二区三区四区| 日韩伦理在线视频| yy6080午夜| 国产对白在线播放| 成人精品一区二区三区电影免费 | 亚洲欧美在线aaa| 免费在线成人网| 亚洲专区在线播放| 蜜桃av.com| 久草福利在线观看| 亚洲精品乱码视频| 国产精品视频99| 中文字幕在线观看亚洲| 五月天婷婷综合| 国产日韩欧美精品综合| 精品伊人久久久久7777人| 欧美男人亚洲天堂| 亚洲av熟女国产一区二区性色| 色哟哟精品视频| 午夜午夜精品一区二区三区文| 热久久这里只有| 久久精品国产欧美亚洲人人爽| 91精品国产福利| 亚洲摸摸操操av| 国产精品456露脸| 日一区二区三区| 国产成人免费看一级大黄| 亚洲 欧美 成人| 国产99在线 | 亚洲| 少妇伦子伦精品无吗| 在线免费观看视频黄| 一区二区三区在线视频看| 国产一区二区三区无遮挡| 国内精品久久久久久久久| 日韩中文字幕av| 精品奇米国产一区二区三区| 亚洲精品国产a| 综合久久久久久久| 91麻豆精东视频| 国产美女精品人人做人人爽| 精品国产亚洲一区二区麻豆| 无码一区二区三区| 国产极品美女在线| 丰满人妻一区二区三区大胸| 91n.com在线观看| 日本肉体xxxx裸体xxx免费| 国产www免费| 亚洲一区二区三区av无码| 男人添女人荫蒂免费视频| 亚洲欧美日韩综合一区| 一区二区精品在线观看| 欧美一级黄色录像片| 国产精品久久久久久久久电影网| 国产天堂视频在线观看| 亚洲精品无人区| 麻豆av一区二区| 欧美大香线蕉线伊人久久国产精品 | 日本高清免费不卡视频| 欧美日韩亚洲综合一区二区三区| 在线观看精品一区| 黑人巨大精品欧美一区二区免费 | 国产麻豆精品久久一二三| 免费观看日韩电影| 污污视频在线观看网站| 久久精品久久精品| 成人看片黄a免费看在线| 国产欧美综合在线观看第十页| 99国产精品一区| 综合色中文字幕| 91国偷自产一区二区三区成为亚洲经典| 韩曰欧美视频免费观看| 欧美影院一区二区| 欧美一区午夜精品| 亚洲欧美另类在线观看| 最近2019免费中文字幕视频三| 欧美激情在线观看视频| 2021久久精品国产99国产精品| 欧美精品aaa| 91免费看蜜桃| 欧美性视频在线播放| 欧美大黑帍在线播放| 中文字幕第66页| 国产尤物在线播放| 国产精品国产av| 粉嫩嫩av羞羞动漫久久久 |