91精品综合久久久久久五月天_国产精品一区电影_中文字幕欧美日韩一区二区_亚洲一区二区三区精品动漫

CAN bus based on the non-intelligent adapter card design

Controller Area Network CAN (Controller Area Network) is currently approved as international standards, one of a small number of field bus. CAN network can use multi-master manner. It uses non-destructive arbitration bus technology, signaling and control with a short frame structure, which has strong anti-interference ability and low coupling; CAH network traffic rates ranging from 5 kbs/10 km ~ lMbs / / 40m , drive up to 110 nodes. It is the transmission medium can be twisted pair, coaxial cable or fiber, choose a very flexible; information for each frame has a CRC checksum and other error detection measures, and thus the data error rate is very low, reliability is high; when its transmission serious error message when the node can automatically disconnect and bus links, so that other operations on the bus is not affected.

Although PCI, USB and other bus technology has been rapid development, but a large number of applications in computer and industrial computer test, the most used or ISA (Industry Standard Architecture. Industry Standard Architecture) bus. ISA-bus with 16-bit data width, the maximum operating frequency of 8MHz, the data transfer rate up to 16MB / s, there are 24 address bus, 16MB of address addressable unit, the bus signal is divided into five categories, namely address lines, data lines, control lines, clock lines and power lines.

To address the CAN controller SJA1000 with the ISA bus with the signal lines and logic with timing problems, the author designed a CAN bus based on the non-intelligent adapter card. The adapter card has been used in the author developed "based on CAN-bus Motion Control System", run well.

Non-intelligent ISA bus adapter card, the overall structure of CAN

CAN controller SJA1000 address data bus is time division multiplexing, and by the falling edge of ALE signal can be latched on the address bus signal; ISA bus address and data bus are provided independently, it can not address directly and SJA1000 data bus. This design using address decoding circuit for decoding the address signal line so as to allocate a certain CAN adapter's port address. Then, use the 74HC373 chip latches the data latch function for the first time I / O operations through the ISA data bus transmission of data signals, so as to access CAN controller SJA1000 in the register address signal, and finally in the second I / O operations the completion of the corresponding address register SJA1000 reading and writing. The overall structure of its adapter shown in Figure 1.
74HC373 address latch port address can be seen as SJA1000 and SJA1000 SJA1000 data itself can be regarded as the port, in addition to hardware reset of the SJA1000 the reset port. Map the base address decoding circuitry to enable signal AEN as on the A2 ~ A9 address signal decoding can be the base adapter addresses; combinations available AO and A1 address signal offset of the port. SJA1000 is used for communication with the ISA of the two I / O operation, the first of a first delivery address to the address port, the second and then the data port access. Mentioned here are the address and data ports on the SJAl000 purposes, the data line through the ISA bus is available to access the SJA1000 register address and the transmission of data. Control port decoding circuit can be sent by CPU control signals and address signals at a certain combination of logical relations to generate a new set of function signals as the interface control signal. SJA1000 reset by reset circuit can SAJ1000 specific operation can be used on reset, the program reset button reset and hardware reset of three ways.

Adapter hardware design

Base address decoding circuit

Figure 2 shows the base address of a specific decoder. Under normal circumstances, according to system needs, address decoding circuitry on the ISA address lines of port address decoding, and AO ~ A9 can be expressed. Base address decoding circuitry on the A9 ~ A2 decoding, may act as a port on the card base address.

CAN bus based on the non-intelligent adapter card design

Figure 2, 74HC688 is an 8-bit comparator value, then Pi = Qi (i = 0 ... 7), P = Q of the anti-ended output low. When the ISA bus of the AEN is high, the bus working in DMA mode; time when AEN is low, CPU has control of the bus. Non-intelligent adapter cards is actually the CPU on the working process I / O operation process, during which, AEN is always low, can be used to control the strobe terminal G 74HC688 counter. Only in the I / O operation, it allows it to select the address. The use of the DIP switch, users can pre-set base address of adapter cards. The offset of each port on the card from the A1 and A0 select, and through software control, the design definition of offset address port 00, the data offset port 01, reset the port offset 11.

Control Signal

The adapter card of the control signal generation circuit shown in Figure 3. The circuit's main role is sent to CPU control lines and address lines of logic according to certain combination, to generate a new set of function signals Shu Chu. The signal can be used as interface control signals to control the SJA1000, 74HC373, 74HC245 chips such as the work of the state. Since the base address decoder circuit output signal for the P = Q of the anti-(active LOW), SJA1000 address port offset address 00H, the data port offset address 01H, therefore, according to control logic, each adapter card chip control signal logic expression is:

CAN bus based on the non-intelligent adapter card design

CAN bus based on the non-intelligent adapter card design

In the course of adapter cards, the chip's logic timing relationship is this: when the output data valid 74HC373, 74HC245 output is high impedance state; when the 74HC373 output showed a high impedance state, and SJA1000 to ISA bus data directly back to the time, 74HC245 input and output is working properly. Specifically, assuming CAN base address 300H, and visit the SJA1000 is in two I / O operation is complete, then the first data sent to port 300H can be written after the signal is locked along there 74HC373, this operation, 74HC245 and 74HC373 E, the LE side effectively, but the OE terminal is high 74HC373, 74HC373 output high impedance state; when the second time when access to the data port 301H, SJA1000 is selected, then CPU can The corresponding unit of the SJA1000 read / write operations. Specific operational process is divided into reading and writing both. When the second time I / O operation arrives, SJA1000 falling in the BALE signal the first time I / O operation, lock the data as there 74HC373 address latch, the process, 74HC245 anti-E, is high, output was high impedance state, 74HC373's OE is low against the output side effective, to transmit address signals SJA1000. When the address is latched after the SJA1000, at this time if there is to read, then read the signal in the effective period (low), 74HC373's output to allow for the high end anti-OE, 74HC373 output showed a high impedance state, which SJA1000 can be selected when the unit register contents to the data output bus, and drive into the CPU, through the 74HC245. Latch in the address after the write operation if there is, then, 74HC373 output allows side always effective, then you can write the signal in the effective period, the corresponding write data SJA1000 unit.
Computer through the ISA bus of the CAN controller SJA1000 read and write timing are shown in Figure 4 and Figure 5.

CAN bus based on the non-intelligent adapter card design

Reset Circuit

SJA1000 work before, only through the reset pin of its reliable hardware reset to the register of the SJA1000 make the correct read and write operations. So that a reliable reset SJA1000 minimum level continuous time 0.1μs, PC system level reset the duration of up to several microseconds. System, the system reset signal RESET is high when the power supply connected through inverter can be directly used to reset the SJA1000. Figure 6 shows the adapter card, reset circuit, the reset of the SJA1000 has a boot on reset, the program reset and reset button three ways.

CAN bus based on the non-intelligent adapter card design

In Figure 6, A1 and A0 through NAND gate 74LSl0, in order to generate the offset address of reset circuit 11, the address signals and IOW Counter, P = Q signal through the logic combination of anti-so, and to support programs designed to generate SJA1000 reset signal. Program designed to write only port on a data reduction procedure can be realized reset. The reset button can be run in the system when communication failures occur, directly on the CAN controller SJA1000 hardware reset.

Adapter Software

The key part of the software design is the design of CAN communication program. Communication process (process shown in Figure 7,8,9) can be divided into three parts: CAN initialization, receiving process, send process. Initialization is a prerequisite for communication, mainly to complete some of the CAN controller register settings. As the SJA1000 interrupt operations support, so you can interrupt service routine to complete the receive and transmit data to improve system efficiency.

In fact, only in the reset mode can be initialized on the SJA1000, initialization includes work settings, receive filter mode setting mask register and receive the code to receive register set, the baud rate parameter setting and interrupt Allow register settings. After the completion of initialization can be set to work SJA1000 state to carry out normal communications. Subroutine is responsible for node to send packets to send. Send when you read the status register and determine appropriate, and send the data to be combined into a specific format for a message, send the buffer zone into the SJA1000, SJA1000 and then start to send; received message subroutine is responsible for the node reception and treatment of other conditions. In dealing with the process of receiving messages, but also on the bus off, error alarm, receive overflow handling the situation.

CAN adapter interrupt communication with the computer can use. However, WIN API can not directly control the break, only the underlying operating system CAN adapter for the preparation of the virtual device driver (VxD) can use interrupts. This requires a virtual device driver will interrupt virtualization, and response functions in the interrupt event to write the necessary code, while providing access interface for applications. It should be noted: the computer through the ISA bus right on the SJA1000 CAN adapter uses a visit to two I / O operations, for the first time Wang address port to send address, the second on the data port access. The detailed codes are as follows:

/ / To the specified SJA1000 register (address addr) write a byte of data (data), CAN_BASE as the base address
void CanIRQ:: writeByte (int CAN_BASE, unsigned char addr, unsigned char data)
(
_outp (CAN_BASE, addr);
_outp (CAN_BASE +1, data);
)
/ / From the specified SJA1000 register (address addr) read a byte of data (data)
unsigned char CanIRQ:: ReadByte (int CAN_BASE, unsigned char addr)
(
unsigned char result;
_outp (CAN_BASE, addr);
result = _inp (CAN_BASE +1);
return result;
)

Visit SJA1000 program, you can directly call these two Functions. In this way, send the segment code:

Bool CanIRQ:: CanTrans (int CAN_BASE, unsigned char * pTransBuf)
(
status = ReadByte (CAN_BASE, SR); / / SR for the status register address
for (i = 0; i
(
WriteByte (CAN_BASE, * pTFansBuf, ptbuf; / / pTransBuf to send buffer address
ptbuf + +; pTransBuf + +;
)
)

Conclusion

ISA bus by addressing the computer and CAN controller SJA1000 with the logic of coordination and timing to be completed by non-intelligence based on CAN Bus Adapter. The adapter has been successfully applied to the author by the development of CAN bus-based measurement and control system. In fact, if the increase in the adapter card CAN communication controller, you can get more than a cassette CAN bus, to increase the network node, expand the network scale. In addition, you can also adapter applications, depending on the application system requires the preparation of various control procedures to extend the system functionality.

Declined comment

91精品综合久久久久久五月天_国产精品一区电影_中文字幕欧美日韩一区二区_亚洲一区二区三区精品动漫
久久免费精品日本久久中文字幕| 欧美精品激情视频| 国产在线视频不卡| 黄色一级片国产| 含羞草久久爱69一区| 黄色大片在线免费看| 精品欧美国产| 国内视频一区| 国产九九精品视频| 91干在线观看| 久久福利电影| 久久精品国产亚洲精品| 国产精品无码专区在线观看| 精品国产一区二区三区四区在线观看 | 国产激情在线观看视频| 国产高清在线一区| 国产精品视频久久久久| 欧美成人一区二区三区电影| 欧美人成在线视频| 亚洲国产精品久久久久爰色欲 | 久久久久久久av| 久久成人免费观看| 国产成人精品视频在线观看| 麻豆成人在线看| 亚洲综合小说区| 日韩精品一区二区三区四区五区| 欧美在线影院在线视频| 国产一区二区在线观看免费播放| www..com日韩| 久久久久中文字幕| 欧美乱大交xxxxx| 日本精品免费观看| 免费看国产精品一二区视频| 高清欧美精品xxxxx| 久久久噜噜噜久久| 久久国产精品影片| 日韩av电影中文字幕| 黄色片网址在线观看| 不卡一区二区三区视频| 久久久久久久久久久av| 九九热在线精品视频| 少妇免费毛片久久久久久久久| 欧美动漫一区二区| 91国自产精品中文字幕亚洲| 国产精品嫩草影院一区二区| 天天好比中文综合网| 国产在线播放一区二区| 久久综合九九| 欧美激情视频一区| 欧美 日韩 国产在线| 91久久精品视频| 久久精品一区中文字幕| 亚洲a∨一区二区三区| 免费拍拍拍网站| 久久99欧美| 亚洲精品高清国产一线久久| 蜜桃成人在线| 日韩中文字幕在线| 欧美一区二区三区……| 国产美女主播在线播放| 日韩视频亚洲视频| 日韩精品久久一区二区三区| 成人精品视频一区二区| 欧美xxxx18性欧美| 国内免费精品永久在线视频| 久久久久久九九九九| 亚洲免费av网| 成人国产精品久久久| 久久av资源网站| 欧美日韩亚洲免费| 国产不卡在线观看| 五月天色婷婷综合| 91免费国产网站| 欧美日韩国产成人在线观看| 国产在线视频欧美一区二区三区| 久久久久久久久久国产精品| 亚洲va码欧洲m码| 99精品国产高清在线观看| 欧美激情精品久久久久久黑人| 免费久久久久久| 久久精品国产2020观看福利| 日本一区二区三区四区高清视频| 成人国产精品日本在线| 久久97精品久久久久久久不卡 | 欧美日韩国产精品激情在线播放| 国产高清在线精品一区二区三区| 亚洲自拍欧美色图| 成人动漫在线视频| 伊人精品久久久久7777| 国产伦精品一区二区三区免费视频| 久久亚洲私人国产精品va| 国内视频一区二区| 欧美精品日韩三级| 国产裸体免费无遮挡| 伊人色综合久久天天五月婷| 国产麻豆电影在线观看| 一区二区三区在线观看www| 国产精品有限公司| 亚洲一区精品视频| 久久免费视频在线| 人人做人人澡人人爽欧美| 日韩中文字幕在线| 精品少妇人妻av免费久久洗澡| 成人444kkkk在线观看| 国产免费色视频| 亚洲人一区二区| 久久精品国产精品亚洲精品色| 日本国产中文字幕| 国产精品啪视频| 国产精品自拍偷拍| 亚洲国产一区二区三区在线| 久久99久久精品国产| 免费观看美女裸体网站| 一区二区在线观看网站| 国产xxxxx视频| 女同一区二区| 综合操久久久| 久久久久久久国产精品| 国内精品视频免费| 亚洲综合自拍一区| 国产成人在线小视频| 欧美亚洲激情视频| 精品不卡一区二区三区| 91精品久久久久久蜜桃| 日本免费一区二区三区视频观看| 国产成人精品久久| 免费久久久久久| 中文字幕一区二区中文字幕| 久久久久久久久久久久久久一区| 狠狠干视频网站| 在线观看福利一区| www.亚洲免费视频| av动漫在线看| 黄色成人在线免费观看| 午夜精品美女久久久久av福利| 久久人人爽人人爽爽久久| 91精品在线国产| 免费在线观看亚洲视频| 亚洲国产精品久久久久爰色欲| 国产精品推荐精品| 国产精品在线看| 欧美在线视频一区二区三区| 在线观看欧美一区| 国产精品丝袜白浆摸在线| 99精品视频播放| 免费毛片网站在线观看| 日本精品久久久久久久久久| 欧美日韩高清在线观看| 久久久999国产| 国产精品27p| 高清欧美性猛交| 麻豆久久久av免费| 日韩免费在线看| 亚洲影视九九影院在线观看| 久久综合免费视频| 日韩在线免费高清视频| 91久久精品日日躁夜夜躁国产| 免费看a级黄色片| 人人妻人人做人人爽| 一区二区免费在线观看| 国产精品国产福利国产秒拍| 久草热视频在线观看| 99国产在线| 国产精品香蕉视屏| 国产日韩精品在线| 国模视频一区二区三区| 日韩精品国内| 日韩av免费看网站| 亚洲国产另类久久久精品极度| 精品久久久久久无码国产| 久久精品国产一区| 色噜噜狠狠狠综合曰曰曰| 久久手机在线视频| 69av视频在线播放| 91成人福利在线| 99电影在线观看| 爱福利视频一区二区| av网址在线观看免费| 国产欧美日韩中文| 国模无码视频一区二区三区| 欧美日韩在线成人| 欧美日韩国产精品一区二区 | 精品视频高清无人区区二区三区| 日韩精品久久一区二区| 欧美激情www| 欧美亚州在线观看| 狠狠色综合网站久久久久久久| 欧美亚州在线观看| 一区二区视频在线播放| 中文字幕在线亚洲三区| 亚洲乱码国产一区三区| 亚洲xxxx视频| 欧美一级视频一区二区| 日韩 欧美 自拍| 欧美一区免费视频| 国产主播喷水一区二区| 久久精品视频在线| 久久99精品国产99久久6尤物| 久久精品一区中文字幕| 国产精品福利在线|