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精品综合久久久久久五月天_国产精品一区电影_中文字幕欧美日韩一区二区_亚洲一区二区三区精品动漫
日产中文字幕在线精品一区| 亚洲国产精品女人| 久久躁狠狠躁夜夜爽| 日韩美女免费视频| 久久偷窥视频| 国产精品久久一区| 欧美诱惑福利视频| 久久精品99久久| 日本在线视频www色| www.国产二区| 欧美极品第一页| 国产日韩欧美黄色| 国产精品成人av性教育| 黄色录像特级片| www亚洲精品| 日韩欧美在线播放视频| 国产va亚洲va在线va| 天天夜碰日日摸日日澡性色av| 成人毛片一区二区| 亚洲一区精品电影| www.com毛片| 欧美激情中文字幕乱码免费| 免费看a级黄色片| 国产精品久久999| 国内精品二区| 欧美精品午夜视频| 国产美女精品在线观看| 在线视频亚洲自拍| 97国产一区二区精品久久呦| 午夜精品久久久久久久男人的天堂| 91久久久久久| 日本亚洲欧洲色α| 久久久久久久久影视| 欧美精品一区二区三区四区五区| 国产精品视频区1| 欧美福利一区二区三区| 国产精品高清在线| 国产美女在线一区| 午夜精品www| 日韩亚洲第一页| 免费国产成人看片在线| 精品国产乱码久久久久软件| av久久久久久| 日韩精品久久一区| 国产成人精品一区二区在线| 麻豆精品蜜桃一区二区三区| 欧美激情a在线| 91高清免费视频| 人妻少妇精品久久| 国产精品高潮在线| 国产日韩一区二区在线| 一区二区三区av| 久久乐国产精品| 欧美在线视频导航| 国产精品久久久久久久app| 国产人妻人伦精品| 亚洲国产精品一区二区第四页av| 国产a级片网站| 黄色a级片免费看| 亚洲色婷婷久久精品av蜜桃| 色噜噜狠狠色综合网图区| 精品少妇人欧美激情在线观看| 亚洲视频电影| 国产精品久久一| 国产精品99久久久久久白浆小说| 欧美中文娱乐网| 久久久久久12| 久久精品99久久久久久久久| 浮妇高潮喷白浆视频| 欧洲精品码一区二区三区免费看| 精品国产一区二区三区麻豆免费观看完整版 | 久久久久久久久久码影片| 韩国精品一区二区三区六区色诱| 一本色道久久88亚洲精品综合 | 国产在线一区二区三区四区| 亚洲一区三区电影在线观看| 久久久久久久国产精品| 国产精品一区=区| 欧美成人一区二区在线观看| 亚洲高清资源综合久久精品| 国产精品久久综合av爱欲tv| 国产精品 日韩| 国产欧美一区二区三区不卡高清| 日韩av在线第一页| 在线视频欧美一区| 国产精品旅馆在线| 久久久久久欧美精品色一二三四| www.欧美黄色| 国产一区在线观| 日韩欧美在线观看强乱免费| 中文字幕一区二区三区在线乱码| 久久久久久久香蕉| 91九色在线观看视频| 国产一级做a爰片久久毛片男| 青青青青草视频| 色一情一乱一伦一区二区三区| 欧美日韩国产二区| 国产精品福利视频| 久久手机免费视频| 久久精品国产一区二区三区不卡| 成人综合视频在线| 国产欧美在线一区二区| 好吊色欧美一区二区三区视频 | 精品国产美女在线| 成人欧美一区二区| 欧美高清性xxxxhdvideosex| 日韩免费电影一区二区三区| 午夜精品久久久久久久久久久久| 久久久久久12| 精品国产免费人成电影在线观...| 国产精品女主播视频| 日韩少妇与小伙激情| 久艹视频在线免费观看| 久久美女福利视频| 久久久视频在线| 91精品久久久久| 91九色国产视频| 91精品国自产在线观看| 91久久久国产精品| 国产精品小说在线| 国产精品自拍网| 国产精品亚洲不卡a| 成人精品视频久久久久| 国产精品小说在线| 91免费看片在线| 91精品国产91久久久久久不卡| 97免费视频观看| 97国产精品人人爽人人做| 99久久久精品免费观看国产| 99久久久精品视频| 97热精品视频官网| 91av网站在线播放| 国产成人综合精品| 九色在线视频观看| 国产不卡在线观看| 色偷偷噜噜噜亚洲男人| 久久精品国产久精国产一老狼| 久久精品国产视频| 国产精品久久久对白| 美女999久久久精品视频| 欧美精品成人在线| 午夜探花在线观看| 欧美专区国产专区| 国精产品一区一区三区视频| 国产免费一区二区视频| 不卡视频一区| 久久精品午夜福利| xvideos亚洲| 美女福利视频一区| 一区二区三区四区视频在线| 亚洲精品国产suv一区88| 日本www在线视频| 免费不卡亚洲欧美| 成人久久久久久| 久久国产精品一区二区三区四区| 国产精品无av码在线观看| 色综合久久精品亚洲国产 | 国产一区一区三区| 91久久精品美女高潮| 久久久久免费精品| 欧美成人在线免费| 亚洲精品久久区二区三区蜜桃臀 | 久久久久久香蕉| 国产精品久久久久久久久| 自拍另类欧美| 欧洲精品在线视频| 国产日韩中文在线| 国产成人一区三区| 久久艳片www.17c.com| 亚洲资源视频| 日本精品福利视频| 国产热re99久久6国产精品| 久无码久无码av无码| 久久精品国产96久久久香蕉| 欧美激情xxxxx| 日韩极品视频在线观看| 国产视频999| 久久久久久亚洲精品不卡| 欧美激情二区三区| 欧美在线视频网站| 97久久精品在线| 国产精品免费一区二区三区四区 | av无码精品一区二区三区| 色妞一区二区三区| 一卡二卡3卡四卡高清精品视频| 欧洲成人在线视频| 99www免费人成精品| 国产精品黄色av| 日本不卡一区二区三区四区| 国产亚洲精品自在久久| 久久精品女人的天堂av| 欧美精品www| 黄色a级片免费| 91精品国产91久久久久久最新| 国产精品国产精品| 欧美在线一二三区| 久无码久无码av无码| 在线视频精品一区| 国产在线一区二| 久久久国产精品x99av|