Electronic Components Datasheet Search
  New Zealand  ▼
ALLDATASHEET.CO.NZ

X  

PIC18C658T-E/CL Datasheet(PDF) 187 Page - Microchip Technology

Part # PIC18C658T-E/CL
Description  High-Performance Microcontrollers with CAN Module
PDF  366 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  MICROCHIP [Microchip Technology]
Direct Link  http://www.microchip.com
Logo MICROCHIP - Microchip Technology

PIC18C658T-E/CL Datasheet(HTML) 187 Page - Microchip Technology

Back Button PIC18C658T-E/CL Datasheet HTML 183Page - Microchip Technology PIC18C658T-E/CL Datasheet HTML 184Page - Microchip Technology PIC18C658T-E/CL Datasheet HTML 185Page - Microchip Technology PIC18C658T-E/CL Datasheet HTML 186Page - Microchip Technology PIC18C658T-E/CL Datasheet HTML 187Page - Microchip Technology PIC18C658T-E/CL Datasheet HTML 188Page - Microchip Technology PIC18C658T-E/CL Datasheet HTML 189Page - Microchip Technology PIC18C658T-E/CL Datasheet HTML 190Page - Microchip Technology PIC18C658T-E/CL Datasheet HTML 191Page - Microchip Technology Next Button
Zoom Inzoom in Zoom Outzoom out
 187 / 366 page
background image
 2000 Microchip Technology Inc.
Advanced Information
DS30475A-page 187
PIC18CXX8
EXAMPLE 17-1: WIN AND ICODE BITS USAGE IN INTERRUPT SERVICE ROUTINE TO ACCESS
TX/RX BUFFERS
; Save application required context.
; Poll interrupt flags and determine source of interrupt
; This was found to be CAN interrupt
; TempCANCON and TempCANSTAT are variables defined in Access Bank low
movff
CANCON, TempCANCON
; Save CANCON.WIN bits
; This is required to prevent CANCON
; from corrupting CAN buffer access
; in-progress while this interrupt
; occurred
movff
CANSTAT, TempCANSTAT
; Save CANSTAT register
; This is required to make sure that
; we use same CANSTAT value rather
; than one changed by another CAN
; interrupt.
movf
TempCANSTAT, W
; Retrieve ICODE bits
andlw
b’00001110’
addwf
PCL, F
; Perform computed GOTO
; to corresponding interrupt cause
bra
NoInterrupt
; 000 = No interrupt
bra
ErrorInterrupt
; 001 = Error interrupt
bra
TXB2Interrupt
; 010 = TXB2 interrupt
bra
TXB1Interrupt
; 011 = TXB1 interrupt
bra
TXB0Interrupt
; 100 = TXB0 interrupt
bra
RXB1Interrupt
; 101 = RXB1 interrupt
bra
RXB0Interrupt
; 110 = RXB0 interrupt
; 111 = Wake-up on interrupt
WakeupInterrupt
bcf
PIR3, WAKIF
; Clear the interrupt flag
;
; User code to handle wake-up procedure
;
;
; Continue checking for other interrupt source or return from here
…
NoInterrupt
…
; PC should never vector here. User may
; place a trap such as infinite loop or pin/port
; indication to catch this error.
ErrorInterrupt
bcf
PIR3, ERRIF
; Clear the interrupt flag
…
; Handle error.
retfie
TXB2Interrupt
bcf
PIR3, TXB2IF
; Clear the interrupt flag
goto
AccessBuffer
TXB1Interrupt
bcf
PIR3, TXB1IF
; Clear the interrupt flag
goto
AccessBuffer
TXB0Interrupt
bcf
PIR3, TXB0IF
; Clear the interrupt flag
goto
AccessBuffer
RXB1Interrupt
bcf
PIR3, RXB1IF
; Clear the interrupt flag
goto
Accessbuffer



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com