| CAN bus has been acknowledged as one of the most promising fieldbus. With industrial PC as the core, the distributed measurement and control system based on CAN bus gets widely applied. Nowadays, PCI is the mainstream bus structure of the computer and it is used as an interconnect interface between peripheral components and processor. So, PCI-CAN bridge is an important access to realize the high-speed communication between PC and CAN.This paper studied PCI and CAN bus protocols, and described the design idea and realization method of hardware&software of the PCI-CAN bus interface card and the driver&application programs for the embedded system-Windows CE.NET based on the goals and requirements of system. The main work and achievement are summed up as follows:(1)The characteristics of PCI and CAN bus are introduced and major technologies of their protocols are expounded.(2)The hardware and software design of the PCI-CAN bus interface card is introduced. Hardware design mainly comprises of PCI interface circuit, CAN interface circuit and communication controlling circuit. Among them, PCI interface circuit is the key part. In this part, the connection between PCI and local bus and the implement of PCI configuration space are clearly explained. In the design of software, procedural flows of main functional modules such as initialization, data receipt and transmission are particularly described.(3) The host application system based on Windows CE.NET is established. According to different resources of hardware and requirement of application, functional modules in Windows CE.NET are tailored, customized to design the development platform. In design of the CAN adapter's stream interface driver, process of interrupt disposal in Windows CE.NET is analyzed and the driver structure is researched. According to the requirement of CNC system, the application layer protocol of CAN is established.Test results show that the communication between the card and the host is stability, real-time and high reliability. And the capability has achieved the expected design demands. This thesis and its content related with research has important referring value in the application of CAN field control system. |