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.

Breadboard Programming for PIC16F877A

Status
Not open for further replies.
in the pic it looks ok, maybe you can try without the pull-up resistor, afaik it is not needed for the programming part, but should not make problems ...

Have you tried putting there 5V from external source, it can help, set the power to auto, leave connections as is and add 5V stabilised source to the breadboard, used to help few times I had similar problems..
 
I have used a multimeter to check the power output across the rails and it stated 4.71V
perhaps you need to put a 0.1uF disc cap across thee Vdd and Vss pins across pins 11&12 or 31&32.
also you need to put a 1N4148 diode in series to the 10K resistor Vdd going to Mclr . also another 0.1uF helps decouling at bottom of 10K resistor before diode.
 
Tried adding the caps but to no avail. Also added external power source but also to no avail.

As suggested by FUTZ, remove the mplab link, put the chip alone and try to erase it once and have a blank check. let us see what happens



DON't apply external power. It would be fed back to PICKIT2
 
Last edited:
Tried it. Open up only the pickit 2 programmer and try to erase it right? I'll get back the same error message that Program memory does not start at address 0x000000.
 
not sure how it goes with pickit2, I had a problem with pic I programmed with easypic4 that was unreadable, unrecognisable, unusable .. after multiple tries to make it work, I used some parport programmer that uses 13V to program chip (not lvp but the other type, not sure how it is called) and when I erased it using that, it was working ok... not sure if pickit2 is using this 13V programming or lvp but noticed with easypic - that can only do lvp, if I disable lvp on pic while programming it, I cannot program it on easypic any more) ...

iirc, pickit2 makes 13V on the mclr pin so it should program it anyhow .. but, not sure, maybe someone can confirm
 
I do not have an original PICkit2 but I do have a Junebug or two. Both of these do high voltage programming.

Both MPLAB and PICkit2 software need to connect to the chip. It makes not sense to try to erase or program the chip if you can not make a connection to the onboard monitor.

You do not need any pullups or diodes on MCLR to connect program or verify.

You do need the decoupling/bypass caps between power and ground.

At this point it looks like you are doing everything right. Although not likely it is equally possible that the 16F877A or the PICkit2 are bad.

Unhook the PICkit and run the trouble shooting steps under tools. TOOLS>TROUBLESHOOT...

It will allow you to check VDD, VPP, CLK and DATA lines.
 
Last edited:
You're right, I opened up MPLAB and Pickit 2 Programmer.

When I select a device on the Pickit 2 Programmer, MPLAB would show

-------------
Found PICkit 2 - Operating System Version 2.32.0
Target power not detected - Powering from PICkit 2 ( 5.00V)
PKWarn0003: Unexpected device ID: Please verify that a PIC16F877A is correctly installed in the application. (Expected ID = 0xE20, ID Read = 0x0)
PICkit 2 Ready
---------------

However, I closed everything, opened up MPLAB and Pickit 2 without selecting the Device. I went to MPLAB and chose Pickit2 Programmer and
-----------
Initializing PICkit 2 version 0.0.3.30
Found PICkit 2 - Operating System Version 2.32.0
Target power not detected - Powering from PICkit 2 ( 5.00V)
PIC16F877A found (Rev 0x8)
PICkit 2 Ready
----------------------------

So is this what I'm supposed to get?
 
You're right, I opened up MPLAB and Pickit 2 Programmer.

When I select a device on the Pickit 2 Programmer, MPLAB would show

-------------
Found PICkit 2 - Operating System Version 2.32.0
Target power not detected - Powering from PICkit 2 ( 5.00V)
PKWarn0003: Unexpected device ID: Please verify that a PIC16F877A is correctly installed in the application. (Expected ID = 0xE20, ID Read = 0x0)
PICkit 2 Ready
---------------

However, I closed everything, opened up MPLAB and Pickit 2 without selecting the Device. I went to MPLAB and chose Pickit2 Programmer and
-----------
Initializing PICkit 2 version 0.0.3.30
Found PICkit 2 - Operating System Version 2.32.0
Target power not detected - Powering from PICkit 2 ( 5.00V)
PIC16F877A found (Rev 0x8)
PICkit 2 Ready
----------------------------

So is this what I'm supposed to get?

YES Not try to erase and blank check it using PICkit2 software. If that works you can start MPLAB and it should connect there too.
 
I on MPLAB and Pickit 2 Program. Then I selected the PIC16F877A from the device and tried to erase it and did a blank check. Then it went back to what it was before.
 
I've use the DMM to check the voltage of MCLR with respect to ground and i'm given a reading of 1.3Volts.
 
Last edited:
For now stay out of MPLAB.

Use the PICkit2 software until you are able to connect erase program and verify the 16F877A. If a connect works try several times it a row. It should work consistantly.

If you get ID Read = 0x0 it is not talking to the PIC.

Use the TOOLS>TROUBLESHOOT.. to see what it says about VDD, VPP and then check PGC and PGD
 
I've use the DMM to check the voltage of MCLR with respect to ground and i'm given a reading of 1.3Volts.

this would raise to 13.4 or so only when a programming or read or verify mode is enabled, i feel or when the test mode of PICKIT.

The PICKIT2 user manual shows 10K pull up decoupled with 0.1uF, and connected to MCLR* either by 470 ohms or a diode placed in such a way that later Vpp would not travel back.

They haven't however shown the much needed 0.1uF power line decoupling at the Device under program mode
 
Last edited:
But i doubt it would affect the programming.
One thing i'm not sure of is why are people able to program their chips smoothly by just connecting the wires but not for me?
 
Status
Not open for further replies.

Latest threads

Back
Top