Menu

Pic icsp

2018-10-03
2018-10-05
  • Chuck Hellebuyck

    You need CLK and DATA to program the PIC. Those arent pullup resistors. They are series isolation resistors typically in the 100 ohm range. They allow the CLK and DATA i/o pins to be connected to your circuit without the circuit affecting the CLKand DATA signal.
    If you power the PIC circuit separately, the programner will sense it and wont power the board.

     
    • stan cartwright

      stan cartwright - 2018-10-04

      In the case of my robot I power it and connect pickit2. It runs ie wheels turn servo moves etc. then stops when I press flash hex.
      I want to try a "new" pic using icsp. I thought someone had a circuit. What's lvp? Do I need a regulated supply?
      I have pickit2+ & 3+ and priviliges to use the software.
      So I 'll get a "new" 28pin pic, make a board with psu and headers, write gcb prog and makehex then flash it to the pic with pickit3.......yes?

       
      • Chris Roper

        Chris Roper - 2018-10-04

        In the case of my robot I power it and connect pickit2. It runs ie wheels turn servo moves etc. then stops when I press flash hex.

        I would say that that is the expected response, you are resetting the device and entering program mode which disables all I/O. Your Robot, or any other device with a Microcontroller in it will, stop if the Controller goes into programming mode.

        What response did you expect?

         
      • Chuck Hellebuyck

        LVP is low Voltage Programming. It's an option on many devices. High Voltage Programming (HVP) uses the MCLR pin connection on the programmer (PICkit2/PICkit3) to produce a high voltage (9-15v) very low current signal that puts the device into programming mode. Then the CLK and DATA shift in the 1's an 0's. I don't recommend LVP in most cases, especially if you have access to a PICkit programmer.

        If you design the robot board with the isolation resistors, then you should have no issues programming. The biggest issue I've found with robots are the motors turning on and off cause voltage spikes in the Power Supply that cause the micro to reset. That can happen during programming as well. So building or buying a ZIF socket adapter and pulling the chip in and out for programming is a decent option. You can get one of those ZIF adapters on eBay for less than buying a ZIF socket in most cases.

         
        • stan cartwright

          stan cartwright - 2018-10-05

          Thank you @Chuck for the detailed reply. re spikes ..true.
          I have a zif socket but never used it as I don't know what the jumpers do.
          If I swap ic's I put them in turned sockets. They don't like being messed with.
          I think a pic18f25K40 would be ok as it's pps (if I got the right one)
          Is it that different from the 18f25k22 I have other than pps and bit more ram?

           
          • Chuck Hellebuyck

            The jumpers are to connect the 6 pin header to the proper pins for the device size you are using when the device is placed into the top of the ZIF socket (Pin 1 to Pin1). You would have to find the instructions for that ZIF adapter or use a meter to figure it out. For PICs, 8, 14 and 20 pin chips use the same pin locations for Data, CLK and MCLR. 28 pin devices all use the same pinout and 40 pin all share the their same pinout. So the jumpers switch between those three groups. An 18F25K40 and 18F25K22 both use the same 28 pin layout so they would program to the same jumpers.

             

Log in to post a comment.