element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Microchip
  • Products
  • Manufacturers
  • Microchip
  • More
  • Cancel
Microchip
Forum PIC18LF
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Microchip to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 9 replies
  • Subscribers 19 subscribers
  • Views 1369 views
  • Users 0 members are here
Related

PIC18LF

Former Member
Former Member over 14 years ago

Hi, i'm using PIC18F46J50, and i try to remplace it by PIC18LF46J50. But my ICD3 can't connect to it correctly. It tell me "target device ID (000000000) does not match expected Device ID (00004ca0)".

What must i change in my code for assure adaptation?

 

Thanks

 

Best regards

 

Yann

  • Sign in to reply
  • Cancel
  • MicrochipRTCfr
    MicrochipRTCfr over 14 years ago

    Hi,

     

    If you move from PIC18F46J50 to PIC18LF46J50, you need to select PIC18F46J50 in the MPLAB menu : Configure > Select Device > PIC18F46J50

    Unlike older PIC18, there are some significant differences between the F and LF versions and there MPLAB offers exact reference.

    In your project, make sure to change the dedicated header file to p18lf46j50.h

    Make sure to use latest MPLAB version (v8.56 currently) which can be downloaded free of charge here

     

    Regards

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 14 years ago in reply to MicrochipRTCfr

    Thank you,

     

    I've try your solution but i have the same error message, i think that it's hardware problmem. Must I change hardware to move from F to LF version?

    I don't measure any voltage on Vdd Core when I supply my PIC (I've 10µF between VddCore and GND). Maybe my PIC it's KO...

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • MicrochipRTCfr
    MicrochipRTCfr over 14 years ago in reply to Former Member

    Hi,

     

    The problem is in your hardware. The reason is that PIC18F45J50 & PIC18LF45J50 are not electrically compatible (check the end of the datasheet).

    The F version has an internal LDO but the LF does not.

    So some changes are needed in the hardware if you migrate from F to LF and vice versa.

     

    If you have put a PIC18LF45J50 in a PIC18F45J50 circuit, it may have been destroyed (it depends of your Vdd power supply level)

     

    regards

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 14 years ago in reply to MicrochipRTCfr

    I only need to add 2,5V external VDO on VddCore? All µC functions will be concerved?

     

    Best regards

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • MicrochipRTCfr
    MicrochipRTCfr over 14 years ago in reply to Former Member

    Hi,

     

    These 2 chips are functionally compatible BUT not electrically.

    It is very important to carefully read the electrical characteristics ( chapter 29 ).

    External power supply is necessary for the PIC18LF46J50. 2.5V should be OK (spec is between 2V and 2.75V)

     

    regards

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 14 years ago in reply to MicrochipRTCfr

    Thank you very much for your help, I've connect succesfully ICD to PI18LF version.

    But i've an other problem, I've make my code from Microchip eval kit who use linker file, and it never call "p18f46j50.h". when i try to compile my code (with or without "p18Lf46j50.h"), I always have memory regions errors:

     

    Programming...
    The following memory regions failed to program correctly:
    Program Memory
    Address: 00000006 Expected Value: 00000012 Received Value: 00000014
    Programming failed

     

    Have you an idea of the problem?

     

    Best regards

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • MicrochipRTCfr
    MicrochipRTCfr over 14 years ago in reply to Former Member

    Brilliant Yann,

     

    If I understand well, you get a proper connection message between ICD3 and your board.

     

    In which mode are you operating (Debugger or Programmer) ?

     

    Which MPLAB version do you use ?

     

    Can you check if everything is correct using MPLAB by doing this : Debugger > Settings > Status tab > push "Refresh Voltages" button.  Which voltages do you see ?

     

    The xxxx.h file is not a linker file. It is a header file. It does not matter if you put it in your project tree or not. It only matters to have an "include" instruction a the beginning of your C source file.

    The linker file is not necessary.

     

    My guess at this stage is that your project may have some issues (maybe configuration bits) ?

     

    OR your issues are due to the low programming / erasing voltage of your application. What is your current Vdd ? and Vpp ?

     

    Without seeing your circuit and SW I cannot make any further guess at this stage ...

     

    Regards

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 14 years ago in reply to MicrochipRTCfr

    Connection between ICD and board is good, and i operate in programmer mode. I use v8.36 of MPLAB.

    My voltages are

    VPP 3.12

    VDD 3.42

    Target VDD 3.25.

     

    In fact, I've made my code for 18f46j50 and it's OK, but for stock problems, I try to know if this same code could be programmed in LF version without change everything.

    I use in my code CTMU and USB stacks.

     

    I've seen #include    "p18cxxx.h" in CTMU files , and my main call #include "HardwareProfile - PIC18F46J50 PIM.h"

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • MicrochipRTCfr
    MicrochipRTCfr over 14 years ago in reply to Former Member

    Hi,

     

    Where are you based ?

    So your current issue is sourcing the parts ?

    Did you try the following official distributors (some of them do have stock on some package variations of the PIC18F45J50 ) :

     

    http:www.microchipdirect.com  (Microchip online store)

    Farnell

    RS components

    DigiKey

    Mouser

    ...

     

    regards

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube