PICs for my PICKIT2 - Page 1
Forum section: electronics / general

author: metrologist
author_rank: Super Contributor
timestamp: June 28, 2016, 08:19:44 pm
content: What are good chips to use with PICKIT2? Looking for a short list of the higher end chips and some with 10 bit ADC/DAC.I bought the kit years ago, but just got caught up with Arduino, so looking to move from the 328p.

author: dannyf
author_rank: Super Contributor
timestamp: June 28, 2016, 08:44:59 pm
content: Check out the supported device list and pick from that.I would suggest that anything less than a pic24 is a big step back from your avr.

author: Howardlong
author_rank: Super Contributor
timestamp: June 28, 2016, 08:51:00 pm
content: Quote from: metrologist on June 28, 2016, 08:19:44 pmThere's a list of supported devices herehttp://ww1.microchip.com/downloads/en/DeviceDoc/PICkit%202%20Readme%20v2-61-00%20(a).txtAnything released in about the last five years isn't on that list.DAC will be the hard part.dsPIC33FJxxGS parts look the most likely correlation wih thishttp://ww1.microchip.com/downloads/en/DeviceDoc/30010109B.pdf

author: JPortici
author_rank: Super Contributor
timestamp: June 28, 2016, 08:51:40 pm
content: pic16f1823/47, pic16f1936many dspics, too

author: Howardlong
author_rank: Super Contributor
timestamp: June 28, 2016, 08:58:17 pm
content: Quote from: JPortici on June 28, 2016, 08:51:40 pm10 bit DAC though on PIC16 -and- supported by PICkit 2?Also to the OP, check that the DAC is exposed to the pins if you need it (frequently they are only available internally for comparators). Even then, you may well need to buffer them.

author: MarkF
author_rank: Super Contributor
timestamp: June 28, 2016, 09:15:26 pm
content: Here is the newest "Device File" I've been able to find. It has been updated by PICkit2 users.

author: JPortici
author_rank: Super Contributor
timestamp: June 28, 2016, 09:45:32 pm
content: eh, the PK2 is old.Rumors are that you can still add all the new 8 and 16 bit parts but i never investigated how.the only 8 bit parts with 10 bit dac are the pic16f17xx but they are only supported by PICKIT3/ICD3for 16 bit i suggest you cross reference the latest device list and the catalog. there are for sure some with 8 bit dac, not sure about 10,12,16the pics i mentioned before would be my go-to if i was forced to use a pickit 2. also PIC16F15xx for a lower cost variant

author: MarkF
author_rank: Super Contributor
timestamp: June 28, 2016, 09:52:12 pm
content: You can add new parts to the PICkit2 with the "PICkit2 Device File Editor". I can't remember where I got it. So, I attached the version I downloaded.

author: ebclr
author_rank: Super Contributor
timestamp: June 28, 2016, 09:55:42 pm
content: Don't do that , ins't worth your time and dedication , buy a discovery board insteadhttp://www.st.com/content/st_com/en/products/evaluation-tools/product-evaluation-tools/mcu-eval-tools/stm32-mcu-eval-tools/stm32-mcu-discovery-kits/stm32f4discovery.htmlAvoid to be a "prisioner" of only one supply who have the higher cost development board and parts on the market. Go to the place where you will be supported for many different sources competing , and you will be the winner.

author: ovnr
author_rank: Frequent Contributor
timestamp: June 28, 2016, 10:01:17 pm
content: Quote from: ebclr on June 28, 2016, 09:55:42 pmYou really seem to have a hate on for Microchip, ebclr. Why?

author: ebclr
author_rank: Super Contributor
timestamp: June 28, 2016, 10:05:15 pm
content: I didn't hate I played a lot with microshit and this terrible compiler, but times passes and now it's clear arm is a much better option

author: dannyf
author_rank: Super Contributor
timestamp: June 28, 2016, 10:25:36 pm
content: Pics are much easier tto get started than the arm chips. And have a big code base to draw upon.Arm chips offer much better value for your money.A good compromise is msp432 if you have background in msp430.Or lpc11 if you had lnp21xx experience.

author: JPortici
author_rank: Super Contributor
timestamp: June 28, 2016, 10:31:48 pm
content: again, when was the last time you actually used a dspic or a pic32?i damn each day i am forced to look at a STM32 datasheet

author: macboy
author_rank: Super Contributor
timestamp: June 28, 2016, 11:13:28 pm
content: Quote from: dannyf on June 28, 2016, 08:44:59 pmThat is true. The ATMega328P is 16 MHz and 16 MIPS. Lots of FLASH and RAM (32, 2 kB). PICs in the 16/18 series are mostly under 16 MIPS and have less memory, so at best you will be at par with the ATMega. You definitely need to go to PIC24 to move up, but it can be a good step up, with 16 bit native data size and more speed and memory. You can even find 5 V PIC24 if you want.Don't feel held back by Arduino. For one thing, you can get much more powerful Arduinos (and clones) than the '328 based ones. Also, if you get under the hood a little, you can really supercharge a lot of the software environment, such as using interrupt directly, accessing registers directly for peripherals and I/O ports, bypassing the slow digitalWrite function, etc. There are limitations in the Arduino run time environment but none of it is written in stone. It is just software after all.

author: stj
author_rank: Super Contributor
timestamp: June 29, 2016, 01:48:42 am
content: Quote from: macboy on June 28, 2016, 11:13:28 pmactually it's 20MHz and 20MIPS

author: macboy
author_rank: Super Contributor
timestamp: June 29, 2016, 02:20:31 am
content: Quote from: stj on June 29, 2016, 01:48:42 amTo be pedantic, as used in Arduino as the OP is talking about, it's 16 MHz.

author: metrologist
author_rank: Super Contributor
timestamp: June 29, 2016, 03:20:50 am
content: Thanks folks. Just to qualify, I'm not really an Arduino "graduate" but have run into some limitations using its abstraction. I dug out my pickit 2 and went rooting around for the IDE, then realized why I had forgotten about it. All that was on my old PC. Some of the chip naming conventions are coming back to me and I also found a few pic18lf14k50 chips I bought a while back, including a couple dsPIC303012 and slow 12-bit dacs. I'm going to have to run the crash course again before I can do anything and will look into getting a few more staples.

author: obiwanjacobi
author_rank: Super Contributor
timestamp: June 29, 2016, 04:56:25 am
content: I had the same 'issue' with Arduino. I opted for going deeper into the bare metal of the ATmega chips using Atmel Studio (Windows). I configured the avrdude-command line in the tools menu to program it - basically the same command line the Arduino IDE uses.

author: stj
author_rank: Super Contributor
timestamp: June 29, 2016, 05:26:29 am
content: pickit2 can program AVR's with AVRdude.incase you didnt know.

author: Brutte
author_rank: Frequent Contributor
timestamp: June 29, 2016, 07:01:47 am
content: Most PIC32 are serviced (debug + program) by PICKit2 via ejtagproxy.

author: hans
author_rank: Super Contributor
timestamp: June 29, 2016, 09:09:45 am
content: Another discussion about PIC32 derailed to STM32 and ARM.Answering OP's question (with his intention to use his PICKIT2 in an useful manner):I would strongly recommended skipping 8-bit PIC's. Compared to AVR's it's probably several steps backwards.PIC24 is much more sane and alike AVRs.One of my alltime favourite PIC24's is still the PIC24FJ64GB002/004. However unfortunately you can't debug it with PICKIT2 (need to program it via standalone utility).Maybe look at the PIC24HJ128GP502; it seems to be supported in MPLAB. It's also 40MIPS and has a 12-bit ADC, but doesn't have an USB peripheral.There are also some neat chips in the dsPIC series; but don't expect dsPICs to magically run faster. They have separate DSP instructions which you must program to be of use. In all other aspects they are basically PIC24s.DAC's are uncommon on PIC's, or only available on the much newer ones.You can program PIC32's too with either the ejtagproxy or some via the PICKIT2 standalone utility. I believe thePIC32MX3xx and PIC32MX4xxare supported. Don't fall for the 100MHz PIC32MX450 etc. ones; they are from a much more recent series which are not supported. E.g. PIC32MX440F512HAll other PIC series are not supported by PICKIT2 natively.The device file that has been posted earlier is for use in the standalone program. You need to replace the .dat file in the programs folder to make device definitions available.I'm unaware that the newer parts can be added. I think they use a different ICSP protocol or FLASH programming scheme and will not work.

author: dannyf
author_rank: Super Contributor
timestamp: June 29, 2016, 12:59:28 pm
content: "have run into some limitations using its abstraction"Not sure the nature of your problems with arduino. But you do realize that you can code your arduino boards with a full fledged C compiler, either separately in an ide or in the arduino ide. So the abstraction should never be an issue even within the arduino environment.

author: Howardlong
author_rank: Super Contributor
timestamp: June 29, 2016, 01:56:34 pm
content: Quote from: hans on June 29, 2016, 09:09:45 amIndeed, it is rather tiresome and fruitless. The OP is asking about "PICs for my PICkit2".QuoteI am not sure that the OP has a requirement for USB? Requirements were 10 bit ADC & DAC.QuoteI'd agree with all that.In the meantime, here's a supported list covering the original criteria where DACs are available on physical pins (I am making that final assumption, Many PICs have DACs only available internally for comparators).

author: Ian.M
author_rank: Super Contributor
timestamp: June 29, 2016, 03:34:53 pm
content: I've put together a list of PICkit 2 supported PICs with full data from the Microchip parametric search page. See attached spreadsheet in Excel 97 format.I've added a couple of extra columns:-'MPLAB PK2 Support' - if its 'No' you need to use the standalone application with the unofficial1.63.146device file.'PK2 Debug / Header' - If its 'Yes' you can debug the PIC directly, if a debug header is listed, you need it, unless it is marked * which are optional headers.N.B. All errors in the specs. are down to Microchip's buggy parametric search/device selector database - *ALWAYS* check the actual datasheet and errata before purchaseIf you add a column titled 'Web', enter:Code:=HYPERLINK("http://www.microchip.com/wwwproducts/Devices.aspx?product="&TRIM(A2),"")in the first cell below the title and fill down, you can click the '' to jump directly from Excel to the product page for that PIC for easy access to the datasheet.H.T.H.

author: metrologist
author_rank: Super Contributor
timestamp: June 29, 2016, 03:49:29 pm
content: Thanks All.Howard, the dsPIC33FJ64GP802 looks most attractive.Thanks for the Excel spreadsheet too as that makes finding a featured chip much easier.

author: bktemp
author_rank: Super Contributor
timestamp: June 29, 2016, 03:54:27 pm
content: dsPIC33FJ64GP802 is a great little chip: DIP28, 16kByte SRAM, lots of peripherals with pin multiplexers.The DAC is a delta-sigma audio dac needing a constant data stream, but it is probably one of the worst audio dacs ever (only 61dB SNR).

author: MarkF
author_rank: Super Contributor
timestamp: June 29, 2016, 11:03:58 pm
content: Quote from: Ian.M on June 29, 2016, 03:34:53 pmF.Y.I. The unofficial device file that I posted earlier is version 1_63_148 for use with the standalone application.

author: Ian.M
author_rank: Super Contributor
timestamp: June 30, 2016, 12:47:10 am
content: Developing on parts you cant debug is a 'hair shirt' experience so I'd strongly recommend the O.P. restricts himself to parts with MPLAB PICkit 2 debug support, without an expen$ive mandatory debug header. The standalone app part support list was included for completeness - if you want to seriously develop on the newer parts, for %DEITY%'s sake and your own sanity, invest in a PICkit 3!However for those determined to proceed with the old-skool build-burn-crash development cycle, Device file 1.62.148 is probably fine as well, but the trouble with unofficial device files is "Who maintains the version number and functionally tests them?" The 1.63.146 version I linked to is hosted by AU Group Electronics, a noted PICkit 2 clone and improved compatible programmer manufacturer that was actively involved with Microchip in extending the capabilities of the standalone PICkit 2 application, so is more trustworthy than many.If you have a supposedly newer version of PK2DeviceFile.dat, one needs to dump it with Jeff Post'sDat2Textutility or with PK2CMD -?P to find out what it supports (and then hope the new devices actually work and no-one's goofed and broken any of the old devices).

author: MarkF
author_rank: Super Contributor
timestamp: June 30, 2016, 03:24:16 am
content: Quote from: AcHmed99 on June 30, 2016, 12:26:27 amI haven't added any parts at all. I did however modify one part that was entered incorrectly.The device file I uploaded has the following parts:PIC16F1782 PIC16LF1782PIC16F1783 PIC16LF1783PIC16F1784 PIC16LF1784PIC16F1786 PIC16LF1786PIC16F1787 PIC16LF1787

author: MarkF
author_rank: Super Contributor
timestamp: June 30, 2016, 03:31:21 am
content: Quote from: Ian.M on June 30, 2016, 12:47:10 amThe zip file for version 1.163.148 has both the PI2DeviceFile.dat and a html file with the parts list with the following notes"Added PIC16F527, PIC16(L)F145x,PIC12F501,PIC16(L)F1508/1509, 18F26K80-66K80, 18F J13, 18F J53".I have both PICkits and the biggest drawback I see is that the PICkit3 can NOT supply enough power to program most PICs.

author: Howardlong
author_rank: Super Contributor
timestamp: June 30, 2016, 05:58:25 am
content: QuoteI've never encountered that. Is this in circuit or standalone? Which devices have that problem?

author: MarkF
author_rank: Super Contributor
timestamp: June 30, 2016, 11:43:33 am
content: I was using a pic18f2550 in-circuit. However, the supply for the PIC and the rest of the circuit are separate just to avoid the problem. After re-reading the spec, the programming mode and run mode have different current requirements. Maybe, the PIC can be programmed by the PICkit3 and I didn't realize it at the time. I need to try it again.I wonder now if it can be debugged with the PICkit3 since it can't supply the running current?

author: Ian.M
author_rank: Super Contributor
timestamp: June 30, 2016, 12:05:24 pm
content: You shouldn't have any problems debugging a PIC running on external power, provided the ICSP/ICD pins are dedicated and there is no voltage difference between Vss and PC chassis.However when you debug a PIC18F2550 or other USB PIC with an active USB device interface, you cant single step or successfully resume execution after a breakpoint as the host's USB stack will have timed out due to failure of the PIC device to respond while being held by the debugger. Its fine for post-mortem analysis e.g inspecting memory after a crash. Usually disconnecting the PIC's USB interface, resetting it and reconnecting the USB will allow you to continue the debug session, but worst case, if you are unlucky with the exact timing and your host drivers, you may even need to reboot the host PC.