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一区| 久久久久久久网站| 欧美激情视频在线| 国内精品视频一区二区三区| 国产国语videosex另类| 在线码字幕一区| 国产一二三四区在线观看| 久久久久久久久久国产| 无码人妻精品一区二区三区66| 国产精品亚洲美女av网站| 国产精品福利小视频| 欧美视频小说| 色噜噜狠狠狠综合曰曰曰88av| 欧美一级片免费播放| 国产超级av在线| 丁香六月激情网| 国产女人水真多18毛片18精品| 国产精品免费看久久久香蕉| 欧美亚洲一级片| 色噜噜狠狠狠综合曰曰曰| 日本黄网站免费| 777精品视频| 天天操天天干天天玩| 91精品国产自产在线观看永久 | 青青青免费在线| 国产爆乳无码一区二区麻豆| 色大师av一区二区三区| 久久免费视频网| 日本午夜一区二区三区| 8050国产精品久久久久久| 午夜一区二区三视频在线观看| 国产精品99久久久久久久久久久久| 久久av免费观看| 欧美亚洲视频在线观看| 国产精品久久久久久久久久久不卡 | 伊人色综合久久天天五月婷| 国产精品大陆在线观看| 欧美在线视频免费| 久久久精品一区| 热久久这里只有| 国产成人久久婷婷精品流白浆| 欧美精品久久久久久久自慰| 国产精品久久色| 国产中文字幕免费观看| 久操成人在线视频| 91久久精品视频| 日本高清不卡在线| 国产精品日韩欧美一区二区| 国产在线一区二| 亚洲在线免费看| 久久久久久久国产精品| 激情五月婷婷六月| 欧美日韩第一页| 国产精品一区二| 日本a级片在线观看| 国产精品久久久久国产a级| 国产精品亚洲欧美导航| 日本一区不卡| 国产精品海角社区在线观看| 99久久久久国产精品免费| 日本在线观看天堂男亚洲| 国产精品色悠悠| 97精品国产97久久久久久| 日韩久久一级片| 九九九久久国产免费| 久久久99国产精品免费| 激情视频一区二区| 亚洲一区亚洲二区| 国产福利久久精品| 国产一区二区三区播放| 日日噜噜噜夜夜爽爽| 欧美xxxx做受欧美.88| 国产精品96久久久久久又黄又硬| 欧美在线性视频| 亚洲一区高清| 国产精品久久久久77777| 91九色视频在线| 毛葺葺老太做受视频| 日韩av成人在线| 制服诱惑一区| 国产精品推荐精品| av一区二区在线看| 欧美国产二区| 欧美激情综合色综合啪啪五月| 久久er99热精品一区二区三区| 国产伦精品一区二区三毛| 欧洲美女7788成人免费视频| 亚洲一卡二卡三卡| 国产精品毛片一区视频| 国产成人在线精品| 国产乱淫av片杨贵妃| 欧美日韩另类综合| 婷婷久久青草热一区二区| 精品国产免费久久久久久尖叫| 日韩在线视频国产| 国产精品 欧美在线| 国产一区二区高清视频| 欧美日韩国产精品一区二区| 欧美精品久久久久a| 国产成人精品一区二区三区福利| 91观看网站| 国产中文字幕二区| 欧美一级爱爱| 日本高清+成人网在线观看| 一本一本a久久| 精品国产一区二区三区麻豆小说 | 亚洲一区精彩视频| 欧美激情网站在线观看| 国产精品成人久久电影| 久久手机免费视频| 国产成人鲁鲁免费视频a| 久久婷婷开心| 成人伊人精品色xxxx视频| 国内精品久久久久久影视8| 欧美污视频久久久| 日韩精品一区二区三区久久| 日本视频一区在线观看| 水蜜桃亚洲一二三四在线 | 国产精品爽黄69天堂a| 久久久久在线观看| 91久久久久久久久| 成人福利网站在线观看11| 国产区精品在线观看| 女同一区二区| 国模视频一区二区三区| 日韩欧美亚洲日产国| 亚洲一区美女视频在线观看免费| 欧美另类99xxxxx| 久久久久福利视频| 久久99影院| 久久琪琪电影院| 91精品久久久久| 99精彩视频| 成人免费观看毛片| 黑人中文字幕一区二区三区| 免费h精品视频在线播放| 欧美在线影院在线视频| 日韩国产精品一区二区三区| 午夜精品一区二区三区在线视| 一区二区免费在线观看| 国产精品日韩久久久久| 久久成人免费视频| 精品免费国产| 精品伦理一区二区三区| 久久这里只有精品视频首页| 国产精品果冻传媒潘| 国产精品色午夜在线观看| 日韩视频免费在线观看| 久久久久久久免费视频| 日韩在线观看免费| 久久久www成人免费精品张筱雨| 日韩网站免费观看| 久久亚洲国产精品| 欧美片一区二区三区| 在线亚洲美日韩| 欧美激情精品在线| 亚洲制服欧美久久| 日本不卡一区二区三区四区| 日韩精品一区二区三区电影| 欧美亚洲成人网| 国内精品久久久久久中文字幕| 国产三级精品在线不卡| 成人国产一区二区| 国产精品99免视看9| 国产成人精品日本亚洲| 久久精品国产成人| 国产精品国产对白熟妇| 亚洲精品成人a8198a| 日韩.欧美.亚洲| 青草青草久热精品视频在线观看 | 午夜欧美大片免费观看| 日本成人中文字幕在线| 精品一区久久久| 国产精品永久入口久久久| av资源站久久亚洲| 久久人妻无码一区二区| 久久久之久亚州精品露出| xxav国产精品美女主播| 欧美理论片在线观看| 欧美激情极品视频| 欧美一级免费播放| 欧美日韩dvd| 国内精品国产三级国产99| 成人免费毛片网| 国产精品私拍pans大尺度在线| 美女视频久久黄| 欧美一级日本a级v片| 国产在线拍揄自揄视频不卡99| 国产欧美欧洲| 国产成人免费av电影| 一区精品视频| 欧美亚洲伦理www| 国产精品一色哟哟| 国产精品爽爽ⅴa在线观看| 一本色道久久综合亚洲二区三区| 日韩精品一区在线视频| 国产日产欧美a一级在线| av免费精品一区二区三区| 久久精品中文字幕一区|