1. 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.
    Dismiss Notice

Breadboard Programming for PIC16F877A

Discussion in 'Microcontrollers' started by aaronchay, Nov 6, 2008.

  1. blueroomelectronics

    blueroomelectronics Well-Known Member

    Joined:
    Jan 21, 2007
    Messages:
    12,536
    Likes:
    168
    Location:
    Toronto, Canada
    I've built dozens of PIC circuits and used both the ICD2, PICkit2 and clones such as mine IE Junebug, Inchworm and if it's connected correctly it'll work no problem. You may have a flaky programmer but since you're using a PICkit2 it has many methods for testing the PGC/PGD & VPP outputs (all built into PICkit2 standalone software which as 3VO stated you should be using)

    All PICs will program sans crystal or clock source (unlike AVR ICs) so you don't need much except +5, GND (plus 0.1uf decoupling caps), PCG, PGD & VPP a small pullup ~22K on MCLR might help.
     
  2. aaronchay

    aaronchay New Member

    Joined:
    Aug 30, 2008
    Messages:
    37
    Likes:
    0
    For now it's still unable to program my chip despite changing to other chips. Any suggestions on what I should do?
     
  3. SMUGangsta

    SMUGangsta New Member

    Joined:
    Oct 16, 2008
    Messages:
    219
    Likes:
    2
    Location:
    Wales, Centre of the Universe
    Have you got the latest firmware loaded into your PicKit2, i had a few problems with some chips when I first got it, but now I check about once a month for updates and never had a problem since.
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. aaronchay

    aaronchay New Member

    Joined:
    Aug 30, 2008
    Messages:
    37
    Likes:
    0

    yah,
    App Version: 2.55.01
    Device File Version: 1.53.00
    OS Firmware Version: 2.32.00
    is that right?
     
    Last edited: Nov 12, 2008
  6. mvs sarma

    mvs sarma Well-Known Member

    Joined:
    Oct 29, 2006
    Messages:
    3,512
    Likes:
    76
    Location:
    Hyderabad, India.
    By the way, did you check the Vdd enable, so that it is not in external Vdd and the PICKIT2 supplied Vdd to the F877A?

    how about the PICKIT2 troubleshoot results, along with actual measurements on the 6 pin connector?
     
    Last edited: Nov 12, 2008
  7. aaronchay

    aaronchay New Member

    Joined:
    Aug 30, 2008
    Messages:
    37
    Likes:
    0
    Checked already. I tried with and without the Vdd checked. Troubleshooted the Pickit2 using DMM without any errors. Maybe I'll call my local Microchip technical support and pay them a visit. Will update this thread again.
     
  8. aaronchay

    aaronchay New Member

    Joined:
    Aug 30, 2008
    Messages:
    37
    Likes:
    0
    Hi all, my problem have been solved. I'm not sure where the problem lies at also but I'm guessing it's my breadboard.

    This was what I did:

    [​IMG][​IMG]

    Hope this will help others who met with the same problem in future.

    Thanks all!
     
  9. mvs sarma

    mvs sarma Well-Known Member

    Joined:
    Oct 29, 2006
    Messages:
    3,512
    Likes:
    76
    Location:
    Hyderabad, India.
    CONGRATULATIONS aaronchay !!!!
     
  10. mister_e

    mister_e New Member

    Joined:
    Jul 14, 2006
    Messages:
    350
    Likes:
    2
    Location:
    Montreal, Canada
    It's never a bad idea to load PGM pin to GND, in many cases, this prevent odd programming results. Pretty sure Microchip ICSP guide explain that somewhere.
     
  11. aaronchay

    aaronchay New Member

    Joined:
    Aug 30, 2008
    Messages:
    37
    Likes:
    0
    noted. Anyway, I've found out the problem. It's due to broken wires. I re-wired the wires on the breadboard and it worked fine. Should have taken this point into consideration.
     
  12. 3v0

    3v0 Coop Build Coordinator Forum Supporter

    Joined:
    Jul 14, 2006
    Messages:
    9,404
    Likes:
    227
    Location:
    OKLAHOMA USA
    This is a lesson you will not forget. If things do not work always check the connections with a ohm meter.

    Now drop and do 100 pushups for wasting our time :)

    3v0
     
  13. SMUGangsta

    SMUGangsta New Member

    Joined:
    Oct 16, 2008
    Messages:
    219
    Likes:
    2
    Location:
    Wales, Centre of the Universe
    Not to muddy the water, but you should only use an Ohm meter to check the wires in low current applications (eg signal wires). When you move onto switching larger loads drawing a few Amps through a wire you should start measuring the voltage drop on the wire, as an Ohm meter will tell you the wire is OK even if just 1 single strand is still intact - but the circuit will still fail when you put it under load.
     
  14. 3v0

    3v0 Coop Build Coordinator Forum Supporter

    Joined:
    Jul 14, 2006
    Messages:
    9,404
    Likes:
    227
    Location:
    OKLAHOMA USA
    You are right, but we are in the micro controller forum. Perspective.

     
    Last edited: Nov 16, 2008
  15. SMUGangsta

    SMUGangsta New Member

    Joined:
    Oct 16, 2008
    Messages:
    219
    Likes:
    2
    Location:
    Wales, Centre of the Universe
    Yeah 3v0, I agree - i wasnt having a go, just pointing out that *when/if* the OP moves on to higher current devices, he keeps this in the back of his mind.
     
  16. mvs sarma

    mvs sarma Well-Known Member

    Joined:
    Oct 29, 2006
    Messages:
    3,512
    Likes:
    76
    Location:
    Hyderabad, India.
    LOL .... 100 pushups.
    Yeah, he /she would never have that level overconfidence. I feel that the gauge of wire used for interconnection on the SSBreadboard matters
    any lower dia wire, people might have this trouble of loose or intermittent connections. Recently I came across another case where he traced out a faulty transistor of a newly assembled PIC Programmer(base-collector junction was Open). He struggled for almost a week.

    Perhaps not the wiring alone, even the components being used need to be checked for their correctness. I know of cases of wrongly coded resistors. and the ICs are re-branded like TBA810 power amplifier chip re names as TDA1044 ( a vertical oscillator chip in B&W televisions.
     
    Last edited: Nov 16, 2008
  17. san_etech

    san_etech New Member

    Joined:
    Apr 16, 2009
    Messages:
    2
    Likes:
    0
    can i able to connect the pickit 2 to pic16f877a when it has supply from external source(in my circuit) to program?
     
  18. 3v0

    3v0 Coop Build Coordinator Forum Supporter

    Joined:
    Jul 14, 2006
    Messages:
    9,404
    Likes:
    227
    Location:
    OKLAHOMA USA
    You should have started a new thread instead of adding to one from 2008.

    Yes you can. Both MPLAB and PICkit2.exe have setting that tell the PICkit2 that the target has its own power. I think the default is to check for target power and use it if possible.
     
  19. san_etech

    san_etech New Member

    Joined:
    Apr 16, 2009
    Messages:
    2
    Likes:
    0
    thanks 3V....................
    can u give me the connection details pls..............
     

Share This Page