PIC with the simplest instruction set that can be programmed by an ICD2 - Page 1
Forum section: electronics / general

author: Fusion916
author_rank: Regular Contributor
timestamp: July 26, 2017, 05:42:56 pm
content: Hi all,I have been a long time user of the old PIC14F/PIC16F series using a old picstart programmer and am familiar with the ASM instruction set of these PICs, but I am moving on to getting an ICD2 programmer and moving on to the modern Microchip MPLAB software.What PIC can I program using the ICD2 and newest version of the MPLAB software that is the most similar to the PIC14F/PIC16F instruction set along with being able to run on a 5V supply and supports in socket programming?

author: KL27x
author_rank: Super Contributor
timestamp: July 26, 2017, 06:50:54 pm
content: The "baseline" PICs might have the shortest instruction set.The midrange and enhanced midrange have something like double the instructions... but other than lack of tris command (you have to change TRIS register same way as any other register), there is essentially no difference in coding in assembly other than1. more bank jumping2. more peripherals3. more datasheet4. May have to clear ansel register to use I/O as digitalSo if you want to start with something more familiar, you can try baseline PICs. If you can ignore the huge datasheet and peripherals and are ready to learn just a few new things, you could go with enhanced midrange.They all can be programmed in circuit. They all have variants which run at up to 5V.The major change to assembly coding starts with 18F, IMO. Even 18F is at least familiar. 24F is an alien, in comparison.

author: jpanhalt
author_rank: Super Contributor
timestamp: July 26, 2017, 07:03:05 pm
content: You haven't said which development package you will be using. If it is MPLab IDE v.8.92 (i.e., the latest "Assembly-focused" version of that software), just go the the start-up screen, click on Configure, and select the device you want to use. A dropdown will tell you which programmers are compatible.I don't see any "14F's" mentioned. Perhaps you meant 12F. Anyway virtually all (only limited by the number I checked) early devices (midrange and basic) are compatible, includiing the 10F200, 12F508/509, and 16F devices that are not "enhanced mid-range."PICStart Plus is supports in socket programmingon the programmer. ICD2 uses ICSP, but you can buy or make adapter boards to program the chips out of circuit. Whether the chip is in a socket or not does not have any effect on the selection of programmer.John

author: westfw
author_rank: Super Contributor
timestamp: July 27, 2017, 06:51:12 am
content: QuoteAren't pretty much all the PIC16 chips essentially similar to the ones you've already used? Going from 12 to 14 to 16bit wide instructions keeps mostly the same architecture. Some addresses get bigger before you need to worry about banking, and you get some additional instructions, but they're architecturally very similar, and if you have "older PIC" experience, I wouldn't think you'd have any problems...(For example, an old PIC16F54 with 12bit instruction words has 32byte RAM banks and 512word instruction pages, while a 14-bitPIC16F690 has 128byte RAM banks and 2kword instruction pages.) (Well, sort-of. Computed GOTOs still only get to modify an 8bit PCL...)Even the PIC18 is basically the same architecture (now a 16bit instruction word, so you get some more features, 256byte register banks, etc.)Most of them are 5V chips (some of the newer PIC18s are 3.6V.)It's the PIC24 (16bit ALU), PIC30/33 (16bit ALU+DSP), and PIC32 (32bit MIPS CPU) that would cause you to have to "start over."

author: FrankBuss
author_rank: Unknown
timestamp: July 27, 2017, 07:15:08 am
content: I don't know, if the ICD 2 is still supported by the new MPLAB-X. When I open the project properties, I can only see ICD 3:When you change the PIC, you can see which programmers support it. Too bad that many of the new devices are not supported by the old PICkit2, which is only a limitation of the IDE, the hardware could still program it, for example the PIC32 is not supported in MPLAB-X with PICkit2, but it is no problem to program them withpic32progwith it. Well, I have a PICkit3, too, works reasonably well, just needs sometimes longer, when it changes the firmware when selecting a new PIC, which is a really silly design. But debugging works as well, so i don't complain. I guess the ICD 3 will support most chips as well.For new PICs, take a look at for example the PIC16F1823 (and PIC12F1823 in 8 pin packages). They are cheaper than some of the old PICs, but have some very nice new peripherals, like the CapSense module, which Itested recently, or auto-baud detection for the UART module, and they run up to 32 MHz with an internal clock. And the 16 stack levels, even for the PIC12F1823 devices (same "enahanced mid-range core"), makes it much easier to write larger structured programs in assembly. But I use them most of the time in C, works pretty well.

author: JPortici
author_rank: Super Contributor
timestamp: July 27, 2017, 07:45:50 am
content: i'm going to phase out the 1823 for the newer 18323 (mostly because PPS and it is even cheaper) if the sleep power consumption is satisfactory

author: Ian.M
author_rank: Super Contributor
timestamp: July 27, 2017, 08:06:08 am
content: Microchip dropped ICD 2 support before MPLAB X came out of beta. The ICD 2 is well obsolete.@O.P: Are you *SURE* you don't mean an ICD 3? I wouldn't buy an ICD 2 clone as a PICkit 3 clone is likely to be cheaper, is MPLAB X compatilbe and and has far better device supportI made a spreadsheet from the MPLAB 8.92 (final version) device support list a while back.You'll find it here:http://picforum.ric323.com/viewtopic.php?f=27&t=92Filter on 'G' in the column 'ICD2P' to get a list of PICs supported by the ICD 2 to choose from.N.B. the ICD 2 does *NOT* support variable Vpp. To avoid damaging newer PICs (2008 onwards) that use lower voltage HV programming and cant tolerate >12.5V 'traditional' Vpp levels, its essential to use a Vpp limiter circuit. Check Abs. Max voltage for the /MCLR/Vpp pin in the PIC's datasheet, or if you get a warning:Quote*DON'T* ignore it! Devices affected include the PIC18FxxKxx series.The Microchip Vpp limiter AC164112 is basically a shunt regulator circuit. It can be replaced with a 270R resistor in series with Vpp and a Zener diode from the /MCLR pin to Vss to clamp Vpp. Test your clamp circuit with a 13V supply and no PIC to confirm the clamping voltage meets the required imits for Vpp in the PIC's ICSP specifications (datasheet).