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精品综合久久久久久五月天_国产精品一区电影_中文字幕欧美日韩一区二区_亚洲一区二区三区精品动漫
欧美成年人在线观看| 痴汉一区二区三区| 国产成人精品视频ⅴa片软件竹菊| 国产色一区二区三区| 国内精品一区二区| 国内精品久久久久久久久| 男人天堂手机在线视频| 欧美激情第一页在线观看| 欧美精品亚洲精品| 蜜臀av性久久久久蜜臀av| 国语自产精品视频在线看一大j8| 日本天堂免费a| 日韩av免费电影| 日韩欧美一区二区视频在线播放 | 国产精品自拍合集| 国产伦一区二区三区色一情| 草莓视频一区| 81精品国产乱码久久久久久| 91久久久亚洲精品| 国产成人综合精品| 久久久精品久久| 精品国产乱码久久久久久久软件| 一区二区三区国| 亚洲成色www久久网站| 日本久久久久久| 欧美亚洲国产另类| 国产乱人伦真实精品视频| 成人国产精品一区二区| 91av中文字幕| 久热99视频在线观看| 精品国产乱码久久久久软件| 亚洲成色www久久网站| 欧洲在线视频一区| 国产视频一区二区三区四区| 99在线高清视频在线播放| 久久婷婷开心| 久久中文字幕国产| 电影午夜精品一区二区三区| 欧洲精品码一区二区三区免费看| 国产一区在线免费| 久久这里只有精品18| 国产精品久久久久aaaa九色| 午夜精品美女自拍福到在线| 欧美久久久久久一卡四| 成人av在线播放观看| 国产成人精品综合| 欧美激情精品久久久久久变态| 日韩av在线一区二区三区| 国产欧美精品xxxx另类| 久久久久网址| 亚洲一区二区在线看| 欧美日韩一区综合| 91久久久久久久久久久久久| 久久久精品久久久久| 亚洲精品国产精品久久| 精品一区二区成人免费视频| 久久综合九色欧美狠狠| 欧美激情综合亚洲一二区| 欧美一区观看| 国产激情视频一区| 久久久久久av| 欧美精品欧美精品系列c| 91精品视频免费观看| 免费97视频在线精品国自产拍| 日本黄网站免费| 97久久久免费福利网址| 不卡av在线网站| 欧美精品无码一区二区三区| 国产精品av网站| 亚洲一区二区三区在线免费观看 | 国产精品视频免费在线观看 | 亚洲图片在线观看| 国内精品二区| 久久久极品av| 日本a级片电影一区二区| 88国产精品欧美一区二区三区| 色综合久久88色综合天天看泰| 男人舔女人下面高潮视频| 久久久综合亚洲91久久98| 一区二区三区视频| 国产欧美日韩亚洲精品| 久久香蕉国产线看观看网| 欧美日韩天天操| 久久精品国产亚洲| 欧美日本国产精品| 国产精品视频区| 男人天堂成人网| 国产精品久久久久免费a∨| 男人亚洲天堂网| 国产精品欧美在线| 蜜桃成人免费视频| 国产精品高潮视频| 国产欧美久久一区二区| 欧美成人久久久| 国产免费一区| 亚洲在线视频观看| 久久这里只有精品18| 日本不卡久久| 久久精品国亚洲| 精品一区二区三区毛片| 久久综合88中文色鬼| 国产日韩一区二区在线观看| 欧美日韩成人精品| 粉嫩av四季av绯色av第一区| 亚洲最大av网站| 久久综合福利| 欧美亚洲视频在线观看| 国产精品无码人妻一区二区在线 | 男女视频网站在线观看| 国产精品天天av精麻传媒| 欧美日韩激情视频在线观看| 久久久国产一区二区| 国产综合在线观看视频| 欧美成人四级hd版| 91免费视频网站在线观看| 日本最新高清不卡中文字幕| 久久超碰亚洲| 欧美亚洲第一页| 精品国产一区二区三区四区精华| 国产欧美一区二区在线播放| 亚洲欧美日韩精品久久久| 久久草.com| 国产一区二区三区免费不卡| 亚洲一区三区电影在线观看| 久久久噜噜噜久久| 免费国产a级片| 亚洲精品在线观看免费| 久久久久久久久电影| 国产一区二区片| 亚洲国产日韩美| 国产精品日韩欧美一区二区三区 | 精品午夜一区二区| 亚洲精品欧美极品| 久久精品亚洲94久久精品| 国产精自产拍久久久久久蜜| 日韩尤物视频| 久久亚洲精品一区二区| 91久久国产自产拍夜夜嗨 | 久久久久久久久久久久久国产 | 国产日韩在线播放| 日本精品一区二区三区高清 久久 日本精品一区二区三区视频 | 91国产在线播放| 免费高清在线观看免费| 一本久道中文无码字幕av| 精品国产自在精品国产浪潮| 国产亚洲情侣一区二区无| 丁香六月激情婷婷| 国产精品久久久久久久久久久新郎 | 国产精品美女在线| 国产精品91视频| 国产特级淫片高清视频| 日本中文字幕在线视频观看| 欧美日韩国产成人在线观看| 丝袜一区二区三区| 99高清视频有精品视频| 欧美精品一区二区三区三州| 午夜午夜精品一区二区三区文| 国产精品露出视频| 久久免费视频网| 国产精品自拍小视频| 麻豆精品传媒视频| 欧美亚洲一级片| 日韩av一二三四区| 五月天色婷婷综合| 又粗又黑又大的吊av| 国产精品成人aaaaa网站| 丝袜美腿精品国产二区| 国产高清精品在线观看| 成人h在线播放| 国产欧美精品在线| 蜜桃传媒一区二区三区| 欧美a在线视频| 青青草国产精品视频| 亚洲欧美日韩精品在线| 欧美激情中文字幕在线| 欧美巨猛xxxx猛交黑人97人| 国产精品入口尤物| 久久久999国产| 日韩中文字幕免费视频| 日韩中文在线中文网三级| 久久精品在线免费视频 | 成人精品久久av网站| 国产精品自产拍在线观看中文| 国产日韩精品在线观看| 免费一区二区三区| 国内精品伊人久久| 免费在线精品视频| 欧美在线视频一区二区| 欧美亚洲丝袜| 激情视频在线观看一区二区三区| 欧美中日韩一区二区三区| 日韩精品手机在线观看| 日韩精品另类天天更新| 奇米888一区二区三区| 日韩精品最新在线观看| 欧洲午夜精品久久久| 欧美精品一区二区三区在线看午夜| 欧美成ee人免费视频| 黄频视频在线观看| 国产深夜精品福利|