PIC18F4420-E/PT Microchip Technology, PIC18F4420-E/PT Datasheet - Page 316
![44 PIN, 16 KB ENH FLASH, 3804 RAM, 36 I/O, PB FREE,](/photos/6/82/68251/c04-076_pt_sml.jpg)
PIC18F4420-E/PT
Manufacturer Part Number
PIC18F4420-E/PT
Description
44 PIN, 16 KB ENH FLASH, 3804 RAM, 36 I/O, PB FREE,
Manufacturer
Microchip Technology
Series
PIC® 18Fr
Datasheets
1.PIC18F2221-ISO.pdf
(46 pages)
2.PIC18F2420-IML.pdf
(412 pages)
3.PIC18F2420-IML.pdf
(16 pages)
4.PIC18F2420-IML.pdf
(8 pages)
5.PIC18F2420-IML.pdf
(6 pages)
6.PIC18F2420-IML.pdf
(8 pages)
7.PIC18F2420-IML.pdf
(4 pages)
Specifications of PIC18F4420-E/PT
Rohs Compliant
YES
Core Processor
PIC
Core Size
8-Bit
Speed
40MHz
Connectivity
I²C, SPI, UART/USART
Peripherals
Brown-out Detect/Reset, HLVD, POR, PWM, WDT
Number Of I /o
36
Program Memory Size
16KB (8K x 16)
Program Memory Type
FLASH
Eeprom Size
256 x 8
Ram Size
768 x 8
Voltage - Supply (vcc/vdd)
4.2 V ~ 5.5 V
Data Converters
A/D 13x10b
Oscillator Type
Internal
Operating Temperature
-40°C ~ 125°C
Package / Case
44-TQFP, 44-VQFP
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Available stocks
Company
Part Number
Manufacturer
Quantity
Price
Company:
Part Number:
PIC18F4420-E/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
- PIC18F2221-ISO PDF datasheet
- PIC18F2420-IML PDF datasheet #2
- PIC18F2420-IML PDF datasheet #3
- PIC18F2420-IML PDF datasheet #4
- PIC18F2420-IML PDF datasheet #5
- PIC18F2420-IML PDF datasheet #6
- PIC18F2420-IML PDF datasheet #7
- Current page: 316 of 412
- Download datasheet (7Mb)
PIC18F2420/2520/4420/4520
24.2.3
In addition to eight new commands in the extended set,
enabling the extended instruction set also enables
Indexed Literal Offset Addressing mode (Section 5.5.1
“Indexed Addressing with Literal Offset”). This has
a significant impact on the way that many commands of
the standard PIC18 instruction set are interpreted.
When the extended set is disabled, addresses embed-
ded in opcodes are treated as literal memory locations:
either as a location in the Access Bank (‘a’ = 0), or in a
GPR bank designated by the BSR (‘a’ = 1). When the
extended instruction set is enabled and ‘a’ = 0, how-
ever, a file register argument of 5Fh or less is
interpreted as an offset from the pointer value in FSR2
and not as a literal address. For practical purposes, this
means that all instructions that use the Access RAM bit
as an argument – that is, all byte-oriented and bit-
oriented instructions, or almost half of the core PIC18
instructions – may behave differently when the
extended instruction set is enabled.
When the content of FSR2 is 00h, the boundaries of the
Access RAM are essentially remapped to their original
values. This may be useful in creating backward
compatible code. If this technique is used, it may be
necessary to save the value of FSR2 and restore it
when moving back and forth between C and assembly
routines in order to preserve the Stack Pointer. Users
must also keep in mind the syntax requirements of the
extended
“Extended Instruction Syntax with Standard PIC18
Commands”).
Although the Indexed Literal Offset Addressing mode
can be very useful for dynamic stack and pointer
manipulation, it can also be very annoying if a simple
arithmetic operation is carried out on the wrong
register. Users who are accustomed to the PIC18 pro-
gramming must keep in mind that, when the extended
instruction set is enabled, register addresses of 5Fh or
less are used for Indexed Literal Offset Addressing.
Representative examples of typical byte-oriented and
bit-oriented instructions in the Indexed Literal Offset
Addressing mode are provided on the following page to
show how execution is affected. The operand condi-
tions shown in the examples are applicable to all
instructions of these types.
DS39631E-page 314
Note:
Enabling
extension may cause legacy applications
to behave erratically or fail entirely.
BYTE-ORIENTED AND
BIT-ORIENTED INSTRUCTIONS IN
INDEXED LITERAL OFFSET MODE
instruction
the
set
PIC18
(see
Section 24.2.3.1
instruction
set
24.2.3.1
When the extended instruction set is enabled, the file
register argument, ‘f’, in the standard byte-oriented and
bit-oriented commands is replaced with the literal offset
value, ‘k’. As already noted, this occurs only when ‘f’ is
less than or equal to 5Fh. When an offset value is used,
it must be indicated by square brackets (“[ ]”). As with
the extended instructions, the use of brackets indicates
to the compiler that the value is to be interpreted as an
index or an offset. Omitting the brackets, or using a
value greater than 5Fh within brackets, will generate an
error in the MPASM Assembler.
If the index argument is properly bracketed for Indexed
Literal Offset Addressing, the Access RAM argument is
never specified; it will automatically be assumed to be
‘0’. This is in contrast to standard operation (extended
instruction set disabled) when ‘a’ is set on the basis of
the target address. Declaring the Access RAM bit in
this mode will also generate an error in the MPASM
Assembler.
The destination argument, ‘d’, functions as before.
In the latest versions of the MPASM assembler,
language support for the extended instruction set must
be explicitly invoked. This is done with either the
command line option, /y, or the PE directive in the
source listing.
24.2.4
It is important to note that the extensions to the instruc-
tion set may not be beneficial to all users. In particular,
users who are not writing code that uses a software
stack may not benefit from using the extensions to the
instruction set.
Additionally, the Indexed Literal Offset Addressing
mode may create issues with legacy applications
written to the PIC18 assembler. This is because
instructions in the legacy code may attempt to address
registers in the Access Bank below 5Fh. Since these
addresses are interpreted as literal offsets to FSR2
when the instruction set extension is enabled, the
application may read or write to the wrong data
addresses.
When porting an application to the PIC18F2420/2520/
4420/4520, it is very important to consider the type of
code. A large, re-entrant application that is written in ‘C’
and would benefit from efficient compilation will do well
when using the instruction set extensions. Legacy
applications that heavily use the Access Bank will most
likely not benefit from using the extended instruction
set.
CONSIDERATIONS WHEN
ENABLING THE EXTENDED
INSTRUCTION SET
Extended Instruction Syntax with
Standard PIC18 Commands
© 2008 Microchip Technology Inc.
Related parts for PIC18F4420-E/PT
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
![PIC18F442-I/L](/photos/6/63/66325/150-44-plcc_tmb.jpg)
Part Number:
Description:
IC MCU FLASH 8KX16 EE A/D 44PLCC
Manufacturer:
Microchip Technology
Datasheet:
![PIC18F442-I/PT](/photos/6/82/68251/c04-076_pt_tmb.jpg)
Part Number:
Description:
IC MCU FLASH 8KX16 EE A/D 44TQFP
Manufacturer:
Microchip Technology
Datasheet:
![PIC18F442-I/P](/photos/6/61/66192/150-40-dip_tmb.jpg)
Part Number:
Description:
IC MCU FLASH 8KX16 EE A/D 40DIP
Manufacturer:
Microchip Technology
Datasheet:
![PIC18F442-I/ML](/photos/6/81/68122/150-44-qfn_tmb.jpg)
Part Number:
Description:
IC MCU FLASH 8KX16 EE A/D 44QFN
Manufacturer:
Microchip Technology
Datasheet:
![PIC18F442-I/PTG](/photos/6/82/68251/c04-076_pt_tmb.jpg)
Part Number:
Description:
IC PIC MCU FLASH 8KX16 44TQFP
Manufacturer:
Microchip Technology
Datasheet:
![PIC18F442-E/P](/photos/6/61/66192/150-40-dip_tmb.jpg)
Part Number:
Description:
IC MCU CMOS 40MHZ 8K FLASH 40DIP
Manufacturer:
Microchip Technology
Datasheet:
![PIC18F442-E/PT](/photos/6/82/68251/c04-076_pt_tmb.jpg)
Part Number:
Description:
IC MCU CMOS 40MHZ 8K FLSH 44TQFP
Manufacturer:
Microchip Technology
Datasheet:
![PIC18F442-E/L](/photos/6/63/66325/150-44-plcc_tmb.jpg)
Part Number:
Description:
IC MCU CMOS 40MHZ 8K FLSH 44PLCC
Manufacturer:
Microchip Technology
Datasheet:
![PIC18F442-E/ML](/photos/6/81/68122/150-44-qfn_tmb.jpg)
Part Number:
Description:
IC MCU FLASH 8KX16 EE A/D 44QFN
Manufacturer:
Microchip Technology
Datasheet:
![PIC18F6393T-I/PT](/photos/6/81/68123/c04-066_pf_tmb.jpg)
Part Number:
Description:
PIC18F With 128-segment LCD Driver And 12-bit ADC, 8KB Flash, 768B RAM, CCP, MSS
Manufacturer:
Microchip Technology
Datasheet:
![PIC18F6493T-I/PT](/photos/6/81/68123/c04-066_pf_tmb.jpg)
Part Number:
Description:
PIC18F With 128-segment LCD Driver And 12-bit ADC, 16KB Flash, 768B RAM, CCP, MS
Manufacturer:
Microchip Technology
Datasheet:
![PIC18F8393T-I/PT](/images/manufacturer_photos/0/4/439/microchip_technology_tmb.jpg)
Part Number:
Description:
PIC18F With 192-segment LCD Driver And 12-bit ADC, 8KB Flash, 768B RAM, CCP, MSS
Manufacturer:
Microchip Technology
Datasheet:
![PIC18F8493T-I/PT](/images/manufacturer_photos/0/4/439/microchip_technology_tmb.jpg)
Part Number:
Description:
PIC18F With 192-segment LCD Driver And 12-bit ADC, 16KB Flash, 768B RAM, CCP, MS
Manufacturer:
Microchip Technology
Datasheet:
![PIC18F6585-I/L](/photos/16/12/161282/68-plcc-large-300dpi-lyrd_tmb.jpg)
Part Number:
Description:
Microcontrollers (MCU) 48KB 3328 RAM 52 I/O
Manufacturer:
Microchip Technology
Datasheet:
![PIC18F6680-I/L](/photos/16/12/161282/68-plcc-large-300dpi-lyrd_tmb.jpg)
Part Number:
Description:
Microcontrollers (MCU) 64KB 3328 RAM 52 I/O
Manufacturer:
Microchip Technology
Datasheet: