Escolar Documentos
Profissional Documentos
Cultura Documentos
DEVICE MIGRATIONS
This document is intended to describe the functional differences and the electrical specification differences that are present when migrating from one device to the next. Note: These devices have been designed to perform to the parameters of their respective data sheets. They have been tested to an electrical specification designed to determine their conformance with these parameters. Due to process differences in the manufacture of these devices, they may have different performance characteristics than their earlier versions. These differences may cause the devices to perform differently in your application than the earlier version of these devices. The user should verify that the device oscillators start and perform as expected. Adjusting the loading capacitor values and/or the oscillator mode may be required. In lower pin count devices, such as the PIC18F45J10 (see Figure 2), the F designation in the name (i.e., PIC18F45J10) specifies that the internal voltage regulator enable is always tied to VDD and the regulator is always on. The LF designation (i.e., PIC18LF45J10) specifies that the voltage regulator enable is always tied to ground and that the regulator will always be disabled.
FIGURE 1:
ENVREG
VDD
Note:
VDDCORE/ VCAP
Vss
Device Core
I/O Pads
INTRODUCTION
The new PIC18FXXJ Flash family of devices has several key differences from the previous generation of PIC18 Flash devices. This migration document will identify, examine and explain these differences and how they could affect a system design. These differences include a change in the naming convention of the parts, general functionality, module differences and how to use the correct setting for programming tools.
FIGURE 2:
VDD
Device Core
I/O Pads
Device Core
I/O Pads
DS01021A-page 1
The VDDCORE/VCAP pin can have two functions. When the regulator is disabled, where ENVREG is grounded on high pin count devices and low pin count devices with the LF designation, VDDCORE is used to supply power to the digital core of the device. This will reduce the current consumption of the part by removing the voltage regulators quiescent current, which is the largest contributor to the current consumption of the part while it is in an Idle or Sleep mode. In this mode, power must be supplied on both the VDDCORE pin as well as the VDD pin. The common configuration is to tie VDDCORE to VDD and power the part from 2.0V to 2.7V. Alternatively, power can be supplied from separate sources to VDDCORE (2.0V to 2.7V) and VDD (VDDCORE to 3.6V). This allows the core to run at a lower voltage while the I/O pins and peripherals run at a higher voltage. When running in this mode, it is essential that VDDCORE never exceed VDD, including during start-up.
When the voltage regulator is enabled, where ENVREG is tied to VDD on high pin count devices and low pin count devices with an F designation, a low Equivalent Series Resistance (ESR) capacitor is required on the VCAP pin in order to stabilize the output from the internal voltage regulator. In this mode, the device must be powered from 2.7V to 3.6V on VDD. When the regulator is disabled, VDDCORE must be provided from 2.0V to 2.7V in order to power the core of the device. Figure 3 shows the common power configuration for high pin count PIC18FXXJ Flash devices. Figure 4 shows the common power configuration for low pin count PIC18FXXJ Flash devices.
FIGURE 3:
TYPICAL POWER CONFIGURATIONS FOR HIGH PIN COUNT PIC18FXXJ FLASH DEVICES
Regulator Enabled:
PIC18F87J10
Regulator Disabled:
PIC18F87J10
ENVREG
VDD
ENVREG
VDD
VDDCORE/ VCAP
Vss
VDDCORE/ VCAP(1)
Vss
Note
1:
Voltage into VDDCORE must not exceed VDD and must be less then 2.7V.
FIGURE 4:
TYPICAL POWER CONFIGURATIONS FOR LOW PIN COUNT PIC18FXXJ FLASH DEVICES
Regulator Enabled (By Default):
PIC18F45J10
VDD
VDD
VCAP
Vss
VDDCORE(1)
Vss
Note
1:
Voltage into VDDCORE must not exceed VDD and must be less then 2.7V.
DS01021A-page 2
FIGURE 5:
4 MHz VDD
40 MHz
FIGURE 6:
CLOCKING
Higher Clocking Frequencies at Lower Voltages, LF vs. F Devices
Although the PIC18FXXJ Flash family of devices has a narrow operational voltage range, they are able to provide more MIPS per volt than previous PIC18 Flash devices. These devices are able to run at 40 MHz (10 MIPS) while operating at 2.25V. This increased operational flexibility enables users to harness the full power and speed of the device in a wider voltage range. Figure 5 shows the relationship between VDD and the operating frequency for devices with the regulator enabled (high pin count devices where ENVREG is tied to VDD and low pin count devices with the F designation). Figure 6 shows the relationship between VDD, VDDCORE and the operating frequency for devices with the voltage regulator disabled. Note that if VDD is tied to VDDCORE, the maximum operational voltage is 2.75V.
4 MHz VDDCORE Note: 3.6V VDD VDDCORE. 40 MHz
Power-up Timer
In PIC18FXXJ Flash devices, the Power-up Timer is always enabled. In previous devices, it was an optional feature that could be enabled or disabled in a configuration setting.
Start-up/Reset Delay
Because the Power-up Timer is always enabled in the PIC18FXXJ Flash devices, the start-up time for these devices is comparatively longer than the PIC18 Flash parts. There is also an additional delay for PIC18FXXJ Flash devices after any Reset in order to copy the Configuration Words from program memory into the Configuration registers. During this delay, the internal RC oscillator serves as the device source. After the Configuration registers are loaded, the device switches to the clock specified by the FOSC Configuration bits. Refer to Configuration Words for more details.
Oscillator Options
The oscillator options for a PIC18FXXJ Flash device are EC, ECPLL, HS, HSPLL and the 31 kHz internal oscillator. PIC18FXXJ Flash devices do not have the XT and LP options often found in other PIC18 Flash devices. RC mode is available in some of the PIC18FXXJ Flash devices. Please see the appropriate data sheet for more information about the specific device.
DS01021A-page 3
PIN DIFFERENCES
5 Volt Tolerant Pins
Although PIC18FXXJ Flash devices have a maximum VDD of 3.6V, I/O pins with only digital functions can tolerate up to 5V. Pins that are multiplexed with analog features are not 5V tolerant and include, but are not limited to: Any pin that is an analog input (AN0, AN1, etc.) Any clock source pins (OSC1, OSC2, T1OSC) Any comparator input pins Note that pins that are 5V tolerant as inputs can only drive VDD as an output. For applications that require a 5V output on an external device, a 5V port pin can be emulated by: adding an external pull-up resistor; setting the LAT register bit for that pin to 0; and manipulating the TRIS register bit for that pin to either allow the pin to pull up to 5V or drive down to ground. When using a pull-up resistor on a port pin, the capacitance of the connection between the two devices needs to be considered to determine the rise/fall rate of the signal on this port pin and what resistor value is appropriate for an application. Consider the following shown in Equation 1:
FIGURE 7:
3V
PIC18FXXJ Flash
CT
Note:
When the PIC18FXXJ Flash device drives ground on the line, then the value of R used to calculate is the series resistance of the output driver, plus the trace impedance. The rise time caused by the trace will typically be negligible compared to the port output fall time (TIOF). See the AC Characteristics section of the respective device data sheet for the value of TIOF.
EQUATION 1:
Rise/Fall Time = ln ( where: PVDD ) PVDD TVIH
EQUATION 2:
ln(
DS01021A-page 4
PROGRAM MEMORY
Device ID
In low pin count PIC18FXXJ Flash devices, F and LF designated parts have different device IDs. In PIC18 Flash devices, the F and LF parts share the same device ID. Refer to Correct Settings for Device Programmers and Software Tools for more information on how this changes programmer and tool usage.
In PIC18FXXJ Flash devices, the Configuration Words are located at the very end of the user memory space (see Figure 9). These values are copied on any Reset from the program memory location into the Configuration registers. Once this copy is complete, the write mechanism to the Configuration registers is disabled. If any of the Configuration bits are changed in the program memory during user operation, they will not have an effect until the device goes through a Reset. After a device Reset, the Configuration Words will be copied back into the Configuration registers.
Configuration Words
In PIC18 Flash devices, the Configuration Words are located starting at address 300000h. This address resides beyond the space of regular user program memory (see Figure 8 for an example).
FIGURE 8:
21
Stack Level 31 Reset Vector High Priority Interrupt Vector Low Priority Interrupt Vector On-Chip Program Memory On-Chip Program Memory 3FFFh 4000h PIC18FX4X0 7FFFh 8000h PIC18FX5X0 0000h 0008h 0018h
Read 0
Read 0
DS01021A-page 5
FIGURE 9:
21
Stack Level 31 Reset Vector High Priority Interrupt Vector Low Priority Interrupt Vector On-Chip Program Memory Configuration Words On-Chip Program Memory 3FF7h 4000h User Memory Space 2006 Microchip Technology Inc. 0000h 0008h 0018h
PIC18FX4JX0
Configuration Words
7FF7h 8000h
PIC18FX5JX0
Read 0
Read 0
Applications that use the self-write functionality of a PIC18FXXJ Flash device should take extra consideration regarding the Configuration Words. Before erasing the last block of the user program memory space, the application should save the Configuration Words and write back these values as soon as possible. In the event that a Reset event happens after erasing the last block of memory, but before the write back occurs, the configuration setting of the device can be corrupted. It is advisable that applications that use the self-write functionality either avoid using the last block of memory in their section of changing bootable code or maintain a copy of the Configuration Words in a backup location in memory that is verified on program entry, so that in this rare event, the Configuration Words can be restored. An application forced Reset event would be required before the device could resume operating in the restored operational mode.
Write Cycles
PIC18FXXJ Flash devices have a lower typical write cycle rating than the enhanced Flash that is offered in most of the PIC18 Flash devices. Please refer to the specific PIC18FXXJ Flash device data sheet for more information on the typical number of write cycles for that device.
Characteristic Retention
PIC18FXXJ Flash devices have a lower characteristic retention than the enhanced Flash used in many of the other PIC18 Flash devices. The minimum and typical values for characteristic retention are provided in the device data sheet for each PIC18FXXJ Flash family device.
DS01021A-page 6
Special consideration should be made for applications that use the self-write functionality in the last erase block of the user memory space. See Configuration Words for more details.
Code Protection
Code protection in the PIC18FXXJ Flash devices is implemented as a single block. The entire memory is protected by a single Configuration bit. Like the code protection bit(s) in previous devices, this bit blocks external writes and reads from the In-Circuit Serial Programming (ICSP) module. However, this code protection bit does not limit table read or write functions within the application code.
FIGURE 10:
MCLR
VDD Program/Verify Entry Code = 4D434850h PGD PGC P19 P2B P2A 0 b31 1 b30 0 b29 0 b28 1 b27 ... 0 b3 0 b2 0 b1 0 b0
DS01021A-page 7
Attach the programmer to the computer and verify that the programmer is on and enabled for the correct device before connecting the programmer to the board or inserting the part into the programmer. Failure to do so could result in damage or destruction of the part. To select the correct device, go to the Configure menu option in MPLAB IDE, then choose the Select Device option. From this menu, select the correct device (Figure 11). Note: For low pin count PIC18FXXJ Flash devices, the F and LF designated parts will be listed separately in the Select Device dialog box. This differs from PIC18 Flash devices, where only the F designated part is listed in the Select Device dialog box.
3.
FIGURE 11:
DS01021A-page 8
MODULE DIFFERENCES
A/D Calibration
One major functional change added to the PIC18FXXJ Flash devices is the ability for users to calibrate the A/D converter. This calibration will help compensate for any offset generated within the module. To start calibration, first set the ADCAL calibration bit in the ADCON0 register (see Figure 12). With the ADCAL bit set, start an A/D conversion by setting the GO/DONE bit. This conversion will not read any of the analog input pins. This process should be done each time the operation of the device changes, for example, oscillator changes, voltage changes, after any Reset conditions, etc.
SUMMARY
PIC18FXXJ Flash devices give system designers more options and flexibility in filling their microcontroller needs. The key differences listed in this document help distinguish the PIC18FXXJ Flash devices from the PIC18 Flash devices, allowing designers to select the appropriate device for their application. Designers should consider these differences when designing and developing their products.
FIGURE 12:
bit 7
ADCAL: A/D Calibration bit 1 = Calibration is performed on next A/D conversion 0 = Normal A/D converter operation (no calibration is performed)
DS01021A-page 9
NOTES:
DS01021A-page 10
Note the following details of the code protection feature on Microchip devices: Microchip products meet the specification contained in their particular Microchip Data Sheet. Microchip believes that its family of products is one of the most secure families of its kind on the market today, when used in the intended manner and under normal conditions. There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our knowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchips Data Sheets. Most likely, the person doing so is engaged in theft of intellectual property. Microchip is willing to work with the customer who is concerned about the integrity of their code. Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not mean that we are guaranteeing the product as unbreakable.
Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of our products. Attempts to break Microchips code protection feature may be a violation of the Digital Millennium Copyright Act. If such acts allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act.
Information contained in this publication regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchips products as critical components in life support systems is not authorized except with express written approval by Microchip. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.
Trademarks The Microchip name and logo, the Microchip logo, Accuron, dsPIC, KEELOQ, microID, MPLAB, PIC, PICmicro, PICSTART, PRO MATE, PowerSmart, rfPIC, and SmartShunt are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. AmpLab, FilterLab, Migratable Memory, MXDEV, MXLAB, PICMASTER, SEEVAL, SmartSensor and The Embedded Control Solutions Company are registered trademarks of Microchip Technology Incorporated in the U.S.A. Analog-for-the-Digital Age, Application Maestro, dsPICDEM, dsPICDEM.net, dsPICworks, ECAN, ECONOMONITOR, FanSense, FlexROM, fuzzyLAB, In-Circuit Serial Programming, ICSP, ICEPIC, Linear Active Thermistor, MPASM, MPLIB, MPLINK, MPSIM, PICkit, PICDEM, PICDEM.net, PICLAB, PICtail, PowerCal, PowerInfo, PowerMate, PowerTool, Real ICE, rfLAB, rfPICDEM, Select Mode, Smart Serial, SmartTel, Total Endurance, UNI/O, WiperLock and Zena are trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. SQTP is a service mark of Microchip Technology Incorporated in the U.S.A. All other trademarks mentioned herein are property of their respective companies. 2006, Microchip Technology Incorporated, Printed in the U.S.A., All Rights Reserved. Printed on recycled paper.
Microchip received ISO/TS-16949:2002 quality system certification for its worldwide headquarters, design and wafer fabrication facilities in Chandler and Tempe, Arizona and Mountain View, California in October 2003. The Companys quality system processes and procedures are for its PICmicro 8-bit MCUs, KEELOQ code hopping devices, Serial EEPROMs, microperipherals, nonvolatile memory and analog products. In addition, Microchips quality system for the design and manufacture of development systems is ISO 9001:2000 certified.
DS01021A-page 11
ASIA/PACIFIC
Australia - Sydney Tel: 61-2-9868-6733 Fax: 61-2-9868-6755 China - Beijing Tel: 86-10-8528-2100 Fax: 86-10-8528-2104 China - Chengdu Tel: 86-28-8676-6200 Fax: 86-28-8676-6599 China - Fuzhou Tel: 86-591-8750-3506 Fax: 86-591-8750-3521 China - Hong Kong SAR Tel: 852-2401-1200 Fax: 852-2401-3431 China - Qingdao Tel: 86-532-8502-7355 Fax: 86-532-8502-7205 China - Shanghai Tel: 86-21-5407-5533 Fax: 86-21-5407-5066 China - Shenyang Tel: 86-24-2334-2829 Fax: 86-24-2334-2393 China - Shenzhen Tel: 86-755-8203-2660 Fax: 86-755-8203-1760 China - Shunde Tel: 86-757-2839-5507 Fax: 86-757-2839-5571 China - Wuhan Tel: 86-27-5980-5300 Fax: 86-27-5980-5118 China - Xian Tel: 86-29-8833-7250 Fax: 86-29-8833-7256
ASIA/PACIFIC
India - Bangalore Tel: 91-80-2229-0061 Fax: 91-80-2229-0062 India - New Delhi Tel: 91-11-5160-8631 Fax: 91-11-5160-8632 India - Pune Tel: 91-20-2566-1512 Fax: 91-20-2566-1513 Japan - Yokohama Tel: 81-45-471- 6166 Fax: 81-45-471-6122 Korea - Gumi Tel: 82-54-473-4301 Fax: 82-54-473-4302 Korea - Seoul Tel: 82-2-554-7200 Fax: 82-2-558-5932 or 82-2-558-5934 Malaysia - Penang Tel: 60-4-646-8870 Fax: 60-4-646-5086 Philippines - Manila Tel: 63-2-634-9065 Fax: 63-2-634-9069 Singapore Tel: 65-6334-8870 Fax: 65-6334-8850 Taiwan - Hsin Chu Tel: 886-3-572-9526 Fax: 886-3-572-6459 Taiwan - Kaohsiung Tel: 886-7-536-4818 Fax: 886-7-536-4803 Taiwan - Taipei Tel: 886-2-2500-6610 Fax: 886-2-2508-0102 Thailand - Bangkok Tel: 66-2-694-1351 Fax: 66-2-694-1350
EUROPE
Austria - Wels Tel: 43-7242-2244-399 Fax: 43-7242-2244-393 Denmark - Copenhagen Tel: 45-4450-2828 Fax: 45-4485-2829 France - Paris Tel: 33-1-69-53-63-20 Fax: 33-1-69-30-90-79 Germany - Munich Tel: 49-89-627-144-0 Fax: 49-89-627-144-44 Italy - Milan Tel: 39-0331-742611 Fax: 39-0331-466781 Netherlands - Drunen Tel: 31-416-690399 Fax: 31-416-690340 Spain - Madrid Tel: 34-91-708-08-90 Fax: 34-91-708-08-91 UK - Wokingham Tel: 44-118-921-5869 Fax: 44-118-921-5820
10/31/05
DS01021A-page 12