I realise this is "basic" stuff but pics are not as easy as avr boards...but they can be a pain when connected to stuff.
I, like others, am looking for a tidy new pic to try,. For ideas I'll stick to 328p for now.
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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?
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi all, just a thought cos my robot crashes.
1st the only pics I got on pcb are 18f25k22 although I have lesser ones.
2nd the only pps pics I have are one uchip dev boarsds with usb programming.
Here's a typical "pic icsp circuit" search result. https://www.kanda.com/images/icsp_circuit.jpg
from https://www.google.co.uk/search?rlz=1C2CHBF_en-GBGB814GB814&biw=1280&bih=636&tbm=isch&sa=1&ei=2ze1W8SBDceOgAaM6LjABw&q=pic+icsp+circuit+diagram&oq=pic+icsp+circuit+diagram&gs_l=img.12...0.0.0.3507488.0.0.0.0.0.0.0.0..0.0....0...1c..64.img..0.0.0....0.95A5W2v2380
If you don't use the clock and data, do you need the the pullup resistors?
I want a cicuit to program from pk2 or 3 with no power to the circuit,
As it is,connecting pickit3 and the pic program starts but fails with no power.
The idea is to use the new pic with new features but just dil pics so not being happy with a zif socket need a reliable circuit.
I did have it working with pickit 2 and gcb flash hex but have access to pickit3+.
What works for you folk?
The photos show pickit3+ working with an old pic. Would it work with a new pic?
I realise this is "basic" stuff but pics are not as easy as avr boards...but they can be a pain when connected to stuff.
I, like others, am looking for a tidy new pic to try,. For ideas I'll stick to 328p for now.
Last edit: stan cartwright 2018-10-04
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.
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?
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?
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.
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?
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.