Programming 16F1705 with MPLab 8.92

Discussion in 'Embedded Systems and Microcontrollers' started by jpanhalt, Aug 30, 2016.

  1. jpanhalt

    Thread Starter AAC Fanatic!

    Jan 18, 2008
    5,699
    907
    Can the 16F1705/9 family be programmed using MPlab 8.92 and ICD3? The only device choices in configure are 16F1704 and 16F1708; both show a red button for ICD3.

    If so, how?

    Plan B is the 16F1783, which shows with a green button. Right now, all I want is the 8-bit DAC.

    Thanks, John
     
  2. OBW0549

    Well-Known Member

    Mar 2, 2015
    1,328
    890
    Somewhere in the Release Notes for MPLAB 8.92 there should be a list of Supported Devices. That might shed some light on the matter.
     
    jpanhalt likes this.
  3. jpanhalt

    Thread Starter AAC Fanatic!

    Jan 18, 2008
    5,699
    907
    The last release od MPLab was June'ish 2013 (i.e., 8.92). That chip is not supported per se (i.e., it is not in the configure drop-down menu).

    I was wondering whether anyone has found a work-around, because installing MPLabX can be a disaster if one ever decides to go back to MPLab 8.x. I don't believe you can have both on the same machine at the same time, and once you install MPLabX, you may not be able to get MPLab 8.x working again.

    I did try MPLabX a few years ago when it came out and found it was almost impossible to do Assembly code with it. System = Pentium Quad core + WinXP SP2 at that time. As they say, once burned, twice shy.

    I am very anxious to get something with an 8-bit DAC included as a peripheral, so I went ahead and ordered the 16F1783 that is supported and should have it by the weekend. Shipping, of course, cost more than the 3 chips.

    The post here was sort of a last gasp, as the Microchip forums have nothing on the subject, except moaning about the demise of 8.92 by those who still use Assembly.

    BTW, you can still code and compile the code for the 16F1705 using the .inc file from MPLabX. That is what I have done. It even simulated (MPLab SIM), but I ran into a brick wall when trying to program.

    John
     
  4. joeyd999

    AAC Fanatic!

    Jun 6, 2011
    2,693
    2,765
    I run MPLAB under a VirtualBox WinXP VM, and I installed MPLabX native in Linux. Impossible for them to interact.

    I think I tried about 3 years ago. I wrote here about my exploits. I haven't tried since. I hope things have improved, because there are new 18F parts that I want to take for a spin.
     
    jpanhalt likes this.
  5. OBW0549

    Well-Known Member

    Mar 2, 2015
    1,328
    890
    I had similar difficulties with MPLAB X; it lasted about a week on my Mac before I un-installed it. Similar troubles with MPLAB 8.92 and new chips, also. There are a couple of the newer dsPIC33EP chips I've wanted to play with, but 8.92 doesn't support them and I haven't been able to figure out a workaround. But being retired, "playing" is all I do anymore so it's no big deal; I can just stick with the dsPIC33EP chips 8.92 does support.
     
    jpanhalt likes this.
  6. JohnInTX

    Moderator

    Jun 26, 2012
    2,348
    1,029
    I run MPLAB 8.63 and MPLABX on the same Win7-64 box all the time. You have to be careful to change the drivers for RealICE, PICkit et. al. using MPLAB Driver Switcher in administrator mode but besides that, it works fine. That said, I don't know about the later editions of 8.x. We stopped MPLAB 8 at 8.63 then jumped to X.

    On some older parts, I prefer to compile on X then source-level debug on 8.63. - usually for parts that have a non X-supported debugger. For that, I build to a .COF file under X then import it to 8.x. Once the project is set up, changes to the source on X will be reflected in 8.x automatically when the .COF is changed.

    FWIW, I've ported several older assembler projects to X with minimal problems. While the incentive for doing so was to move clients to X (the 'future!'), I always rebuilt the code under X and compared the .HEX to what was built under 8.x. I never encountered any differences. Maybe it's different under MAC and Linux.

    8.xx is dying. It's good to keep around for older stuff but if you are going to stay in PIC and use the new stuff, it's going to have to be X.

    As far as an 8.xx work around, if the button is RED, I think you are sunk. Even if you sleaze the code into another PIC type, the programmer will object to the device code when you try to program it - and rightly so. Different chips have different programming parameters...

    YMMV
     
    Last edited: Aug 30, 2016
    atferrari and jpanhalt like this.
  7. joeyd999

    AAC Fanatic!

    Jun 6, 2011
    2,693
    2,765
    Just went to Microchip to download latest version of X, and I see this:

    MPLAB X IDE – Same Functionality, New Look
    With the latest version of MPLAB X IDE comes a redesigned interface to help you better navigate through this powerful tool. View the changes:

    Ahhh....already changing the "look & feel", for the sake of it.

    One of the reasons I like the old MPLAB so much: it never changes.
     
    jpanhalt and ErnieM like this.
  8. joeyd999

    AAC Fanatic!

    Jun 6, 2011
    2,693
    2,765
    Just install v3.35. OMG! It understands Git -- automatically. How neat.

    Still can't recognize assembler labels as register addresses, though. Still useless for me.
     
  9. atferrari

    AAC Fanatic!

    Jan 6, 2004
    2,652
    768
    Hola John

    Hapenned to me with a recent micro from the 18F family: I could do everything but program it with Picstart Plus. Is it your case?
     
    jpanhalt likes this.
  10. jpanhalt

    Thread Starter AAC Fanatic!

    Jan 18, 2008
    5,699
    907
    Thank you all for the quick responses and advice. I simply did not appreciate the difficulties in burning hex code into similar chips and was somewhat shocked that the 16F1704/08 were shown as supported in MPLab8.92 but not by any of the programmers listed in the configure>select drop-down menu! Talk about being up a river without a paddle. Some of those red-dotted programmers (e.g. ICD3) are marketed as supporting all of the chips.

    @JohnInTX
    Thank you especially for the comments regarding MPLabX. I was unaware of how to deal with the driver issue. The comments by WP100 (an experienced user on ETO) scared me off. Without your advice, I would probably have found myself in the same boat. Since I mostly use just ICD3, that looks like a workable though somewhat awkward solution. I can live with it. From what you say, it appears that Microchip does not provide a single platform that supports all of its chips and has built in incompatibilities between the platforms that do support them.

    My immediate solution is to write some simple test code for the 16F1829. It has a 5-bit DAC, and I have used that chip a lot recently. That will allow me to test a breadboarded oscillator I am building. A 16F1783, which is the only version 16F178x series that DigiKey had in stock, is in the mail to me. That may not be my first chice, but at least it works at 32 MHz, has an 8-bit DAC, and is supported by MPLab8.92. It will suffice for the time being.

    Ultimately, I will try to get both development platforms on my PC (Win7, 64/32 bit). That will be this Winter when I have more spare time.

    John
     
    JohnInTX likes this.
  11. jpanhalt

    Thread Starter AAC Fanatic!

    Jan 18, 2008
    5,699
    907
    UPDATE:
    The DAC on the 16F1829 works fine. What a nice toy.

    DS1Z_QuickPrint1.png

    I just made a meainingless stepped rise with slower fall, delay, then a blip and some noise. I suspect this might be a very crude, unscaled representation of a lightning bolt followed by the return strike. Here are the values that were plotted above (decimal, 31 = maximum)

    Code (ASM):
    1.  
    2. DAC_table
    3.      brw
    4.      dt   15,19,23,27,27,27,27,27,26,25
    5.      dt   24,23,22,21,20,19,18,17,16,15
    6.      dt   14,13,12,11,10,9,8,7,6,5
    7.      dt   4,3,2,1,0,0,0,0,0,0              
    8.      dt   0,0,0,0,0,0,0,0,0,0
    9.      dt   0,0,0,0,27,27,0,0,1,2    
    10.  
    My 8-bit DAC 16F178x comes tomorrow.

    John
     
  12. JohnInTX

    Moderator

    Jun 26, 2012
    2,348
    1,029
    @jpanhalt FWIW, MPLABX supports all of the 16F1xxx chips you mention with full support for ICD3. X is a different animal than 8.x and takes some getting used to but the more I use it, the more I like it and the easier it gets. It has some nice stuff. It also has some bugs but that's getting better too.

    While uCHIP doesn't obsolete chips, they DO drop support for development gear that can't support new chips. I'm in the process of dumping some old emulators etc. and that hurts $$wise but in reality, some of the new dev hardware like the -ME2 debug headers for the 16F1xxx stuff are really good, cheap and run on the target hardware rather than an emulator bond-out chip with its own set of unique bugs..

    In any case, if you are going to use the cool new PICs, you'll have to move on to X eventually. It's really not as bad as some would have you believe..

    Good luck!
     
  13. jpanhalt

    Thread Starter AAC Fanatic!

    Jan 18, 2008
    5,699
    907
    An idle mind...
    DS1Z_QuickPrint3.png

    John
     
    JohnInTX and OBW0549 like this.
Loading...