Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

How to program DIP PICs with Breadboard

Status
Not open for further replies.

Funny NYPD

New Member
This is a tutorial about How to program DIP PICs with Breadboard. A BB0703 (PICKit2) is used as a demonstration, however ICD2 and other ICSP programmer can also be adapted.
File will be loaded by the administrator later.
**broken link removed**
 

Attachments

  • 101_0227.JPG
    101_0227.JPG
    446.1 KB · Views: 1,212
  • HowToProgram_DIP_PICs_withBreadboard.pdf
    2.5 MB · Views: 3,066
Last edited:
Is it just the same with the ICD2? Im trying to programm a 12f629 but am not abel to do this....

I have looked and conected the icd2 and pic correctly. I have tripple checked

pleas help me
 
Yes i know and so far i got the pic directly conected to the ICD2 (wich i got from a former employer and it says very dodgy so im not sure it works properly)

Edit:
The ICD2 contains a PIC16F877 if that helps
and here are hte error messages i get

ICDWarn0020: Invalid target device id (expected=0x7C, read=0x0)
ICDWarn0044: Target has an invalid calibration memory value (0x0).

i cant seem to understand exactly what they mean

btw are there any restrictions on the cable length?
 
Last edited:
Kryten said:
Yes i know and so far i got the pic directly conected to the ICD2 (wich i got from a former employer and it says very dodgy so im not sure it works properly)

Edit:
The ICD2 contains a PIC16F877 if that helps
and here are hte error messages i get

ICDWarn0020: Invalid target device id (expected=0x7C, read=0x0)
ICDWarn0044: Target has an invalid calibration memory value (0x0).

i cant seem to understand exactly what they mean

btw are there any restrictions on the cable length?

According to Microchip, Cable length normally should be around 6 inches. Mine works on 12 inches cable though.

some time the ICD2 requires certain power on sequence, can you connect the ICD2 without target board first, then connect to your target chip.

Also power the target board with external power supply if you can. This will help get rid of many issues. The Microchip ICD2 ICSP interface circuit is kind of "weak" and easy to broke. So make sure all pin-out are correct and connected to the correct pins on the PIC.

Regards,
 
Kryten said:
Is it just the same with the ICD2? Im trying to programm a 12f629 but am not abel to do this....

I have looked and conected the icd2 and pic correctly. I have tripple checked

pleas help me
The ICSP signal is exactly the same as the ICD2, though the PIN-out sequence is on the opposite way. I don't know why Microchip released the PICkit2 with a opposite pin sequence compare with ICD2.

Please make sure your PC has a good USB power supply or simply power your ICD2 with external power supply. The ICD2 seems working more reliably than power by USB on my personal experience.
 
With the universal programmer, the job is even easier:
**broken link removed**
For more info, check out the following links:
2-in-1 and 3-in-1 Mini Labs
User Manual for 2-in-1 and 3-in-1 Mini Labs

3-in-1 Universal Programmer, support the following chips:
1. Flash-based PIC Microcontroller (PIC12F, PIC16F, PIC18F, PIC24F, dsPIC33F, dsPIC30F, PIC32F),
2. KEELOQ HCS,
3. MCP250xx
4. EEPROMs (I2C 24LCxx, SPI 25LcXX, 93LCxx, 11LCxx)

Some other features such as:
0. ZIF technology for long life operation.
1. support both SMD and through hole package, SOIC-SMD upto 28 pins, DIP (through-hole upto 40 pins.
2. On board power regulator, provide +5V, +3.3V and +2.5V
3. Dual bi-directional Level shift for EEPROMs requires 3.3V and lower voltage programming.
4. 6 LEDs on board
5. 3 pull-up
6. 2 pull-down
7. 1 cap
8 10 uf Vdd cap for PIC programming
9. LED indicator on VDD
10. support both RJ12 and PICkit2 type connector, easily connected to PICkit2, ICD2, ICD3, RealICE, etc.
11. Jumper wire technology guarantee no worry for future PIC pin compatibility.
 
Last edited:
Thanks for the good comment.
Here is another tutorial on programming and testing with 16F628A. It is based on the 3-in-1 mini-Lab, however, You can always use breadboard and get it working.

Au Group Electronics 3-in-1 mini-Lab application note for PIC16F628A Rev. B:
**broken link removed**

The Hex file for 628A LED Binary Counter is available here:
**broken link removed**

**broken link removed**

Program without PC:
**broken link removed**
 
Last edited:
Tricks to play with the new 13/14K50 chips:
The problem is unique to this part, and is this:

The PGC and PGD pins of the 18F14K50 are shared with the USB D+ and D- pins. Although the part may be run with a 5 Volt VDD, the maximum voltage that the D+/D- pins can handle is about 3.3V. This is noted in the datasheet and programming spec.

The PICkit 2 (and most other programmers) cannot limit the PGx signal voltages to a range different from VDD, so to prevent damaging a part when a user is unaware of the PGx limitation, the supply voltage is limited.

One way to work around this issue is to
1) Power the 18F14K50 VDD from a 5 volt supply.
2) Do not connect the PICkit 2 VDD pin to the target 5 Volt VDD (leave it unconnected)
- This makes the PICkit 2 think it needs to supply power, so it turns on VDD @ 3.3V
3) The target will now be powered at 5 V, but the PICkit 2 PGx signals will be limited to 3.3V

Another way is to power the target at 5V from a supply and use zeners or other clamping voltage limiters on the PGx pins.
 
Some tricks Regarding PICKit2 debugging mode on 16F873A
FunnyNYPD
thanks for the suggestion, but my bit configuration are correct. I have disabled watchdog, selected XT, have LVP disabled, Powerup timer is also disabled.

I figured out today that if I use PORTB as ouput and try to send some data, only then this error seems to occur. I dont really know why this is happening. I believe this might be due to PGC, PGD and PGM line.

If i shift 1 bitwise, i could at the max shift to RB3 and there on seemed to be a problem. I am not quite sure why this is happening.

Not using PORTB, solved the issue but I had to completely neglect PORTB but this doesnt really make any sense.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top