+86-1478258894512522120
葩星12522120 淘宝旺旺passiontechinc

pt@ptinfous.com

+86-14782588945

  加载中,请稍候...
浏览历史

 


NMEA2000协议堆栈源代码

关键词: NMEA2000协议堆栈源代码


简介:NMEA 2000协议堆栈为了满足CAN协议组织需要而设计的堆栈。该NMEA 2000 源代码使用高效的模块设计和简单的API调用。 Benchmarks测试发现该堆栈800%强于一般的商用NMEA 2000软件解决方案.该协议有很好的文档化,而且已经在超过百万个嵌入式项目中使用过。NMEA 2000 software package handles reception and transmission of standard ...
品 牌
产 地
型 号 PXF2463
折 扣
咨询专家:

产品说明:

NMEA 2000协议堆栈为了满足CAN协议组织需要而设计的堆栈。

该 NMEA 2000 源代码使用高效的模块设计和简单的API调用。 Benchmarks测试发现该堆栈800%强于一般的商用NMEA 2000软件解决方案.

该协议有很好的文档化,而且已经在超过百万个嵌入式项目中使用过。

 

NMEA 2000 Yacht

 

NMEA 2000 software package handles reception and transmission of standard single frame and multi-frame (i.e. Transport Protocol) NMEA 2000 messages. Also, the ssNMEA2000 software package handles address claim arbitration specified by the network management layer. If you have questions about our NMEA 2000 software, please see our NMEA 2000 Protocol Stack FAQ for possible answers.

 

NMEA 2000 协议堆栈的细节:

 

  • Fast Packet support
  • PGN List Group functions
  • Complex Data Request
  • Product Informatin support
  • MISRA C compliant
  • ANSI C source code
  • Use with or without an RTOS
  • Use with 8, 16, 32, or 64-bit CPU
  • ssNMEA2000 reference manual

NMEA 2000

 

This article is intended to give engineers a brief overview of the NMEA 2000 protocol. For details on the specification itself, please visit the International Marine Electronics Association (NMEA).

 

NMEA 2000 is a replacement for the NMEA 0183 network which has been used in the marine industry on pleasure craft, tankers, submarines, yachts, and cargo ships for the past 20 years. Today NMEA 2000 is used as the standard communications bus for marine equipement.

 

NMEA 2000 简介

 

NMEA 2000 is a high level communications protocol, which operates on a Controller Area Network (CAN) bus. NMEA 2000 specifies exactly how information (e.g. engine RPM) is ex改变d between electronic control units (ECUs) on a network.

 

It defines the data's priority, size, scaling, and offset. For example, NMEA 2000 specifies engine RPM to have a default priority of 3, to have a size of 16-bits, a resolution of 0.125 rpm/bit, and an offset of 0.

 

The standard goes on to define many 其他 aspects, including message timeouts, how large messages are fragmented and reassembled, the network speed, the physical layer, and how applications acquire network addresses.

 

NMEA 2000 数据链路层

 

NMEA 2000 uses a simple datalink layer to communicate information. Altogether there are six subfields which are encoded into the 29-bit CAN identifier, they are shown below and are: Priority, Extended Data Page, Data Page, Protocol Format, Protocol Specific, and Source Address.

 

P EDP DP PF PS SA
3 bits 1 bit 1 bit 8 bits 8 bits 8 bits

 

P is the priority of the message, EDP and DP make up 4 different pages with one page being reserved for ISO 15765-3. PF and PS define the parameter group number and destination address, and SA is the source address of the controller application. For details about this encoding, refer to NMEA 2000-21.

 

NMEA 2000 报文

 

At the heart of NMEA 2000 is the Parameter Group Number (PGN), which is a unique number assigned to every NMEA 2000 message. The PGN serves to identify the message and its data. Although sometimes a message will contain a single parameter (e.g. VIN), typically the PGN will contain a group of parameters. In the standard there is a total of 8,672 PGNs.

 

For an example message, take PGN 61,444. It identifies the "Electronic Engine Controller 1" message. Per the specification, "EEC1" has seven different parameters embedded in the data field of the message. Engine RPM is one of those seven parameters.

 

NMEA 2000 报文大小

 

NMEA 2000 has three different allowed message sizes, they are: 3 bytes, 8 bytes, and variable length. There is only one message which is three bytes in length, and that is the request message (PGN 59,904).

 

The majority of messages in NMEA 2000 are 8 bytes in length. This allows for a more efficient use of the network bandwidth by maximizing the amount of data on the network by reducing the number of messages.

 

Variable length messages are messages with a length from 9 to 1,785 bytes. These messages are too large to fit in a single CAN data frame and must be fragmented by the transmitter and reassembled by the receiver. This process is defined by NMEA 2000's transport protocol which is specified by IS 11783-3 and j1939-21.

 

The transport protocol layer defines two different types of message fragmentation: BAM and CM. There are several differences between those two types, the main difference being the destination address. A BAM uses a global destination address and is therefore sent to all CAs, while a CM is destination specific. Due to the addressing scheme, only a single BAM can be transmitted simultaneously, while multiple CMs using different destination addresses may be simultaneously transmitted.

 

An其他 difference between BAMs and CMs is the time is takes to send a messages. With a BAM, data packets must be spaced at least 50 ms apart and no more than 200 ms. With a CM, data frames may be sent as quickly as possible.

 

NMEA 2000 物理层

 

Currently there is a single 250 Kbps physical layers defined by the NMEA 2000 main document. NMEA 2000 specifies a shielded twisted pair of wires with a maximum backbone length of 100 meters and maximum stub length of 6 meter. The physical layer uses a four pin 连接or, with power and ground, and allows for up to 50 CAN 节点.

 

NMEA 2000 CAN 参数

NMEA 2000 specifies a network data rate of 250 Kbps with a minimum period of 3.98 us and a maximum period of 4.02 us. The CAN bus sample point setting has a minimum value of 85% and maximum value of 90%. CAN peripherals also allow for synchronous jump width (SJW) settings as 'large as possible'. The SJW value dictates how much time can be added or subtracted to the node's CAN clock for syncronization purposes.

NMEA 2000 名字帧

 

Every ECU, or CA (controller application) on a NMEA 2000 network has a unique NAME. The NAME is 64 bits wide and is made up of the following fields: Arbitrary Address Capable, Industry Group, Vehicle System Instance, Vehicle System, Reserved Bit, Function, Function instance, ECU Instance, Manufacturer Code, and Identity Number. The NAME field gives each CA a unique identity. Nodes on the network use the NAME field to distinguish between each 其他. The NAME field is also essential to Network Management as it establishes node priority. The NAME translates to a number; the lowest numeric values have the highest priority when claiming addresses.

 

An ECU may contain multiple CAs and NAME fields.

 

NMEA 2000 地址申明

 

In NMEA 2000 CAs, or electronic control units, on the vehicle network bus must claim a unique source address to enable communication. Addresses 0 to 128 are pre-assigned and CAs which use these addresses are allowed to communicate immediately after power up. In anticipation of future devices and functions, however, NMEA 2000 includes a method for dynamically assigning addresses. New devices must announce an address for themselves by transmitting an address claim message.

 

Sending an Address Claim message the new (non-addressed) device sends out an Address Claim PGN indicating the address it is assuming. All devices on the network compare this newly claimed address with their internal address tables. If the address is already in use by a device with a higher priority (determined by the NAME), the higher priority device indicates the conflict by sending out a Address Claim message. The lower priority device immediately stops using the address and must claim a new one.

 

关于 NMEA

 

NMEA is the International Marine Electronics Association, that represents NMEA's evolution from a national to an international marine electronics standards and education association. The mission of the National Marine Electronics Association is to be a worldwide, self-sustaining organization committed to enhancing the technology and safety of electronics used in marine applications.

 

NMEA 2000 技术参数

 

  • NMEA 2000-Main: Parent Document
  • NMEA 2000-Main: Physical Layer
  • ISO 11783-3: Data Link Layer
  • ISO 11783-5: Network Management
  • NMEA 2000-Appendix A: Application Layer
  • NMEA 2000-Appendix C: Certification Criteria
  • ISO 11898: Controller Area Network

NMEA 2000 支持的芯片

 

Our real-time NMEA 2000 protocol stack is completely platform independent and written in the ANSI C programming language. It is the CAN device driver, ssCAN, that is target specific and incorporates the details for a given microcontroller.

 

Together ssNMEA2000 and ssCAN form a complete ported system allowing customers to be up and running almost immediately. Our ssCAN device driver has been ported to over 40 different microcontrollers. Below is the list of available ports. Please contact us if you are interested in a port or device driver for a hardware platform that is not listed.

 

  • Linux
  • Windows XP/7/Embedded
  • Texas Instruments RM4x (DCAN)
  • Texas Instruments LM3Sx
  • Texas Instruments TMS470x
  • Texas Instruments TMS470Mx
  • Texas Instruments TMS570x
  • Texas Instruments Tiva TM4C
  • Texas Instruments F28M35xx
  • Texas Instruments TMS320F280x
  • Texas Instruments TMS320F281x
  • Texas Instruments TMS320F282x
  • Texas Instruments TMS320F283x
  • Texas Instruments AM3x - Sitara
  • Texas Instruments DM8x - DaVinci
  • Atmel SAM7
  • Atmel AT90
  • Freescale HCS08
  • Freescale HCS12
  • Freescale HCS12X
  • Freescale MC68xxx
  • Freescale MCF5xxx
  • Freescale MPC5xxx
  • Freescale Kinetis Kxx
  • Infineon C16x
  • Infineon TriCore
  • Intel 82527
  • Microchip PIC18
  • Microchip PIC24
  • Microchip PIC32
  • Microchip dsPIC30
  • Microchip dsPIC33
  • Microchip MCP2515
  • NXP LPC11xx
  • NXP LPC17xx
  • NXP LPC21xx
  • NXP LPC23xx
  • NXP SJA1000
  • Silicon Labs C8051
  • STMicro ST7
  • STMicro ST10
  • STMicro STR7
  • STMicro STM8
  • STMicro STM32F1x
  • STMicro STM32F2x
  • STMicro STM32F3x
  • STMicro STM32F4x
  • Xilinx LogiCORE AXI (axi_can)
j1939
参数资料:
NMEA2000协议堆栈源代码NMEA2000协议堆栈源代码
该文章系原厂商文章翻译,不通之处请参考原文
价格列表: NMEA2000协议堆栈源代码NMEA2000协议堆栈源代码
葩星订货号 订货号 产品名称 报价 品牌  
相关产品: NMEA2000协议堆栈源代码NMEA2000协议堆栈源代码
  咨询历史: