In recent years, industrial measurement and control system from the traditional focus on measurement and control systems to networked distributed control systems.
With the rapid development of fieldbus technology and standardization degree unceasing enhancement, the to field bus-based open distributed measurement and control system has been widely used. Bus is a controller area network (controller area network, CAN) belong to the field bus, is a valid support for distributed control of serial communication network, you can hook in the fieldbus as a network node for smart devices connected to the network system, and further components distributed measurement and control systems. CAN smart nodes are in the sensor and actuator are located on-site, in distributed control systems play a role in connecting. On the one hand, it must communicate with the host computer to complete the data exchange; on the other hand, it according to the needs of the system to complete the measurement and control functions. Therefore, CAN the design of intelligent node in industrial distribution and control system has a very important role. This article will present an ARM9 processor AT91RM9200 and CAN controller MCP25lO built CAN intelligent node design, and describes the hardware and software design and debugging methods.1 hardware design
CAN the design of intelligent node involves two aspects: the need to implement functionality; how CAN communication.
So this article is based on the AT91RM9200 and MCP2510 CAN intelligent node design frame as shown in Figure 1. In this first describes the characteristics of the main chip, and then note the design principle of intelligent node.1.1 chip characteristics
Atmel AT91RM9200 is produced by an ARM9 processor, it is completely built around ARM920T ARM Thumb processors to build the system.
It has a wealth of system and application peripherals and standard interfaces, allowing for low power, low cost, high-performance computer application provides a wide range of single-chip solution.MCP2510 is a United States chipscreen technology co., Ltd. (MicrochipTechnology Inc.) production of a SPI interface CAN Protocol controller, fully supports CAN-bus specification V2.0A/B; the ability to send and receive standard and extended message, communication rate of up to 1 Mb/s with acceptance packet filtering, and management capabilities; through SPI interface to communicate with the MCU, maximum data transfer rate of up to 5 Mb/s; contains three send buffer and 2 receive buffer, also has flexible interrupt management capabilities.
All these features make the MCU on the CAN bus operation easy. Philips PCA82C250 is a semiconductor company production of a paragraph CAN transceiver, is CAN Protocol controllers and physical interfaces between the transmission line. It can be used up to l Mb/s bit rate in 2 have differential voltage of bus cable for data transmission.1.2 design principle
This article CAN intelligent node requires the implementation of the function are collectively referred to as function modules.
Because AT91RM9200 Processor has a wealth of system and application peripherals and standard interfaces, according to the needs of the application can easily be extended to achieve functional modules. This article focuses on how to achieve the AT91RM9200 Processor CAN bus extension.AT91RM9200 Processor provides four SPI interface.
Including MOSI (host output from the machine input), MISO (host input output from the machine), SPCK (serial clock) 3 pin signal from four common SPI interface; and 4 tablets selected signal NPCSO, NPCSl, NPCS2, NPCS3 is used to separately gated four SPI interface. But the CAN controllers MCP2510 SPI interface pin definitions: SI (data input), SO (data export), SCK (clock inputs), CS (piece selected input). The design is AT91RM9200 second SPI interface and are connected to the SPI interface MCP2510 (MOSI ← → ← → MIS0 SI, SO, SPCK ← → ← → NPCSl SCK, CS), thus establishing a communication bridge between them. At the same time MCP2510 chip interrupt output pin INT and AT91RM9200 chip interrupt input pin is connected to the IRQ5, reducing MCP2510 chip produced by interrupt (including sending, receiving, packet errors, bus activities such as interrupt wake-up call, error) event notification AT91RM9200 Processor to make the appropriate treatment.CAN controller MCP2510 can send through the serial data (TXCAN) pin and the serial data receiver pins (RXCAN) directly connected to the CAN transceiver PCA82C250.
The design in order to achieve MC-P2510 and electricity isolation between PCA82C250, placed between them two optical coupling. However, in the agreement between the controller and transceivers, often using optical coupling increases bus nodes of cyclic delay. Optocoupler 6N137 propagation delay of typical 60 ns, more suitable for transmission rate is less than or equal to 125 Kb/s for low speed applications; in transfer rate in 125 Kb/s to 1 Mb/s for high speed applications, consider using 40 ns ★ short delay transmission of high speed optical coupling, such as HCPL-7101.[1] [2] [3]
No comments:
Post a Comment