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

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

日韩一级黄色大片| 日韩av成人| 亚欧乱色一区二区三区| 日本特黄一级| 国产91素人搭讪系列天堂| 99久久精品国产免费| 沈樵在线观看福利| 香蕉视频亚洲一级| 成人免费观看的视频黄页| 九九九网站| 国产91精品露脸国语对白| 韩国三级视频网站| 美国一区二区三区| 天堂网中文字幕| 国产麻豆精品| 欧美激情一区二区三区视频 | 欧美日本免费| 日韩在线观看免费完整版视频| 你懂的国产精品| 国产成人啪精品| 国产福利免费视频| 99色视频| 国产视频一区二区在线观看| 999精品在线| 国产a视频| 日韩av成人| 久久国产一久久高清| 99久久精品费精品国产一区二区| 日韩中文字幕一区二区不卡| 日日爽天天| 精品国产亚洲一区二区三区| 欧美激情一区二区三区中文字幕| 国产福利免费观看| 国产伦理精品| 一级毛片看真人在线视频| 国产麻豆精品高清在线播放| 欧美另类videosbestsex视频| 麻豆系列 在线视频| 韩国三级视频在线观看| 亚洲 国产精品 日韩| 香蕉视频久久| 高清一级做a爱过程不卡视频| 国产麻豆精品视频| 黄色免费三级| 久久久久久久免费视频| 毛片高清| 国产一区二区精品在线观看| 国产91素人搭讪系列天堂| 欧美a级片免费看| 色综合久久天天综合绕观看| 99久久精品国产免费| 久久精品道一区二区三区| a级毛片免费全部播放| 日韩女人做爰大片| 日韩av东京社区男人的天堂| 久久国产精品自由自在| 欧美激情伊人| 香蕉视频久久| 色综合久久天天综线观看| 日韩女人做爰大片| 你懂的日韩| 精品国产亚洲一区二区三区| 好男人天堂网 久久精品国产这里是免费 国产精品成人一区二区 男人天堂网2021 男人的天堂在线观看 丁香六月综合激情 | 一级女性全黄生活片免费| 久久国产精品永久免费网站| 免费毛片基地| 成人av在线播放| 欧美夜夜骑 青草视频在线观看完整版 久久精品99无色码中文字幕 欧美日韩一区二区在线观看视频 欧美中文字幕在线视频 www.99精品 香蕉视频久久 | 欧美另类videosbestsex高清 | 青青久久国产成人免费网站| 国产网站免费观看| 日本伦理片网站| 国产一区二区精品| 欧美国产日韩一区二区三区| 九九久久国产精品| 国产视频一区二区在线播放| 麻豆污视频| 国产一区免费在线观看| 99久久网站| 精品久久久久久中文字幕2017| 国产一级强片在线观看| 精品视频在线观看视频免费视频| 美女被草网站| 中文字幕一区二区三区精彩视频| 欧美日本二区| 日本在线www| 久久福利影视| 成人高清视频在线观看| 日日日夜夜操| 一级毛片看真人在线视频| 成人高清视频免费观看| 日日日夜夜操| 精品国产三级a| 国产不卡高清| 午夜家庭影院| 高清一级毛片一本到免费观看| 国产国产人免费视频成69堂| 国产麻豆精品视频| 你懂的日韩| 国产不卡高清| 成人高清视频免费观看| 高清一级做a爱过程不卡视频| 九九精品影院| a级毛片免费全部播放| 国产91精品一区二区| 精品久久久久久中文| 午夜在线亚洲男人午在线| 日韩男人天堂| 99久久精品国产免费| 精品国产一区二区三区精东影业 | 国产不卡在线观看| 日韩字幕在线| 成人免费一级毛片在线播放视频| 午夜欧美成人香蕉剧场| 久久久久久久免费视频| 天天色色色| 亚洲第一色在线| 香蕉视频久久| 久久精品成人一区二区三区| 国产91精品一区二区| 欧美大片a一级毛片视频| 韩国三级香港三级日本三级| 精品国产一级毛片| 亚洲天堂在线播放| 亚洲 激情| 麻豆网站在线看| 美女免费毛片| 国产一区二区精品尤物| 精品久久久久久中文字幕一区| 好男人天堂网 久久精品国产这里是免费 国产精品成人一区二区 男人天堂网2021 男人的天堂在线观看 丁香六月综合激情 | 国产91精品一区| 青青久久国产成人免费网站| 精品国产香蕉伊思人在线又爽又黄| 成人影视在线观看| 国产国产人免费视频成69堂| 亚欧乱色一区二区三区| 国产国产人免费视频成69堂| 日韩男人天堂| 亚洲 欧美 成人日韩| 91麻豆爱豆果冻天美星空| 国产成人啪精品| 日韩av片免费播放| 国产国语在线播放视频| 国产a毛片| 亚洲精品中文字幕久久久久久| 国产a一级| 美女免费毛片| 欧美夜夜骑 青草视频在线观看完整版 久久精品99无色码中文字幕 欧美日韩一区二区在线观看视频 欧美中文字幕在线视频 www.99精品 香蕉视频久久 | 久久国产一区二区| 日本久久久久久久 97久久精品一区二区三区 狠狠色噜噜狠狠狠狠97 日日干综合 五月天婷婷在线观看高清 九色福利视频 | 欧美夜夜骑 青草视频在线观看完整版 久久精品99无色码中文字幕 欧美日韩一区二区在线观看视频 欧美中文字幕在线视频 www.99精品 香蕉视频久久 | 欧美日本二区| 国产91素人搭讪系列天堂| 亚洲www美色| 国产伦久视频免费观看 视频| 精品视频免费在线| 国产不卡福利| 久久久成人影院| 精品在线免费播放| 日韩欧美一二三区| 九九精品久久| 久久国产影院| 午夜久久网| 精品在线观看一区| a级黄色毛片免费播放视频| 天天色成人网| 一级女性全黄生活片免费| 天堂网中文在线| 国产精品1024永久免费视频| 国产视频久久久| 日韩在线观看免费完整版视频| 麻豆午夜视频| 日韩av片免费播放| 欧美激情一区二区三区在线| 欧美激情一区二区三区视频高清 | 日本免费乱理伦片在线观看2018| 免费的黄色小视频| 日韩女人做爰大片| 成人免费福利片在线观看| 高清一级毛片一本到免费观看| 久久精品欧美一区二区| 韩国三级香港三级日本三级| 美女免费毛片| 999精品影视在线观看| 亚洲女初尝黑人巨高清在线观看| 麻豆网站在线看| 国产一区二区精品久久| 精品国产一区二区三区久久久狼| 精品国产香蕉伊思人在线又爽又黄| 天天做日日干| 国产一区免费在线观看| 欧美a免费| 超级乱淫伦动漫| 亚欧乱色一区二区三区| 欧美激情一区二区三区视频高清 | 亚欧成人乱码一区二区| 色综合久久天天综合绕观看| 国产成+人+综合+亚洲不卡| 国产网站免费观看| 久久国产影院|