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精品综合久久久久久五月天_国产精品一区电影_中文字幕欧美日韩一区二区_亚洲一区二区三区精品动漫
久久久综合av| 国产精品久久久久一区二区| 国产一区二区久久久| 免费在线观看的毛片| 青春草在线视频免费观看| 日韩人妻一区二区三区蜜桃视频| 欧美一区二区视频在线| 亚洲国产欧美日韩| 欧美一区二区三区精品电影| 日本不卡二区| 精品视频无码一区二区三区| 裸模一区二区三区免费| 国产亚洲欧美在线视频| 粉嫩av免费一区二区三区| 91免费版网站入口| 九一免费在线观看| 国产精品区二区三区日本| 精品中文字幕在线| 亚洲va韩国va欧美va精四季| 日本不卡一区二区三区四区 | 国模精品一区二区三区| 国产女人18毛片水18精品| 国产在线一区二| 99热亚洲精品| 日韩在线欧美在线| 国产精品久久九九| 亚洲午夜精品一区二区三区| 婷婷久久五月天| 欧美日韩国产一二| 风间由美一区二区三区| 国产高清免费在线| 国产精品高潮呻吟久久av无限| 影音先锋欧美在线| 日韩av片免费在线观看| 国产视频一区二区三区在线播放| 91久久精品久久国产性色也91| 日韩在线观看高清| 九九视频直播综合网 | 中文字幕久久一区| 少妇高潮喷水久久久久久久久久| 欧美日韩精品免费观看视一区二区| 国产又粗又长又爽视频| 91av成人在线| 国产精品第3页| 日本三级中文字幕在线观看| 美国av一区二区三区| 91.com在线| 欧美日本中文字幕| 欧美性视频精品| 97碰在线观看| 国产精品久久国产精品99gif | 日韩av资源在线| 国产欧美精品va在线观看| 久久伦理网站| 久久久久久成人精品| 欧美一性一乱一交一视频| 91精品国产一区二区三区动漫| 国产精品精品国产| 日本精品久久中文字幕佐佐木| 国产日韩精品视频| 日韩亚洲欧美成人| 视频在线一区二区三区| 国产欧美日韩综合一区在线观看| 久久久久久久有限公司| 亚洲综合成人婷婷小说| 国内一区二区三区在线视频| 久久国产精品高清| 亚洲国产欧洲综合997久久| 国产尤物91| 久久久国产精品视频| 视频在线99re| 超碰97在线播放| 久久成人人人人精品欧| 欧美国产综合在线| 国产高清www| 亚洲xxxx做受欧美| 国产免费一区二区三区香蕉精| 国产精品欧美亚洲777777| 日本精品久久久久中文字幕| www婷婷av久久久影片| 精品国产无码在线| 国产这里只有精品| 国产精品美女免费看| 欧美综合激情| 国产suv精品一区二区三区88区| 亚洲激情免费视频| 97伦理在线四区| 一级一片免费播放| 国产精品亚洲a| 色综合色综合网色综合| 免费国产一区| 国产精品黄色影片导航在线观看| 欧美视频在线播放一区| 国产成人无码av在线播放dvd| 日韩精品久久一区二区三区| 久久久久久久久久久一区| 日韩免费黄色av| 日韩中文字幕久久| 日韩免费av在线| 久久精品国产一区二区电影| 男人天堂成人网| 国产精品第一区| 国产精品一色哟哟| 日韩一级片免费视频| 国产成人av影视| 日本精品一区二区三区不卡无字幕 | 成人福利网站在线观看| 伊人天天久久大香线蕉av色| 成人短视频在线观看免费| 亚洲欧洲精品一区| 久久人人爽爽人人爽人人片av| 肉大捧一出免费观看网站在线播放| 8050国产精品久久久久久| 欧美一级黄色网| 久久久久99精品久久久久| 美女被啪啪一区二区| 国产精品成人观看视频国产奇米 | 国产精品国产精品国产专区蜜臀ah| 麻豆一区二区三区在线观看| 色综合色综合网色综合| 97久久久免费福利网址| 日本韩国欧美精品大片卡二| 久热精品视频在线| 国产精品午夜国产小视频| 亚洲爆乳无码专区| 久久久精品久久久久| 国产亚洲精品久久久久久久 | 国产精品免费视频一区二区| 国产精品一区二区三区成人| 性色av一区二区咪爱| 久久天天躁狠狠躁夜夜爽蜜月| 国产女人水真多18毛片18精品| 日本在线视频www| 日韩中文字幕视频| 国产噜噜噜噜久久久久久久久| 三年中文高清在线观看第6集| 国产精品网红直播| 成人久久久久久| 日韩女在线观看| 欧美日韩国产成人在线观看| 久久免费精品日本久久中文字幕| 日本欧美视频在线观看| 久久国产精品久久国产精品| 国产妇女馒头高清泬20p多| 免费在线一区二区| 日本在线观看天堂男亚洲| 欧美日韩国产二区| 精品国产一区二区三区在线观看| 97欧美精品一区二区三区| 欧美凹凸一区二区三区视频| 亚洲国产成人不卡| 久久中文字幕视频| 久久99久久久久久| 国产精品一区二区免费在线观看| 欧洲亚洲一区二区三区四区五区| 亚洲一区二区久久久久久久| 久久久久久中文字幕| www.亚洲一区二区| 蜜臀久久99精品久久久酒店新书| 日韩av高清在线看片| 一本久道久久综合| 久久中文字幕一区| 国产精品偷伦免费视频观看的| 国产精品2018| 99亚洲国产精品| 国产精品亚洲欧美导航| 国产在线青青草| 狠狠色综合网站久久久久久久| 日韩无套无码精品| 午夜精品一区二区三区在线| 欧美激情亚洲国产| 国产精品久久亚洲| 久久精品国产亚洲一区二区| 国产xxxxx在线观看| 91禁国产网站| 99精品国产高清一区二区| 国产欧亚日韩视频| 国产一区亚洲二区三区| 欧美高清视频一区 | 日韩av电影在线网| 动漫一区二区在线| 亚洲欧美99| 亚洲一二区在线| 亚洲制服欧美久久| 亚洲尤物视频网| 亚洲综合在线播放| 一本色道婷婷久久欧美| 亚洲最大福利网站| 亚洲一区二区三区四区中文| 在线观看污视频| 亚洲国产精品一区二区第四页av| 中文字幕一区综合| 亚洲精品中文字幕乱码三区不卡| 一本色道久久88亚洲精品综合| 亚洲一区二区三区精品动漫| 亚洲aaa激情| 日本一区二区三区在线播放| 日韩欧美视频一区二区三区四区| 青青草成人在线| 精品无码一区二区三区爱欲|