PBP Support for 12F1840 8-Pin Device?


Closed Thread
Results 1 to 18 of 18
  1. #1
    Join Date
    Apr 2011
    Posts
    6

    Default PBP Support for 12F1840 8-Pin Device?

    Greetings - I've been using PBP V2.50/V2.60C for about two years, mostly with 16F886 devices. I would like to try the new Microchip 12F1840 8-pin part, but it is not listed as a supported device when using MicroCodeStudio and PBP V2.60C. Do I need to wait for another PBP patch before I can use the 12F1840 part? Not sure what to do.
    Thank-you for making this forum a wonderful resource.

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default Re: PBP Support for 12F1840 8-Pin Device?

    The 12F1840 is not even in production yet.

    Microchip is sampling them, but that's all.
    Production quantities are expected by late July or August.
    We just got samples a couple days ago.

    They will be added to PBP in the next version.
    DT

  3. #3
    Join Date
    Apr 2011
    Posts
    6


    Did you find this post helpful? Yes | No

    Default Re: PBP Support for 12F1840 8-Pin Device?

    Darrel - Thank-you very much for the reply. I ordered and received some 12F1840 devices from Mouser back in mid-April, so I didn't realize they were not in production. No worries, I can wait, and at least now I know support is coming for the part. You rock as always.

  4. #4


    Did you find this post helpful? Yes | No

    Default Re: PBP Support for 12F1840 8-Pin Device?

    I emailed PBP support re this matter a few weeks ago and they replied that they though code compilied for another pic would run on it. I will post details later I don't have access to it here. I think the issues were that the suggested pic has more ports, so as long as you didn't try to use them then hex code for the substitute pic may/should work on the 12F1840.

    I also spoke to piccircuit .com who make a neat cheap pickit 2 clone and they sent me a file to allow the pickit 2 software to work with the new device.

    I'll post details later.

  5. #5


    Did you find this post helpful? Yes | No

    Default Re: PBP Support for 12F1840 8-Pin Device?

    This is the reply i got from Charles Leo

    The datasheet wasn't available in time for our last PBP revision, and another revision isn't planned for few months.

    It looks to me like the part is identical to the 16F1828, with the exception of a few missing ports. I think you can compile for the 1828 and the hex file will work for the 1840. Let me know if you encounter any compiler or assembly errors and I will look into it.

    Programming support for the 1840 has already been added to the meProg software for the programmers.

    Charles Leo
    microEngineering Labs, Inc.
    2845 Ore Mill Road STE 4
    Colorado Springs, CO 80904
    719-520-5323
    fax: 719-520-1867
    http://melabs.com
    This is the reply i got from Piccircuit.com

    Hi,

    Thanks for checking with us.
    For the PIC12F1840, you might need to install the attached patch to enable the PIC12F1840 programming
    Please apply the patch at C:\Program Files\Microchip\PICkit 2 v2>PK2DeviceFile.dat
    Then the PIC12F1840 should be detected by the PICkit2.
    Please let us know the testing results on our solutions. We will try our best to help you.

    Best Regards,
    PICCIRCUIT.COM
    Patch attached

    PK2DeviceFile.zip

  6. #6
    Join Date
    Apr 2011
    Posts
    6


    Did you find this post helpful? Yes | No

    Default Re: PBP Support for 12F1840 8-Pin Device?

    Retepsnikrep (Peter?) - Thank-you for taking the time to post the added info. When I get my test board together, I will certainly give it a shot - Very much appreciated.

  7. #7
    Join Date
    Feb 2010
    Posts
    30


    Did you find this post helpful? Yes | No

    Default Re: PBP Support for 12F1840 8-Pin Device?

    Hello , did you finally managed to play with the 12F1840 ?

    I mean you used 12F1822 Hex ?

    But i think Microcode Studio wouldn't give error (and quit) when try to write more than 2048 words ?

    I need the 12F1840 for the 4K space ....

  8. #8
    Join Date
    Apr 2011
    Posts
    6


    Did you find this post helpful? Yes | No

    Default Re: PBP Support for 12F1840 8-Pin Device?

    LakisFM1 - Yes, I have been playing with the 12F1840 for a while now. I only used very small programs for the 12F1840 until I purchased PBP3 that had full support for it. The advice I got here on the forum was to use the 16F1828 include file to allow me to compile code for the 12F1840, using PBP2.60. The steps I used are below.
    1. Get latest PICKIT2 programmer firmware that supports programming 12F1840.
    2. Modify "16F1828.inc" file to allow using Internal Oscillator and other options you want
    3. I used PBP 2.60C with MicroCode Studio Plus V4.0.0.0
    4. Create NEW program in Microcode Studio Plus for your 12F1840 (mine were very simple)
    5. In Microcode Studio Plus, Choose Device = "16F1828"
    6. Compile using MPASM
    7. Open PICKIT2 application, select device "12F1840", then program device with your HEX file.

    Once I got PBP3, compiling for 12F1840 works fine with no special tricks needed.
    Maybe the above steps can help somebody who wants to try using PBP2.x with 12F1840, but I am very pleased with PBP3.
    Sorry I have not used 12F1822.

  9. #9
    Join Date
    Feb 2010
    Posts
    30


    Did you find this post helpful? Yes | No

    Default Re: PBP Support for 12F1840 8-Pin Device?

    Would it be too much if i ask you to attach the modified .inc file ?

    Thank You in any case !

  10. #10
    Join Date
    Apr 2011
    Posts
    6


    Did you find this post helpful? Yes | No

    Default Re: PBP Support for 12F1840 8-Pin Device?

    LakisFM1 - I will try to attach the one I used, along with a very short example program. Hope you find it useful.
    Attached Files Attached Files

  11. #11
    Join Date
    Feb 2010
    Posts
    30


    Did you find this post helpful? Yes | No

    Default Re: PBP Support for 12F1840 8-Pin Device?

    Thank you!

    I thought the differences in the .inc were also about the registers ,
    so i had to verify that aaaaaall the registers of the 12F1840 are in same addresses as the 16F1828.

    Or maybe is it you are using a simple TRISA/PORTA? (em, with also ANSELA,WPUA and OSCON )

  12. #12
    Join Date
    Apr 2011
    Posts
    6


    Did you find this post helpful? Yes | No

    Default Re: PBP Support for 12F1840 8-Pin Device?

    LakisFM1 - Yes, I was only doing very simple things with the 12F1840 and PBP2.6. I really just did Port toggle control and some simple PWM. All my programs were very short, mostly used to check out my handmade test board with a real 12F1840. You have my .inc and simple program, and I didn't do much more than that until PBP3 came out.
    If you are serious about using PBP with the 12F1840, then I think PBP3 is a must for you. It will make your life a lot easier. No matter what you do, the 16F1828 is not a 12F1840.
    Sorry I don't have more for you.

  13. #13
    Join Date
    Dec 2010
    Posts
    409


    Did you find this post helpful? Yes | No

    Default Re: PBP Support for 12F1840 8-Pin Device?

    So did we ever get an update to support this device in PBP 2.6?

  14. #14
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,614


    Did you find this post helpful? Yes | No

    Default Re: PBP Support for 12F1840 8-Pin Device?

    Quote Originally Posted by Charlie View Post
    So did we ever get an update to support this device in PBP 2.6?
    PBP is now @ v 3.06 ...
    see here : http://pbp3.com/downloadtrial

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  15. #15
    Join Date
    Dec 2010
    Posts
    409


    Did you find this post helpful? Yes | No

    Default Re: PBP Support for 12F1840 8-Pin Device?

    Thanks Alain, but the price is a bit out of my range to simply support a single new device.
    I'm not asking for more development on 2.6, I'm asking if it was ever done.

  16. #16
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,614


    Did you find this post helpful? Yes | No

    Default Re: PBP Support for 12F1840 8-Pin Device?

    Quote Originally Posted by Charlie View Post
    Thanks Alain, but the price is a bit out of my range to simply support a single new device.
    I'm not asking for more development on 2.6, I'm asking if it was ever done.
    I WIN !!!

    so, you just have to create the relevant "include" files from some existing similar ones ... libraries are open.

    nowhere, nobody works for free ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  17. #17
    Join Date
    Dec 2010
    Posts
    409


    Did you find this post helpful? Yes | No

    Default Re: PBP Support for 12F1840 8-Pin Device?

    I might do that... is it just the include files?
    How do I get it in the pull down list of devices?

  18. #18
    Join Date
    Feb 2010
    Posts
    30


    Did you find this post helpful? Yes | No

    Default Re: PBP Support for 12F1840 8-Pin Device?

    springtank's solution worked for me totally fine on pbp 2.6 (Thanks one more time!)

    A compiled .hex file of 1822 , also worked 'as is' on the 1840!

    I used many registers in my program (can't remember now) ,
    and i remember first ,i compared the two pic memory maps (18f40 and 16f628) and were same ,
    the only differences were the extra registers on the bigger pic.

    ps. don't expect to get '18F40' on pull down list , just use springtank's guide.
    Last edited by LakisFM1; - 10th November 2012 at 08:34.

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts