Microchip PIC24HJ128GP206 Handleiding


Lees hieronder de đź“– handleiding in het Nederlandse voor Microchip PIC24HJ128GP206 (74 pagina's) in de categorie Niet gecategoriseerd. Deze handleiding was nuttig voor 38 personen en werd door 2 gebruikers gemiddeld met 4.5 sterren beoordeeld

Pagina 1/74
© 2009 Microchip Technology Inc. DS70226C-page 21-1
ECAN™
21
Section 21. Enhanced Controller Area Network (ECAN™)
HIGHLIGHTS
This section of the manual contains the following major topics:
21.1 Introduction .................................................................................................................. 21-2
21.2 CAN Message Formats................................................................................................ 21-4
21.3 ECAN Registers...........................................................................................................21-9
21.4 ECAN Message Buffers ............................................................................................. 21-30
21.5 ECAN Operating Modes ............................................................................................ 21-34
21.6 Transmitting ECAN Messages ................................................................................... 21-35
21.7 Receiving ECAN Messages....................................................................................... 21-41
21.8 DMA Controller Configuration .................................................................................... 21-53
21.9 Bit Timing ................................................................................................................... 21-56
21.10 ECAN Error Management .......................................................................................... 21-60
21.11 ECAN Interrupts......................................................................................................... 21-63
21.12 ECAN Low-Power Modes .......................................................................................... 21-66
21.13 ECAN Time Stamping Using Input Capture ............................................................... 21-66
21.14 Register Maps............................................................................................................ 21-66
21.15 Related Application Notes.......................................................................................... 21-73
21.16 Revision History ......................................................................................................... 21-74
PIC24H Family Reference Manual
DS70226C-page 21-2 © 2009 Microchip Technology Inc.
21.1 INTRODUCTION
The PIC24H Enhanced Controller Area Network (ECAN™) module implements the CAN
Protocol 2.0B, used primarily in industrial and automotive applications. This asynchronous serial
data communication protocol provides reliable communications in electrically noisy
environments. The PIC24H device family integrates up to two ECAN modules. Figure 21-1
illustrates a typical CAN bus topology.
Figure 21-1: Typical CAN Bus Network
The ECAN module supports the following key features:
Standards Compliance:
• Full CAN 2.0B compliance
• Programmable bit rate up to 1 Mbps
Message Reception:
• 32 message buffers – all of them can be used for reception
• 16 acceptance filters for message filtering
• Three acceptance filter mask registers for message filtering
• Automatic response to Remote Transmit Request
• Up to 32-message deep First In First Out (FIFO) buffer
• DeviceNet™ addressing support
• DMA interface for message reception
Message Transmission:
• Eight message buffers configurable for message transmission
• User-defined priority levels for message buffers used for transmission
• DMA interface for message transmission
Others:
• Loopback, Listen All Messages and Listen Only modes for self-test, system diagnostics,
and bus monitoring
• Low-power operating modes
CAN
bus
ECAN1
PIC® MCU
with Integrated
ECAN
CAN
Transceiver
dsPIC33F
with Integrated
ECAN™
dsPIC30F
with Integrated
CAN
Transceiver
CAN Transceiver
CAN
Transceiver
CAN
ECAN2
CAN
Transceiver
PIC24H
© 2009 Microchip Technology Inc. DS70226C-page 21-3
Section 21. Enhanced Controller Area Network (ECAN™)
ECAN™
21
Figure 21-2 illustrates the general structure of the ECAN module and its interaction with the DMA
Controller and DMA RAM.
Figure 21-2: ECAN™ Interaction with DMA
21.1.1 ECAN Module
The ECAN module consists of a protocol engine, message acceptance filters, and separate
transmit and receive DMA interfaces. The protocol engine transmits and receives messages to
and from the CAN bus (as per CAN bus 2.0B protocol). The user-configurable acceptance filters
are used by the module to examine the received message to determine if it should be stored in
the DMA message buffer or discarded.
For received messages, the receive DMA interface generates a receive data interrupt to initiate
a DMA cycle. The receive DMA channel reads data from the CiRXD register and writes it into the
message buffer.
For transmit messages, the transmit DMA interface generates a transmit data interrupt to start a
DMA cycle. The transmit DMA channel reads from the message buffer and writes to the CiTXD
register for message transmission.
21.1.2 Message Buffers
The ECAN module supports up to 32 message buffers for storing data transmitted or received on
the CAN bus. These buffers are located in DMA RAM. Message buffers 0-7 can be configured
for either transmit or receive operation. Message buffers 8-31 are receive-only buffers and
cannot be used for Message Transmission.
21.1.3 DMA Controller
The DMA controller acts as an interface between the message buffers and ECAN to transfer data
back and forth without CPU intervention. The DMA controller supports up to eight channels for
transferring data between DMA RAM and the PIC24H peripherals. Two separate DMA
channels are needed to support CAN message transmission and CAN message reception.
Each DMA channel has a DMA Request register (DMAxREQ), which is used by the user
application to assign an interrupt event to trigger a DMA-based message transfer.
CiTX
CiRX
Message Buffer 0
Message Buffer 7
Message Buffer 8
Message Buffer 31
CAN
Protocol
Engine
ECAN
Transmit
Register
(CiTXD)
Acceptance
Filter 0-15
ECAN
Receive
Register
(CiRXD)
TX DMA
Interface
RX DMA
Interface
DMA
Channel
DMA
Channel
Message Buffer 1
ECAN™ Module Message Buffer
(DMA RAM)
RX
Request
TX
Request


Product specificaties

Merk: Microchip
Categorie: Niet gecategoriseerd
Model: PIC24HJ128GP206

Heb je hulp nodig?

Als je hulp nodig hebt met Microchip PIC24HJ128GP206 stel dan hieronder een vraag en andere gebruikers zullen je antwoorden




Handleiding Niet gecategoriseerd Microchip

Handleiding Niet gecategoriseerd

Nieuwste handleidingen voor Niet gecategoriseerd