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, 機(jī)械 industry, textile machinery, agricultural machinery, Ji Qiren, NC 機(jī)床, 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精品综合久久久久久五月天_国产精品一区电影_中文字幕欧美日韩一区二区_亚洲一区二区三区精品动漫
亚洲综合国产精品| 国产精品一区二区三区不卡| 国产精品久久激情| 国产精品日日摸夜夜添夜夜av | 丁香六月激情婷婷| 97热精品视频官网| 99精品99久久久久久宅男| 91成人免费视频| 91国产视频在线播放| 91精品黄色| 久久国产精品精品国产色婷婷| 国产高清不卡av| 久久久久久久色| 国产精品视频一区二区三区四区五区| 国产精品久久久久久久久久久久午夜片| 国产精品对白一区二区三区| 一区二区三区四区免费视频 | 亚洲人成网站在线播放2019| 亚洲一区二区三区视频| 日本国产中文字幕| 国内精品久久久久| av免费观看久久| 久久99精品国产99久久| 国产精品青青草| 欧美精品video| 午夜精品www| 欧美精品欧美精品系列c| 国产欧美一区二区视频| 91精品久久久久久久久久久| 日韩在线精品一区| 欧美精品做受xxx性少妇| 亚洲一区二区三区乱码aⅴ蜜桃女| 日本精品视频在线| 国产在线精品自拍| 国产经典一区二区三区| 日韩在线欧美在线国产在线| 国产精品高潮粉嫩av| 性欧美长视频免费观看不卡| 欧美老熟妇喷水| 不卡视频一区| 国产精品美乳一区二区免费| 午夜精品久久久久久久99热| 麻豆蜜桃91| 国产成人精品免费视频| 九九精品视频在线观看| 日韩免费观看av| 国产欧美一区二区三区视频 | 久久精品日产第一区二区三区乱码| 国产精品日韩在线一区| 午夜视频久久久| 国产一区二区在线观看免费播放| 国产成人亚洲精品无码h在线| 国产精品成av人在线视午夜片 | 黑人中文字幕一区二区三区| 91精品国产一区| 国产精品美女www| 日韩av成人在线| 国产一级不卡视频| 国产成人女人毛片视频在线| 亚洲 高清 成人 动漫| 国产一区二区三区四区五区在线| 久久久久久久久久久综合| 亚洲精品国产suv一区88| 9a蜜桃久久久久久免费| 久久成年人免费电影| 欧美在线视频观看| 久久人人爽人人爽人人片av高请| 国产99视频在线观看| 欧美黄色免费影院| 九九九热999| 日韩av在线播放不卡| 97久久伊人激情网| 精品久久久久久一区二区里番 | 奇米影视首页 狠狠色丁香婷婷久久综合 | 成人毛片100部免费看| 国产精品国色综合久久| 欧美在线一区二区三区四| 久久99精品国产一区二区三区 | 精品一区久久| 国产精品久久久久久久久借妻| 日韩精品在线视频免费观看| 69久久夜色精品国产69| 亚洲一区二区在线看| 免费国产一区二区| 麻豆乱码国产一区二区三区| 狠狠综合久久av| 国产精品久久久999| 精品一区二区三区无码视频| 国产精品福利视频| 国产欧亚日韩视频| 一区二区三区四区欧美日韩| 99在线国产| 亚洲精品国产suv一区88| 国产精品亚发布| 亚洲在线观看一区| 91九色在线免费视频| 亚洲国产精品日韩| 久青草视频在线播放| 亚洲国产一区二区在线| 国产精品69久久| 日韩国产精品一区二区| 深夜福利国产精品| 欧美成人第一区| 精品国产区在线| 成人免费观看视频在线观看| 亚洲国产一区二区三区在线| 视频一区视频二区国产精品| 欧美丰满熟妇xxxxx| 精品国产无码在线| 97久久精品在线| 日韩视频一二三| 国产精品成人久久久久| dy888夜精品国产专区| 无码av天堂一区二区三区| 久久99国产精品| 精品一区久久| 亚洲午夜激情| 久久久久久久久一区二区| 每日在线更新av| 午夜精品一区二区三区在线| 日韩一中文字幕| 国产精品一区在线播放| 日韩免费av片在线观看| 精品免费二区三区三区高中清不卡| 91久久久久久久久| 欧美理论一区二区| 亚洲欧洲精品一区二区三区波多野1战4| 久久久人人爽| 欧美日韩视频免费| 在线观看免费91| www.欧美精品一二三区| 国产精品一区二区三区观看| 日韩精品一区二区三区不卡| 久久中国妇女中文字幕| 久久天天东北熟女毛茸茸| 激情内射人妻1区2区3区 | 国产精品美女在线观看| 91精品美女在线| 黄色一区三区| 天天久久人人| 精品免费久久久久久久| 久久免费视频3| 国产欧美va欧美va香蕉在线| 日韩少妇内射免费播放| 欧美精品xxx| 久久精品99久久香蕉国产色戒| 不卡视频一区二区三区| 蜜桃麻豆www久久国产精品| 日本欧美色综合网站免费| 一区二区三区久久网| 久久精品2019中文字幕| 91好吊色国产欧美日韩在线| 国产在线青青草| 日韩精品 欧美| 午夜精品美女久久久久av福利| 久久夜精品香蕉| 久久久久久久久久久久久久国产| 北条麻妃在线一区| 国产一区视频免费观看| 青草青草久热精品视频在线网站| 亚洲色图自拍| 精品久久久久久久免费人妻| 国产精品视频久久久久| 久久国产午夜精品理论片最新版本| 国产麻花豆剧传媒精品mv在线| 激情五月开心婷婷| 欧美日韩精品久久久免费观看| 欧美一级黄色影院| 色乱码一区二区三在线看| 欧美激情国产精品| 欧美xxxx18性欧美| 国产精品美女www| xxx一区二区| 视频在线一区二区| 日韩在线播放av| 三级精品视频久久久久| 久久久久久久久一区| 久久久久久久久久久免费| 九色综合日本| 久久成人福利视频| 国产成人在线播放| 国产盗摄视频在线观看| 国产成人精品久久二区二区| 国产成人综合一区| 国产成人精品999| 久久久久久久久电影| 久久综合九九| 久久免费视频在线观看| 久草视频这里只有精品| 国产爆乳无码一区二区麻豆| 久草精品在线播放| 日韩中文理论片| 久久久久久久色| 久久精品久久久久久| 国产精品久久久对白| 精品国产一区二区三区免费| 亚洲综合视频一区| 日韩av不卡在线| 欧美日韩国产不卡在线看| 国内久久久精品|