91精品综合久久久久久五月天_国产精品一区电影_中文字幕欧美日韩一区二区_亚洲一区二区三区精品动漫

CAN Bus System Design and Implementation

Emergence of the concept in the field bus to the current nearly 20 years, there have been several field bus technology and mature. CAN bus which has been recognized as some of the most promising one field bus. CAN is a CAN controller with the composition of the high-performance serial data communication local area networks, is the most widely used international fieldbus one. Initially, CAN was designed as a vehicle environment, micro-controller communications, in-vehicle electronic control unit ECU the exchange of information between the formation of automotive electronic control network. As the Qi with communication speed, reliability and cost performance good Deng Gao Tuchuyoudian, the more and greater Tazheng widely used in automotive, 機械 industry, textile machinery, agricultural machinery, Ji Qiren, NC 機床, medical equipment, home the fields of electrical appliances and sensors. Figure 1 shows a typical system block diagram CAN bus node.
CAN Bus System Design and Implementation

System hardware design

SJA1000 CAN controller is an independent company PCA82C200CAN PHILIPS alternative controller, which is fully compatible with PCA82C200 basis, adding a new mode of PeliCAN, SJA1000 has many new features full support for the CAN2.0B agreement. SJA1000 work patterns through its internal clock divider registers to select the CAN mode. SJA1000 can support a variety of timing characteristics of the processor, such as the Intel models, or Motorla mode, SJA1000 and the microprocessor interface is very simple microprocessor to access the external memory means to access the SJA1000.

TJA1050 is the Controller Area Network CAN protocol controller and the physical bus interface between, TJA1050 can send a bus to provide different performance for the CAN controller receives a different performance. TJA1050 has following features: full compliance with ISO 11898 standards, the most high-speed to reach 1Mb / s, 3.3V and 5V input stage device is compatible, at least 110 nodes can be connected. The design of the microprocessor 89C51 responsible for initializing the SJA1000 and SJA1000 to achieve by controlling the receive and transmit data such as communication tasks, the system schematic shown in Figure 2.
CAN Bus System Design and Implementation
CAN controller SJA1000 data lines AD0 ~ AD7 connected to Microcontroller 51 P0 port, connected to the base address for the 0xFA00 external memory chip select signal, when the access address 0xFA00 ~ 0xFA31 time, CPU can perform the appropriate read and write operations SJA1000. SJA1000, and, respectively, corresponding with the 51 pin connected, then 51 to 51 can interrupt access SJA1000.
System software design

The design of the system consists of four nodes, one node from the host computer through the parallel port data transfer CAN bus transceivers constitute the other three nodes shown in Figure 2, the system constitutes a single chip CAN bus transceiver. SCM system to send a second (8 bytes) data. Connect PC to CAN bus transceiver corresponding PC test software support, this article introduces the CAN bus transceiver microcontroller programming. Figure 3 is a flow chart of lower computer software.
CAN Bus System Design and Implementation

System design, part of the code is as follows:

main ()
(
Sja_1000_Init (); / / initialize the SJA1000
Init_Cpu (); / / initialize the CPU
Init_T0 (); / / initialize timer
flag_init = 0x00;
while (1)
(
if (rcv_flag) / / rcv_flag to accept the flag, to receive the single chip processor
(
rcv_flag = 0; BCAN_DATA_RECEIVE (rcv_data);
BCAN_CMD_PRG (0X04);
disp_rec ();
)
if (flag_sec) / / timer interrupt flag is, time is the time to send data frame
(Flag_sec = 0; send_data [0] = 0xaa; send_data [1] = 0x08; send_data [2] = DA1;
send_data [3] = DA2;
send_data [4] = DA3;
send_data [5] = DA4;
send_data [6] = DA5;
send_data [7] = DA6;
send_data [8] = DA7;
send_data [9] = DA8; BCAN_DATA_WRITE (send_data); BCAN_CMD_PRG (0X01);
)
if (err_flag)
(
err_flag = 0;
disp_err ();
Sja_1000_Init ();
)
display (a); / / loop which show data

SJA1000 initialization process includes the application into the reset state, set the bus baud rate, set the output mode, open the error interrupt, receive and send interrupts. Data packets sent during the first two bytes 0Xaa, 0X08 for the descriptor, including 11 long ID (identifier) 1 RTR4-bit data length of the DLC were described in 16. BCAN_DATA_RECEIVE (rcv_data), the 89C51 on the SJA1000 read data function of its specific function definition:


bit BCAN_DATA_RECEIVE (unsigned char * RcvDataBuf)
(
unsigned char TempCount;
SJA_BCANAdr = REG_STATUS; / / access point status register address
if ((* SJA_BCANAdr & 0x01) == 0) / / determine the effectiveness of packet
(
return 1;
)
SJA_BCANAdr = REG_RxBuffer2; / / access point to receive buffer 2 address
if ((* SJA_BCANAdr & 0x10) == 0) / / If the data frame
(
TempCount = (* SJA_BCANAdr & 0x0f) 2; / / calculate the number of data packets
)
else
(
TempCount = 2;
)
SJA_BCANAdr = REG_RxBuffer1; / / access point to receive buffer address 1
memcpy (RcvDataBuf, SJA_BCANAdr, TempCount); / / read receive buffer packets
return 0;
)

CAN controller, this function is limited to receiving data, the return value is 0 if successful acceptance, if accepted as a failure.

BCAN_DATA_WRITE (send_data) function is 89C51 write data on the SJA1000 specific function is defined as follows:

bit BCAN_DATA_WRITE (unsigned char * SendDataBuf)
(
unsigned char TempCount;
SJA_BCANAdr = REG_STATUS; / / access point status register address
if ((* SJA_BCANAdr & 0x08) == 0) / / determine whether the completion of the last send
(
return 1;
)
if ((* SJA_BCANAdr & 0x04) == 0) / / determine whether to send the buffer lock
(
return 1;
)
SJA_BCANAdr = REG_TxBuffer1; / / access point to send the address of buffer 1
if ((SendDataBuf [1] & 0x10) == 0) / / determine RTR, and thus come to a data frame or remote frame
(
TempCount = (SendData Buf [1] & 0x0f) 2; / / input data frame
)
else
(
TempCount = 2; / / Remote Frame
memcpy (SJA_BCANAdr, SendDataBuf, TempCount);
return 0;
)

This function will be sent to specific kinds of data frames, send buffer into the SJA1000, and then start, the function returns 0 to send data successfully sent to the buffer, return to the previous one that the data is being sent.

System is relatively easy to network nodes only to hang on the same twisted pair can start the host computer of the CAN transceiver is used to monitor the status of bus data. When starting a lower machine CAN transceiver test PC software can receive every one second by the same CAN transceiver to send data frames. Experimental results show that when the three Slave CAN bus also made the receiver when the number of data loss and no data bus conflict phenomenon.

Conclusion

Fieldbus has great development potential, it will change to the field of automatic control far-reaching implications. We designed the CAN bus transceiver is universal, in the system design based on only the appropriate data transmission protocol can be applied to modify various CAN bus data transfer system.

Declined comment

91精品综合久久久久久五月天_国产精品一区电影_中文字幕欧美日韩一区二区_亚洲一区二区三区精品动漫
99久久国产综合精品五月天喷水| 国产精品视频xxxx| 欧美大香线蕉线伊人久久| 日本免费在线精品| 日本特级黄色大片| 日韩av一二三四区| 人体精品一二三区| 日本福利视频一区| 欧美性猛交久久久乱大交小说| 日韩欧美精品在线不卡| 青青在线免费观看| 黄页网站在线观看视频| 99re在线视频上| 久久精品国产精品亚洲色婷婷| 国产黄色片免费在线观看| 久99久视频| 国产精品美女在线观看| 欧美精品一区二区三区国产精品| 久久久久久国产精品三级玉女聊斋 | 涩涩日韩在线| 日本一区二区久久精品| 欧洲精品在线一区| 免费av网址在线| 国产精品自产拍在线观看中文| 成人欧美一区二区三区黑人免费| 国产精品亚洲不卡a| 成人毛片100部免费看| 成人av电影免费| 国产成人一区二区三区小说| 色偷偷91综合久久噜噜| 国产精品久久久久一区二区| 中文字幕第一页亚洲| 日韩av免费在线| 国产中文字幕在线免费观看| 国产精品一区二区三区观看| 国产精品91免费在线| 日韩在线精品视频| 久久av.com| 欧美一区二区三区……| 激情综合网婷婷| 国产伦精品一区二区三区在线 | 国产大尺度在线观看| 啊v视频在线一区二区三区| 欧美成人精品一区二区| 午夜dv内射一区二区| 欧美精品一区免费| 国产欧美中文字幕| 久久草.com| 欧美人与性动交| 日韩精品国内| 国产九色porny| 日韩专区在线播放| 亚洲精品影院| 精品日韩美女| 国产成人精品av在线| 国产精品久久久久久婷婷天堂 | 日韩有码免费视频| 国产欧美日韩网站| 久久九九精品99国产精品| 亚洲精品国产suv一区88| 加勒比海盗1在线观看免费国语版| 91久久久久久久| 国产99视频精品免视看7| 欧美在线中文字幕| 久久亚洲精品欧美| 亚洲一区二区三区四区在线播放 | 国产av无码专区亚洲精品| 欧美xxxx18国产| 韩国视频理论视频久久| 九色91国产| 亚洲精品日韩激情在线电影| 国语对白做受xxxxx在线中国| 国产成人aa精品一区在线播放| 在线观看一区二区三区三州| 国产中文日韩欧美| 日日摸夜夜添一区| 日本高清不卡一区二区三| 久久久一本精品99久久精品| 一区二区传媒有限公司| 国产日韩欧美自拍| 国产精品国模在线| 国内精品久久久久伊人av| 国产精品视频色| 欧美精品久久久久久久免费| 久久99导航| 日韩欧美一区三区| 久久综合一区二区三区| 午夜欧美不卡精品aaaaa| av一区二区在线看| 亚洲综合精品一区二区| 国产精品一区二区三区免费观看| 精品国产一区二区三区日日嗨| 国产一区在线播放| 欧美乱妇高清无乱码| 国产欧美一区二区三区四区| 欧美xxxx做受欧美| 国产婷婷一区二区三区| 国产精品丝袜久久久久久不卡| 日韩一级免费在线观看| 久久久久亚洲精品成人网小说| 日韩在线观看a| 国产精品永久在线| 一区不卡字幕| 91久久久亚洲精品| 丁香色欲久久久久久综合网| 久久久久久亚洲精品不卡| 欧洲美女7788成人免费视频| 国产精品久久av| 国产一区二区丝袜| 国产精品三级网站| 国产精品制服诱惑| 日韩av成人在线| 国产精品视频在线播放| 国产男女免费视频| 午夜精品在线视频| www.日韩欧美| 国内一区在线| 中文字幕一区二区三区精彩视频| av免费观看网| 日韩欧美手机在线| 欧美精品在线视频观看| 国产精品aaa| 激情五月婷婷六月| 在线免费一区| www国产精品视频| 国产日韩欧美黄色| 欧美一区1区三区3区公司| 国产精品爽爽ⅴa在线观看| 国产欧美精品在线| 日本亚洲导航| 欧美区在线播放| 久久久久福利视频| 国产又粗又长又爽视频| 亚洲bt天天射| 国产精品久久久久久久美男 | 国产l精品国产亚洲区久久| 国精产品一区一区三区视频| 视频在线99| 欧美伦理91i| 日韩有码在线视频| 成人免费淫片aa视频免费| 热草久综合在线| 亚洲字幕在线观看| 九一国产精品视频| 国产精品亚洲片夜色在线| 欧美亚洲一级二级| 亚洲v日韩v欧美v综合| 国产精品久久久久久久久久三级 | 国产一区二区精品免费| 在线观看欧美一区| 国产精品久久久久av| 久久久国产精品一区二区三区| 国产真实乱子伦| 天天综合五月天| 久久在线精品视频| 久久国产精品99久久久久久丝袜| 高清一区二区三区日本久| 欧美精品久久久久久久久久久| 痴汉一区二区三区| 欧美日韩国产成人| 国产精品免费在线| 日韩在线免费视频| 久久久成人精品一区二区三区| 国产免费内射又粗又爽密桃视频 | 日产国产精品精品a∨| 中文字幕一区二区三区四区五区六区 | 久久亚洲精品网站| 日韩中文字幕国产精品| 91精品免费看| 国产精品一区二区a| 欧美图片激情小说| 性色av一区二区三区| 亚洲自拍中文字幕| 久99久在线视频| 国产精品久久久久久久久久久久冷 | 午夜精品久久久久久久无码| 久久综合久久88| 国产精品无码av无码| 久久99蜜桃综合影院免费观看| av动漫在线免费观看| 国产日韩欧美二区| 国产三区精品| 国产中文字幕日韩| 国产中文字幕亚洲| 国产综合在线看| 国产专区精品视频| 欧美成人第一区| 欧美精品成人网| 欧美亚洲一级二级| 精品日本一区二区三区| 欧美尤物一区| 欧美激情一区二区三区在线视频| 青草网在线观看| 欧美精品久久久久久久自慰| 激情视频一区二区| 国模极品一区二区三区| 国产日韩av在线播放| 国产美女久久精品| 高清国语自产拍免费一区二区三区 | 欧美专区日韩视频|