+ Reply to Thread
Results 1 to 6 of 6

Thread: Out of the ICD circuit PIC?

  1. #1
    Hedos Newbie
    Join Date
    Nov 2006
    Posts
    34

    Default Out of the ICD circuit PIC?

    Hi,
    I wanted to try a PIC outside of its ICD circuit (connected to the Inchworm) after programming it. I programmed it with the Flash a LED code from William for the 16F628A.

    The program works perfectly in the ICD circuit. If I remove the PIC and put it in another circuit, powering it from a regulated 5V supply, it doesn't work. I have a constant ~2V on RB0 where I should normally see it switch from 5V to 0V every ~1.2 seconds according to the code.

    Do I have to connect more than just Vss and Vdd to have a functional PIC?
    If so, where could I find this information by myself? The Microchip datasheet for the 16F628A is not very helpful for getting started, it is too dense with advanced technical information.

    One more thing: When I try to use the Inchworm as a programmer only, there is no problem. If I try to use it as a debugger, though, I get this error when connecting from MPLAB to the Inchworm: " Invalid target device id (expected=0x89, read=0x83)". I use a 16F628A and when I go to Configure -> Select device, there's a green circle beside MPLAB ICD2 Debugger, so it should be supported.
    Do the connections to the target PIC have to be different for debugging from just programming?


  2. #2
    Super Moderator Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent
    Join Date
    Nov 2003
    Location
    Derbyshire, UK
    Posts
    29,759

    Default

    You need to connect the reset pin (MCLR) to 5V as well, or set it to be done internally (but this causes problems with the ICD2 programmer).
    PIC programmer software, and PIC Tutorials at:
    http://www.winpicprog.co.uk

  3. #3
    Hedos Newbie
    Join Date
    Nov 2006
    Posts
    34

    Default

    That works, thanks.

  4. #4
    William At MyBlueRoom Newbie
    Join Date
    Feb 2006
    Location
    Toronto, Canada
    Posts
    721

    Default

    Use a resistor 10K or more between MCLR & power, bad practice to tie directly to power.
    Bill
    Home of the
    Firefly PIC Tutor
    Inchworm ICD2

    http://www.blueroomelectronics.com

  5. #5
    Super Moderator Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent
    Join Date
    Nov 2003
    Location
    Derbyshire, UK
    Posts
    29,759

    Default

    Quote Originally Posted by dknguyen
    Well it's not bad practice- it's necessary or else the ICD2 can never reset the PIC (or manually either).
    True, it's not bad practice UNLESS you want to reset externally - obviously you have to be able to do this when using an ICD2. Adding a pullup resistor gives no advantage other than that, if you don't need an external reset, then connect it directly - the PIC is designed to be used like that.
    PIC programmer software, and PIC Tutorials at:
    http://www.winpicprog.co.uk

  6. #6
    dknguyen Excellent dknguyen Excellent dknguyen Excellent dknguyen Excellent dknguyen Excellent dknguyen Excellent dknguyen Excellent dknguyen Excellent dknguyen Excellent
    Join Date
    May 2006
    Location
    Alberta, Canada
    Posts
    6,028

    Default

    I deleted my post as you replied because I realized what was going on (it wasn't running in the ICD circuit).

+ Reply to Thread

Similar Threads

  1. power electronics circuit analysis
    By ptewright in forum Electronic Projects Design/Ideas/Reviews
    Replies: 4
    Latest: 23rd August 2009, 04:38 AM
  2. Circuit functioning very strange. Why?
    By Cyclone in forum Electronic Projects Design/Ideas/Reviews
    Replies: 13
    Latest: 19th February 2009, 06:27 AM
  3. I need help in designing a circuit
    By chefach in forum Electronic Projects Design/Ideas/Reviews
    Replies: 13
    Latest: 27th September 2007, 11:15 AM
  4. Circuit auto OFF feature after no events design
    By Uman in forum Electronic Projects Design/Ideas/Reviews
    Replies: 2
    Latest: 3rd May 2004, 05:34 AM
  5. HELP! a digital signal to close a circuit
    By fireismyflag in forum Electronic Projects Design/Ideas/Reviews
    Replies: 2
    Latest: 22nd March 2004, 10:46 PM

Tags for this Thread