Author Topic: PIC with the simplest instruction set that can be programmed by an ICD2  (Read 2347 times)

0 Members and 1 Guest are viewing this topic.

Offline Fusion916Topic starter

  • Regular Contributor
  • *
  • Posts: 75
  • Country: us
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?
 

Offline KL27x

  • Super Contributor
  • ***
  • Posts: 4099
  • Country: us
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 than
1. more bank jumping
2. more peripherals
3. more datasheet
4. May have to clear ansel register to use I/O as digital

So 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.
« Last Edit: July 26, 2017, 06:53:08 pm by KL27x »
 

Online jpanhalt

  • Super Contributor
  • ***
  • Posts: 3473
  • Country: us
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 programming on 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 

« Last Edit: July 26, 2017, 07:07:22 pm by jpanhalt »
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Quote
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
Aren'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-bit   PIC16F690 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."

   
 

Offline FrankBuss

  • Supporter
  • ****
  • Posts: 2365
  • Country: de
    • Frank Buss
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 with pic32prog with 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 I tested 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.
So Long, and Thanks for All the Fish
Electronics, hiking, retro-computing, electronic music etc.: https://www.youtube.com/c/FrankBussProgrammer
 

Offline JPortici

  • Super Contributor
  • ***
  • Posts: 3461
  • Country: it
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 :)
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12856
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 support

I 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=92
Filter 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
ICDWarn0068:  This process technology is not 12-volt tolerant. Please ensure that external protection for MCLR is in place, for example a zener diode, before proceeding or your device will be damaged.
*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).
« Last Edit: July 27, 2017, 08:12:31 am by Ian.M »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf