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网| 午夜欧美大片免费观看| 91精品91久久久中77777老牛| 亚洲精品电影在线一区| 久久青青草原| 欧美精品与人动性物交免费看| 久久精品影视伊人网| 蜜桃视频一区二区在线观看| 九九热视频这里只有精品| 成人91免费视频| 日韩av不卡电影| 久久视频国产精品免费视频在线| 精品一区二区中文字幕| 欧美日韩国产成人在线| 99国内精品久久久久久久软件| 亚洲欧洲三级| 国产成人在线亚洲欧美| 欧美久久久久久一卡四| 精品久久久久久综合日本| 国产精品香蕉在线观看| 日本一区高清在线视频| 国产精品我不卡| 国产伦视频一区二区三区| 日韩中文字幕二区| 国产精品久久久影院| 97精品欧美一区二区三区| 日韩精品一区二区三区色欲av| 国产精品久久久久av免费| 国产精品一区在线观看| 色播亚洲婷婷| 久久夜色撩人精品| 99热在线国产| 欧美资源一区| 亚洲人精品午夜射精日韩| 久久精品国产96久久久香蕉| 国产精品一区二区久久| 欧美视频在线观看视频| 在线亚洲美日韩| 久久久精品国产一区二区| 成人美女免费网站视频| 欧美性天天影院| 亚洲蜜桃在线| 欧美成人精品在线| 久久久久免费精品国产| 国产精品一区二区久久精品| 欧美中文字幕在线| 欧美激情第三页| 国产精品爽黄69| 久久久av水蜜桃| 成人一区二区av| 狠狠噜天天噜日日噜| 色一情一乱一伦一区二区三区丨| 国产精品极品在线| 国产成人一区二| aaa免费在线观看| 国内成+人亚洲| 日韩美女视频中文字幕| 亚洲日本一区二区三区在线不卡| 国产精品久久久久久中文字| 久久欧美在线电影| 99视频精品全部免费看| 激情深爱综合网| 亚洲aaa激情| 一区二区视频在线观看| 国产精品久久久久久久免费大片| 国产黄色激情视频| 成人精品一区二区三区电影免费| 黄色国产小视频| 奇米影视亚洲狠狠色| 亚洲国产精品123| 欧美成人中文字幕| 国产精品久久久久久亚洲调教| 久久久久久中文字幕| 久久这里精品国产99丫e6| 成人免费xxxxx在线观看| 精品免费视频123区| 日本成人中文字幕在线| 亚洲欧洲国产日韩精品| 最新av网址在线观看| 久久香蕉国产线看观看网| 久久久91精品国产一区不卡| 久久精品国产理论片免费| 99视频日韩| av免费精品一区二区三区| 成人久久精品视频| 高清视频一区| 国产精品一区二区久久| 国产美女精品在线观看| 国产日韩欧美亚洲一区| 国产视频一区二区三区四区| 国产在线观看一区二区三区| 黄色网络在线观看| 国语对白做受xxxxx在线中国| 欧美一区二视频在线免费观看| 日本国产欧美一区二区三区| 日韩免费高清在线| 欧美亚洲国产视频| 黄色网页免费在线观看| 精品一区二区三区视频日产| 麻豆成人av| 国产日韩久久| 成人中文字幕在线观看| 97国产一区二区精品久久呦| 97久久天天综合色天天综合色hd| 91久久久久久久久久久| 久久久999视频| 日韩一区二区高清视频| 性欧美激情精品| 日韩欧美视频一区二区| 欧美影视一区二区| 免费观看国产精品视频| 国产精品一二区| 欧美一区二区中文字幕| 日本精品久久电影| 日韩一区国产在线观看| 亚洲综合av一区| 一区二区三区在线观看www| 毛片精品免费在线观看| 国产精品福利网站| 国产精品久久久久久一区二区| 久久人人爽人人爽爽久久| 久久久噜噜噜久噜久久| 国产成人精品免费久久久久| 亚洲v国产v| 亚洲一区二区自拍| 日韩不卡视频一区二区| 黄色大片中文字幕| aaa级精品久久久国产片| 久草资源站在线观看| 国产精品区一区二区三在线播放| 久久99久久99精品免观看粉嫩| 亚洲永久在线观看| 欧美在线播放一区二区| 国产伦一区二区三区色一情| 国产国产精品人在线视| 国产精品激情av在线播放| 一区二区三区一级片| 日韩欧美一区二区视频在线播放 | 国产日韩一区在线| 91精品国产乱码久久久久久久久 | 国产福利久久精品| 国产精品三级网站| 一区二区三区久久网| 日本精品二区| 国产日韩av在线| 国产极品jizzhd欧美| 视频一区在线免费观看| 这里只有精品66| 午夜免费在线观看精品视频| 日韩欧美在线播放视频| 欧美二区三区在线| 国产剧情日韩欧美| 久久免费视频在线| 久久精品福利视频| 中文精品一区二区三区| 日本成人中文字幕在线| 麻豆成人小视频| 97激碰免费视频| 日本一区二区三区四区视频| 日本一区高清在线视频| 国产女女做受ⅹxx高潮| 久久99精品久久久久久秒播放器 | 日本一区二区三区四区视频| 日韩理论片在线观看| 精品嫩模一区二区三区| 国产精品自产拍高潮在线观看| 久久久免费高清电视剧观看| 国产精品推荐精品| 中文字幕日韩精品一区二区| 日本精品视频网站| 国产日韩久久| 日韩一区二区三区国产| 欧美成aaa人片免费看| 视频一区在线免费观看| 蜜桃视频成人在线观看| 久久全球大尺度高清视频| 国产精品久久电影观看| 亚洲精品tv久久久久久久久| 韩国国内大量揄拍精品视频| 91精品国产91久久久久麻豆 主演 91精品国产91久久久久青草 | 色噜噜狠狠狠综合曰曰曰 | 久热免费在线观看| 国产精品成人品| 天天摸天天碰天天添| 国产中文字幕亚洲| 久久精品综合一区| 欧美激情一二区| 欧美 日韩 国产 激情| 91精品久久久久久久久久久| 国产精品激情自拍| 日韩精品一区二区三区四区五区| 超碰97国产在线| 国产精品第二页| 欧美亚洲另类激情另类| 131美女爱做视频| 不卡中文字幕av|