PCM18XK1 Microchip Technology, PCM18XK1 Datasheet - Page 292

MODULE PROC PIC18F8680,6680,8565

PCM18XK1

Manufacturer Part Number
PCM18XK1
Description
MODULE PROC PIC18F8680,6680,8565
Manufacturer
Microchip Technology
Datasheet

Specifications of PCM18XK1

Accessory Type
Processor Module
Lead Free Status / RoHS Status
Not applicable / Not applicable
For Use With/related Products
ICE2000
For Use With
ICE2000 - EMULATOR MPLAB-ICE 2000 POD
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
PIC18F6585/8585/6680/8680
EXAMPLE 23-4:
DS30491C-page 290
; Need to transmit Standard Identifier message 123h using TXB0 buffer.
; To successfully transmit, CAN module must be either in Normal or Loopback mode.
; TXB0 buffer is not in access bank.
MOVF
ANDLW
IORLW
MOVWF
; Now TXB0 is mapped in place of RXB0.
; yield TXB0 register values.
; Load transmit data into TXB0 buffer.
MOVLW
MOVWF
; Load rest of the data bytes - up to 8 bytes into “TXB0” buffer using RXB0 registers.
...
; Load message identifier
MOVLW
MOVWF
MOVLW
MOVWF
; No need to load RXB0EIDL:RXB0EIDH, as we are transmitting Standard Identifier Message only.
; Now that all data bytes are loaded, mark it for transmission.
MOVLW
MOVWF
; If required, wait for message to get transmitted
BTFSC
BRA
; Message is transmitted.
; If required, reset the WIN bits to default state.
CANCON, W
B’11110000’
B’00001000’
CANCON
MY_DATA_BYTE1
RXB0D0
60H
RXB0SIDL
24H
RXB0SIDH
B’00001000’
RXB0CON
RXB0CON, TXREQ
$-2
TRANSMITTING A CAN MESSAGE USING WIN BITS
; WIN bits are in lower 4 bits only.
; register to preserve all other bits.
; mode is already known, there is no need to preserve
; other bits.
; Clear WIN bits.
; Select Transmit Buffer 0
; Apply the changes.
; Load first data byte into buffer
; Access TXB0D0 via RXB0D0 address.
; Load SID2:SID0, EXIDE = 0
; Load SID10:SID3
; Normal priority; Request transmission
; Is it transmitted?
; No.
Use WIN bits to map it to RXB0 area.
All future access to RXB0 registers will actually
Continue to wait...
 2004 Microchip Technology Inc.
Read CANCON
If operation

Related parts for PCM18XK1