CN2779738Y - A CAN bus intelligent adapting card - Google Patents

A CAN bus intelligent adapting card Download PDF

Info

Publication number
CN2779738Y
CN2779738Y CN 200520002154 CN200520002154U CN2779738Y CN 2779738 Y CN2779738 Y CN 2779738Y CN 200520002154 CN200520002154 CN 200520002154 CN 200520002154 U CN200520002154 U CN 200520002154U CN 2779738 Y CN2779738 Y CN 2779738Y
Authority
CN
China
Prior art keywords
bus
chip
data
interface
transceiver
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN 200520002154
Other languages
Chinese (zh)
Inventor
李民赞
杨玮
刘卉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Agricultural University
Original Assignee
China Agricultural University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Agricultural University filed Critical China Agricultural University
Priority to CN 200520002154 priority Critical patent/CN2779738Y/en
Application granted granted Critical
Publication of CN2779738Y publication Critical patent/CN2779738Y/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Communication Control (AREA)

Abstract

The utility model relates to a controller area network (English short name: CAN) bus intelligent adapting card based on a PC104 system, which aims to provide a CAN bus intelligent adapting card with high data transmission rate, high compatibility, simple interface and high work efficiency. The adapting card comprises a CAN bus interface, a CAN bus transceiver electrically connected with a collection equipment interface, a CAN bus controller electrically connected with a CAN bus transceiver, a PC104 bus slot, a high speed light couple, a microprocessor and a parallel interface circuit. The adapting card uses the microprocessor to make a host machine of the PC104 system get rid of the status control and the maintenance work of the CAN bus, but merely receives and sends the data, therefore the system resource is saved. The adapting card uses the parallel communication mode, which enhances the data transmission rate.

Description

A kind of Controller Area Network BUS intelligent adapter
Technical field
The utility model relates to a kind of controller local area network (Controller Area Network is called for short CAN) bus adapter, particularly relates to a kind of CAN bus intelligent adapter based on the PC104 system.
Background technology
The CAN bus is a kind of many main frames telecommunication network Communication Control mode.Because its high reliability, unique design flexible and cheap price, be widely applied in the automation control system, particularly enormous function is being brought into play in the data communication aspect between underlying device such as intelligent instrumentation at the scene, controller, actuator.For example, the total line traffic control of CAN successfully is applied to the wide field of agriculture control system such as Non-Electricity Measurement, environment measuring such as agricultural greenhouse control system, grain storage moisture control system, animal house surveillance, temperature, pressure.
The PC104 system is a kind of novel embedded PC standard, and this PC has two bus plug: P1 and P2, and wherein P1 has 64 pin, and P2 has 40 pin, totally 104 pin.It can require harsh occasion to realize the function of ordinary PC fully at volume and power consumption, and the while is almost completely compatible with standard desktop PC architecture on software and hardware.This PC104 system has size, and little (standard size is 90mm * pile 96mm), certainly bus structures (having cancelled negative and slot) and the little characteristics of bus driver electric current, therefore is fit to be applied to high density, small size, portable measuring and controlling equipment.
In conjunction with the advantage of PC104 system and CAN bus, people design the CAN bus adapter based on the PC104 system.The non intelligent CAN interface card of PC104-CAN single channel that Guangzhou Zhou Ligong single-chip microcomputer Development Co., Ltd produces is to use system memory address mapping space mode to control integrated circuit board.Because the partial memory address space of PC104 mainboard may be by mainboard or other hold facilities, thereby can not guarantee to obtain enough system memory resources and use for the hardware interface card, therefore the non intelligent CAN interface card of PC104-CAN single channel can not normally use on part computer (comprising employed operating system), and hardware integrated circuit board and driver thereof can not guarantee compatible different fully computers.And this PC104-CAN interface card employing serial communication mode, message transmission rate is lower.Because the CAN bus is used for field bus control system more, requires message transmission rate than higher.Therefore, the CAN bus adapter that just needs a kind of efficient work, saving system resource.
Summary of the invention
The purpose of this utility model provides a kind of message transmission rate height based on the PC104 bus, compatibility is strong, interface is simple, the CAN bus intelligent adapter of efficient work.It is core with the PC104 embedded computer system that this adapter can be used for the overall system framework, cooperates in the multi-path data acquiring system based on the CAN bus, finishes collection, processing, the reliable transmission of information.
In order to achieve the above object, the utility model adopts following technical scheme:
This adapter comprises:
One CAN bus interface is used to connect the CAN network;
The one CAN bus transceiver that is electrically connected with the collecting device interface is used for receiving and sending the data of CAN bus network;
The one CAN bus control unit that is electrically connected with the CAN bus transceiver is passed to the CAN transceiver after being used for data are handled, and is received, handles data and output from the CAN bus transceiver;
One PC104 bus slot is used to connect the mainboard of PC104 system;
One microprocessor that is electrically connected with the CAN bus control unit is used for State Control and maintenance to the CAN bus.
This adapter also comprises: a parallel interface that is connected with microprocessor and an addressing circuit, and, be used to adopt the parallel communications mode to transmit data; Described parallel interface is electrically connected with described PC104 bus slot; Described addressing circuit is made up of minimum two and a comparator of PC104 bus address, is used for the read-write operation control to parallel interface.
This adapter also comprises: be connected at least two high speed photo couplings between CAN bus transceiver and the CAN bus control unit, be used for photoelectricity and isolate the antijamming capability of enhanced system.
This adapter also comprises: the power module of described high speed photo coupling.
The beneficial effects of the utility model are:
1. compatible strong.Adapter does not take the mainboard memory address space with being connected of PC104 bus, and it only takies needs the I/O port address of 4 free time to get final product, thereby can not occur obtaining the problem that enough system resource is used for the hardware interface card.
2. message transmission rate height.This adapter adopts the parallel communications mode to solve the low shortcoming that can not satisfy system to the real-time requirement of data communication of serial line interface transmission rate.
3. intelligent.Utilize the single-chip microcomputer of low-power consumption to finish the transmitting-receiving of CAN packet intelligently on the integrated circuit board, so not only can reduce the volume and the power consumption of module, and make that module interface is simple, efficient work, thereby make the PC104 main frame break away from State Control and maintenance work to the CAN bus, receiving, send data by all means gets final product, all maintenance works are finished by single-chip microcomputer, can make the PC104 main frame have more cpu resource to carry out complicated control algolithm and more man-machine exchange work like this.
Description of drawings
Fig. 1 PC104-CAN bus intelligent adapter system block diagram;
The fundamental diagram of Fig. 2 the utility model specific embodiment;
The schematic diagram of the CAN controller part of Fig. 3 the utility model specific embodiment;
The governor circuit block diagram of Fig. 4 the utility model specific embodiment.
Embodiment
Below in conjunction with the drawings and specific embodiments the utility model is described in further detail.
As shown in Figure 1, this adapter comprises:
The CAN bus interface is used to connect the CAN network;
The CAN bus transceiver that is electrically connected with the collecting device interface adopts the 82C250 chip, is used for receiving and sending the data of CAN bus network;
The CAN bus control unit that is electrically connected with CAN bus transceiver 82C250 chip, adopt the SJA1000 chip of Philips company, and be aided with the PCA82C250 of the said firm chip for receiving and dispatching interface driver, pass to the CAN transceiver after the data processing that is used for microprocessor is sent, and receive, handle from the data of transceiver and pass to microprocessor;
The microprocessor that is electrically connected with CAN bus control unit SJA1000 chip adopts single-chip microcomputer 80C51 chip, is used for State Control and maintenance to the CAN bus;
The parallel interface that is electrically connected with microprocessor 80C51 chip adopts the 8255A chip, is used to adopt the parallel communications mode to transmit data;
With the PC104 bus slot that parallel interface 8255A chip is electrically connected, be used to connect the mainboard of PC104 system;
The addressing circuit that is connected with parallel interface with microprocessor is made up of minimum two SA0, SA1 and the 8 bit comparator 74LS688 of PC104 bus address, is used for the read-write operation control to parallel interface 8255A chip.
Also comprise at least two optocouplers that are connected between CAN bus transceiver 82C250 chip and the CAN bus control unit SJA1000 chip, adopt the 6N137 chip, be used for photoelectricity and isolate the reliability that enhanced system is used in adverse circumstances;
Also comprise to the optocoupler power module of two optocoupler power supplies, adopt the B05058 chip.
Below each part is specifically introduced:
1) hardware interface of adapter and PC104 bus: on address choice, the PC104 bus has the ability of 64K I/O port of visit, but reality has only been used 1K port address (0000H-03FFH), wherein preceding 256 bytes (0000H-00FFH) are distributed to the I/O interface chip on the PC104 system board, and remaining 768 byte (0100H-03FFH) is distributed to expansion board.And, only needing 4 I/O port addresss to satisfy the demand for the 8255A chip, they are used separately as the transfer of data of port A, port B and port C and the operation of mode being selected control word.As shown in Figure 2, A0 mouth and A1 mouth that minimum two SA0 of PC104 bus address and SA1 can be connected to the 8255A chip respectively, because 8255A has only four registers, so only need use A0, two address wires of A1 are selected, the high address is just by being used for the chip selection signal of gating 8255A behind the comparator, so so long as mainboard useless to I/O address can use.The I/O port address allocation table of inquiry PC104, the utility model is selected the I/O port operation of address space 280H-283H to 8255A for use.When the address signal of sending on the PC104 bus is one of 280H-283H, address comparator send gating signal to the 8255A chip as its chip selection signal, PC104 can carry out corresponding read-write operation to the 8255A chip.
2) realization of parallel communications mode: as shown in Figure 2, adopt programmable parallel interface 8255A chip to solve transmission means and speed problem.The main effect of 8255A chip is to adopt parallel communications mode and PC104 bus directly to carry out the read-write of I/O mouth.Because the CAN bus is used for field bus control system more, require message transmission rate than higher, high energy reaches 1MbPs, and the message transmission rate of serial communication mode is lower, the highlyest in its standard baud rate series also can only reach 19200bPs.Therefore serial line interface will become the bottleneck that transmits data, can not satisfy the real-time requirement of system to data communication.Based on above-mentioned consideration, this adapter adopts the parallel communications mode.The 8255A chip has 3 kinds of basic working methods, selects mode 2 here for use, i.e. the transmitted in both directions mode.Bidirectional mode only is applicable to port A (PA mouth).The PA mouth is electrically connected at the P1 mouth with single-chip microcomputer 80C51 chip, so that transmit data between 8255A chip and single-chip microcomputer 80C51 chip.The port C of 8255A chip then cooperates port A that control signal corresponding is provided automatically, to cooperate the read-write operation of single-chip microcomputer 80C51 chip to the 8255A chip.Selected control signal such as Fig. 2 show, the data/address bus of 8255A chip (DBUS) links to each other with the data wire of PC104 bus, 8 bit data bus at 2 times 8255A chips of mode both can send data on the PC104 bus, also can receive data from the PC104 bus.When the PC104 system is confidential when transmitting data for single-chip microcomputer 80C51 chip, on the PC104 bus, be the port of 282H at first by the softward interview address, this moment, program was pointed to the state mouth of 8255A, read everybody state of 8255A chip port C, judge wherein whether the IBF position is effective, promptly whether have data not take away as yet in the input latch of 8255A chip.If effectively, then postpone operation; Otherwise be that the port of 282H writes data to the address then, data sent to the port A of 8255A chip by software.This moment output buffer full, the 8255A chip is sent the INTO pin of OBF signal to single-chip microcomputer 80C51 chip, notice single-chip microcomputer 80C51 chip is taken data away.Have no progeny in the single-chip microcomputer 80C51 die response, send ack signal and give the 8255A chip, the output buffer of 8255A chip is opened, send data.Single-chip microcomputer 80C51 chip can transmit the data of being read by CAN bus control unit SJA1000 chip and transceiver 82C250 chip then.When data will be transferred to PC104 system machine, single-chip microcomputer 80C51 chip receives data from CAN bus control unit SJA1000 chip and transceiver 82C250 chip, and whether the IBF that judges the 8255A chip is that effectively promptly whether the input latch of 8255A chip is full.If full, then single-chip microcomputer 80C51 chip calls delay procedure delay operation; Otherwise then data are sent to the port A of 8255A chip, send the STB gating signal simultaneously, data are sent into the input latch of 8255A chip.PC104 system machine is then inquired about the state of IBF control end among the 8255A chip port C.When IBF becomes when effective, the expression data with existing arrives, and PC104 system machine changes the read-write operation to I/O port 280H over to, the data in the 8255A chip input latch is taken away, and put into application program and handle.
3) CAN controller part: this part is made up of CAN controller SJA1000 chip and CAN transceiver 82C250 chip and two high speed photo coupling 6N137 chips at least, as shown in Figure 3.Single-chip microcomputer 80C51 chip is responsible for the data that the PC104 bus is brought are sent to the CAN controller, and via CAN controller, optocoupler and CAN transceiver data is mail to the CAN bus.In order to increase system's antijamming capability, between SJA1000 chip and CAN bus transceiver 82C250, used 2 high speed optoelectronic isolating device 6N137 chips to isolate, isolated part is powered by DC/DC.Single-chip microcomputer 80C51 programming is the key of the intelligent work of whole module, single-chip microcomputer 80C51 be responsible for and 8255A chip and CAN controller SJA1000 chip between communicate.Intelligentized purpose is to make the PC104 main frame break away from State Control and maintenance work to the CAN bus, receives, sends data by all means and get final product, and all maintenance works are finished by single-chip microcomputer.Can make main frame have more cpu resource to carry out complicated control algolithm and more man-machine exchange work like this,
4) address card device drives VxD and upper PC104 embedded computer system Module Design: the application program interface function that mainly comprises PC104 system machine end, be responsible for finishing communicating by letter between PC104 system machine end and the 8255A, can use visual programming tool, write as Visual Basic6.0.PC104 system machine end software mainly comprises 8255A transmitting control commands, data command and the request msg order on adapter, also the data that receive is carried out reprocessing, in full according to the show.Under Windows98, must visit bottom hardware by writing the virtual device driver VxD (Virtual device driver) that operates under the kernel mode (ring-0 level), realize hardware interrupts, DMA, I/O or absolute memory access etc.Each hardware device all has corresponding virtual device driver vxD.The hardware circuit design principle of this intelligent adapter requires the CPU of host computer PC 104 and the data information exchange between the adapter, expansion I/O port by the PC104 main frame, adopt the mode of inquiry to carry out, promptly inquire about the running status of adapter earlier, carry out the transmission of data information exchange and command information again.Use for the convenience of the users, above-mentioned calling of VxD service is packaged into DLL, make VxD transparent the user.DLL provides permission port controlling function for the user, close port control function and read port function, and the write port function makes that configuration and integrated application are very convenient.The function of using in this example has four, is respectively described below:
1. Initialize (): allow the port controlling function.Called once before using the port input-output function, successfully return " 1 ", " 0 " is returned in failure.
2. Shutdown (): close port control function.Carry out once when quitting a program, successfully return " 1 ", " 0 " is returned in failure.
3. GetPortVal (ByVal PortAddr As Integer, ByRef Portval As Long, ByValbSize As Byte) As Boolean: read port function, PortAddr are port address, Portval is a port value, the byte number of bSize for reading.Return " 1 " when reading successfully, return " 0 " during failure.
4. SetPortVal (ByVal PortAddr As Integer, ByVal Portval As Long, ByValbSize As Byte) As Boolean: write port function.PortAddr is a port address, the value of Portval for writing, the byte number of bSize for writing.Write success and return " 1 ", " 0 " is returned in failure.Only need when in application program, using .dll and .vxd document copying under working directory, and the function that statement is used in the VB module file gets final product.
5) governor circuit: as shown in Figure 4, receiving course: the data in the CAN bus network enter CAN bus transceiver 82C250 chip through the CAN bus interface and receive, the reception buffering area that enters CAN controller SJA1000 chip afterwards also further deposits the internal RAM of single-chip microcomputer 80C51 chip in, directly carry out the read-write of I/O mouth, the reprocessing of passing to the laggard line data of host computer PC 104 system's machines by the parallel communications mode and the PC104 bus of 8255A chip at last; Process of transmitting: the data of host computer PC 104 system's machines are sent to single-chip microcomputer 80C51 chip internal RAM through the parallel communications mode of 8255A chip via the PC104 bus, and the transmission buffering area that is sent to CAN controller SJA1000 chip afterwards is sent in the CAN bus network by CAN bus transceiver 82C250 with the CAN bus protocol.

Claims (6)

1. Controller Area Network BUS intelligent adapter, this adapter comprises:
One CAN bus interface is used to connect the CAN network;
The one CAN bus transceiver that is electrically connected with the collecting device interface is used for receiving and sending the data of CAN bus network;
The one CAN bus control unit that is electrically connected with the CAN bus transceiver is passed to the CAN transceiver after being used for data are handled, and is received, handles data and output from the CAN bus transceiver;
One PC104 bus slot is used to connect the mainboard of PC104 system;
It is characterized in that, also comprise:
One microprocessor that is electrically connected with the CAN bus control unit is used for State Control and maintenance to the CAN bus.
2. adapter according to claim 1 is characterized in that, also comprises the parallel interface and the addressing circuit that are connected with microprocessor, is used to adopt the parallel communications mode to transmit data.
3. according to the adapter shown in the claim 2, it is characterized in that described parallel interface is electrically connected with described PC104 bus slot.
4. adapter according to claim 1 is characterized in that, also comprises at least two high speed photo couplings that are connected between CAN bus transceiver and the CAN bus control unit, is used for photoelectricity and isolates the antijamming capability of enhanced system.
5. adapter according to claim 4 is characterized in that, also comprises the power module of described high speed photo coupling.
6. adapter according to claim 2 is characterized in that, described addressing circuit is made up of minimum two and one 8 bit comparator of PC104 bus address, is used for the read-write operation control of described parallel interface.
CN 200520002154 2005-02-07 2005-02-07 A CAN bus intelligent adapting card Expired - Fee Related CN2779738Y (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200520002154 CN2779738Y (en) 2005-02-07 2005-02-07 A CAN bus intelligent adapting card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200520002154 CN2779738Y (en) 2005-02-07 2005-02-07 A CAN bus intelligent adapting card

Publications (1)

Publication Number Publication Date
CN2779738Y true CN2779738Y (en) 2006-05-10

Family

ID=36753823

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200520002154 Expired - Fee Related CN2779738Y (en) 2005-02-07 2005-02-07 A CAN bus intelligent adapting card

Country Status (1)

Country Link
CN (1) CN2779738Y (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103091108A (en) * 2013-01-17 2013-05-08 商旭升 Vibration detecting system used for aircraft engine

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103091108A (en) * 2013-01-17 2013-05-08 商旭升 Vibration detecting system used for aircraft engine

Similar Documents

Publication Publication Date Title
CN101621440B (en) Remote multi-path serial port communication mapping system
CN103150279B (en) Method allowing host and baseboard management controller to share device
CN101303656B (en) Java application program remote direct memory access method
DE60310586T2 (en) CONNECTION SYSTEM
CN101626351A (en) Multiprotocol data acquisition gateway
CN201294545Y (en) Multi-protocol data acquisition gateway
CN102662910B (en) Network interaction system based on embedded system and network interaction method
CN1791103A (en) Field bus communication adapter with configurable characteristic
CN101488878A (en) Intelligence platform interface management apparatus and server
CN1801020A (en) Embedded field bus protocol interface device and implementation method
CN1845084A (en) Embedded remote monitoring system based on Ethernet and PSTN communication mode
CN102065568A (en) Data descriptor-based medium access control (MAC) software and hardware interaction method and hardware realization device
CN202395811U (en) Protocol conversion device used for intelligent BMS
CN101778038B (en) Gigabit Ethernet-based high-speed data transmission system of embedded equipment
CN2779738Y (en) A CAN bus intelligent adapting card
CN104901857A (en) Bus analyzer
CN113625630B (en) Device for remote control of single-chip microcomputer operation by upper computer
CN100349142C (en) Remote page access method for use in shared virtual memory system and network interface card
CN202918326U (en) Intelligent multi-serial switch
CN104102512B (en) Embedded platform IO equipment dynamic identification system based on external interruption and IO equipment dynamic identification method of system
CN208466554U (en) A kind of image scan test device of wafer sorting machine
CN206557591U (en) Suitable for the access system of generating set
CN1808343A (en) Programmable communication converter
CN1167209C (en) Universal blue tooth circumscribing module
CN209543442U (en) A kind of unmanned shelf replenishment system

Legal Events

Date Code Title Description
C14 Grant of patent or utility model
GR01 Patent grant
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20060510