PIC18F4580-I/P Microchip Technology Inc., PIC18F4580-I/P Datasheet - Page 206

no-image

PIC18F4580-I/P

Manufacturer Part Number
PIC18F4580-I/P
Description
40 PIN, 32 KB FLASH, 1536 RAM, 36 I/O
Manufacturer
Microchip Technology Inc.
Datasheet

Specifications of PIC18F4580-I/P

A/d Inputs
11-Channel, 10-Bit
Comparators
2
Cpu Speed
10 MIPS
Eeprom Memory
256 Bytes
Input Output
36
Interface
CAN/I2C/SPI/USART
Memory Type
Flash
Number Of Bits
8
Package Type
40-pin PDIP
Programmable Memory
32K Bytes
Ram Size
1.5K Bytes
Speed
40 MHz
Timers
1-8 bit, 3-16 bit
Voltage, Range
2-5.5 V
Lead Free Status / Rohs Status
RoHS Compliant part Electrostatic Device

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
PIC18F4580-I/P
Manufacturer:
RENESAS
Quantity:
5 600
Part Number:
PIC18F4580-I/P
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC18F4580-I/PT
Manufacturer:
MICROCHIP
Quantity:
201
Part Number:
PIC18F4580-I/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
PIC18F4580-I/PT
Manufacturer:
MICROCHI
Quantity:
20 000
Part Number:
PIC18F4580-I/PT
0
EXAMPLE 19-1:
DS41159D-page 204
PIC18FXX8
RXB0Interrupt
AccessBuffer
BCF
GOTO
; Copy CANCON.ICODE bits to CANSTAT.WIN bits
MOVF
ANDLW
MOVWF
MOVF
ANDLW
IORWF
; Access current buffer…
; User code
; Restore CANCON.WIN bits
MOVF
ANDLW
IORWF
MOVWF
; Do not need to restore CANSTAT - it is read-only register.
; Return from interrupt or check for another module interrupt source
PIR3, RXB0IF
AccessBuffer
CANCON, W
b’11110001’
CANCON
TempCANSTAT, W
b’00001110’
CANCON
CANCON, W
b’11110001’
TempCANCON, W
CANCON
WIN AND ICODE BITS USAGE IN INTERRUPT SERVICE ROUTINE TO ACCESS
TX/RX BUFFERS (CONTINUED)
; Clear the interrupt flag
; This is either TX or RX interrupt
; Clear CANCON.WIN bits before copying
; new ones.
; Use previously saved CANCON value to
; make sure same value.
; Copy masked value back to TempCANCON
; Retrieve ICODE bits
; Use previously saved CANSTAT value
; to make sure same value.
; Copy ICODE bits to WIN bits.
; Copy the result to actual CANCON
; Preserve current non WIN bits
; Restore original WIN bits
 2004 Microchip Technology Inc.

Related parts for PIC18F4580-I/P