日韩免费一级毛片在线观看-中文日韩亚洲综合-欧美系列日韩另类-欧美激情极品日韩-午夜日韩爱爱毛片视频免费看-欧美日韩一区免费观看-欧美日韩欧美黄色三级

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

日本久久久久久久 97久久精品一区二区三区 狠狠色噜噜狠狠狠狠97 日日干综合 五月天婷婷在线观看高清 九色福利视频 | 欧美大片一区| 精品久久久久久综合网| 国产不卡精品一区二区三区| 日日夜人人澡人人澡人人看免| 久久国产精品永久免费网站| 欧美电影免费看大全| 成人影视在线观看| 九九精品在线| 国产国语在线播放视频| 可以免费在线看黄的网站| 日日日夜夜操| 黄视频网站免费看| 欧美激情在线精品video| 日韩一级黄色片| 日本久久久久久久 97久久精品一区二区三区 狠狠色噜噜狠狠狠狠97 日日干综合 五月天婷婷在线观看高清 九色福利视频 | 亚洲第一页乱| 韩国三级视频在线观看| 成人高清视频在线观看| 麻豆网站在线免费观看| 国产成人啪精品| 欧美国产日韩久久久| 国产成人女人在线视频观看 | 国产欧美精品| 天天做日日干| 美女被草网站| 青青久久国产成人免费网站| 一级毛片看真人在线视频| 日韩在线观看视频黄| 黄色福利| 亚洲天堂免费| 九九热国产视频| 亚洲精品中文一区不卡| a级黄色毛片免费播放视频| 中文字幕Aⅴ资源网| 精品久久久久久中文| 精品久久久久久综合网| 国产视频久久久| 精品国产一区二区三区免费| 沈樵在线观看福利| 亚洲精品久久玖玖玖玖| 国产美女在线观看| 国产成+人+综合+亚洲不卡| 欧美国产日韩久久久| 91麻豆精品国产自产在线| 日韩一级黄色片| 久久成人亚洲| 久草免费在线视频| 欧美日本二区| 美女免费毛片| 成人影院一区二区三区| 精品国产一区二区三区国产馆| 亚洲精品久久玖玖玖玖| 成人免费观看网欧美片| 日韩中文字幕在线亚洲一区| 亚洲女人国产香蕉久久精品| 久久国产一久久高清| 欧美激情在线精品video| 一级毛片视频免费| 久久国产影院| 久久精品人人做人人爽97| 午夜在线影院| 欧美一区二区三区性| 亚欧视频在线| 国产91丝袜在线播放0| 国产高清视频免费| 久久国产影视免费精品| 日本在线不卡视频| 欧美一级视| 亚久久伊人精品青青草原2020| 一级女性全黄生活片免费| 四虎论坛| 天天做人人爱夜夜爽2020毛片| 日本乱中文字幕系列| 国产一区二区精品| 青青久在线视频| 国产成人精品综合在线| 欧美电影免费| 亚洲天堂免费| 欧美激情一区二区三区视频 | 欧美激情一区二区三区视频 | 免费的黄色小视频| 你懂的在线观看视频| 99久久精品国产国产毛片| 天天色成人| 日本伦理片网站| 99色视频在线| 国产不卡高清在线观看视频| 久久国产精品自线拍免费| 中文字幕一区二区三区精彩视频 | 日韩免费在线视频| 青青久在线视频| 亚洲精品影院久久久久久| 国产麻豆精品hdvideoss| 91麻豆精品国产综合久久久| 色综合久久天天综合观看| 欧美日本韩国| 免费一级片在线观看| 精品国产一区二区三区久久久蜜臀| 黄色免费三级| 日韩中文字幕在线观看视频| 久久福利影视| 韩国三级视频网站| 精品在线免费播放| 日本在线不卡视频| 日韩男人天堂| 国产网站在线| 欧美激情一区二区三区在线 | 免费一级生活片| 日韩在线观看视频黄| 一a一级片| 九九久久国产精品大片| 一级毛片视频免费| 国产精品自拍亚洲| 麻豆污视频| 精品久久久久久中文字幕一区 | 美女免费黄网站| 日韩在线观看视频网站| 免费一级生活片| 精品国产一区二区三区国产馆| 青青青草影院 | 韩国三级视频网站| 国产不卡在线观看视频| 午夜欧美福利| 欧美大片一区| 国产成人精品综合在线| 精品视频一区二区三区免费| 精品视频在线观看一区二区| 九九九在线视频| 精品视频一区二区| 国产伦久视频免费观看视频| 国产不卡在线观看视频| 欧美α片无限看在线观看免费| 日日日夜夜操| 天天做人人爱夜夜爽2020毛片| 黄视频网站在线看| 四虎精品在线观看| 国产精品免费久久| 精品视频一区二区三区免费| 你懂的福利视频| 你懂的福利视频| 日本伦理片网站| 中文字幕一区二区三区 精品| 国产伦精品一区二区三区在线观看| 日本伦理片网站| 免费国产一级特黄aa大片在线| 欧美激情中文字幕一区二区| 欧美激情一区二区三区中文字幕| 精品久久久久久免费影院| 国产麻豆精品免费密入口| 人人干人人草| 日本久久久久久久 97久久精品一区二区三区 狠狠色噜噜狠狠狠狠97 日日干综合 五月天婷婷在线观看高清 九色福利视频 | 国产极品精频在线观看| 国产高清视频免费观看| 精品国产亚洲人成在线| 你懂的在线观看视频| 精品视频一区二区三区| 亚洲精品中文一区不卡| 国产成人精品在线| 精品视频在线看| 黄视频网站免费看| 亚洲女初尝黑人巨高清在线观看| 久草免费在线观看| 黄色短视频网站| 国产伦理精品| 青青青草影院 | 999久久狠狠免费精品| 青青久久精品| 久久99中文字幕| 日本特黄一级| 国产网站免费| 你懂的在线观看视频| 欧美a级成人淫片免费看| 精品国产一区二区三区久久久蜜臀| 九九九在线视频| 天天做人人爱夜夜爽2020| 亚洲第一视频在线播放| 深夜做爰性大片中文| 日韩中文字幕一区二区不卡| 青青青草影院 | 欧美激情一区二区三区视频高清| 日韩一级精品视频在线观看| 精品视频一区二区三区| 日本伦理片网站| 久久精品店| 国产成人啪精品视频免费软件| 黄色福利| 尤物视频网站在线观看| 亚洲第一页乱| 美女免费精品高清毛片在线视| 欧美激情一区二区三区在线 | 国产亚洲免费观看| 免费国产在线视频| 精品视频在线观看免费| 国产综合成人观看在线| 国产激情一区二区三区| 欧美激情一区二区三区在线 | 欧美激情伊人| 亚洲第一色在线| 国产网站在线|