I tried several circuits to program several pics and none work ;/
I'm not sure if its the circuit(most likely) or the software(possible but probably not... using WinPic and it has worked for me before(although I could never get it to work with some other chips)).
I uploaded the circuit to alt.binaries.schematics.electronic.
It consists of a several mosfets.
Port VDD(Q2) is simply used to turn on the power to the other mosfets its linked too.
VDD, Data, Clock, and VPP are all controlled by the parallel ports control lines(suppose to be open collectors but they have a pullup).
I use 13V so I can turn on the mosfets completely but also it is needed to programming the pic in high voltage mode. That part of the circuit is the VPP to PIC VPP(Q1) part. When VPP is high it turns on Q3 which turns off Q which turns off PIC VPP. When VPP is low it turns Q3 which turns on Q1 and hence turns on PIC VPP. I invert the line in the software so its active high.
The two sub circuits after Q2 are just "drivers" for the parallel port. Both are non-inverting.
To get output from the pic it goes through Pic Data to Data Read(Q5). When the pic drives Pic Data high, Data Read goes low and vice versa. There is a slight issue here in that a Status port pin is attached a to Data Read and it supplies some voltage to the device when it is disconnected. I suppose I can put a diode here to stop that?
In any case, everything seems to work when driving LEDS but does not work when trying to program the pic. (I don't use several of the pull down resistors where it shouldn't matter all that much) I invert the lines appropriately and test it all using the software and LEDS.
e.g., if I go into winpic and turn on VPP it turns on an led attached to PIC VPP and the voltage is what it should be. Each pin does what its suppose to. (which is that it gives me a low voltage when I send a low voltage in the software and a high when I send a high)
I've spent last 3 days working on this and can't for the life of me figure out why it won't program. I've tried slowing down the comm speed and also tried different circuits. I do not have a logic analyzer so I used LED's and as far as control goes, everything looks fine.
The pics I've tried are PIC16F817, PIC18F2550, and PIC24FJ16GA002. For the PIC24 I actually used a different circuit since the levels are lower than the parallel port. I also wrote some software but it also did not work(I think my circuit had a problem though).
In any case, maybe someone can spot a problem with my circuit?
The idea is
VDD High supplies power,
The three ouputs Data, Clock, and VPP are all just voltage translations with VPP translating to 13V. I suppose I could have used another mosfet here instead of the BJT though? I used the BJT because I don't have any P-Ch Mosfets and an N-channel would require a higher voltage than 13V.
Data Read is for reading the Data pin on the pic and I need to translate back. The software automatically holds Data high so that this can be accomplished. Again, this works in the software where I can see that it reads the data when I manually force PIC Data to be low or high. If theres any problems chances are its here.
Any ideas?
PS. About 2 years ago I programmed the PIC18F2450 by using a 3-state hex driver and a bjt. I was able to program the 18F2450 but could not program the 18F4550. These two devices use the same programming spec so it should have worked AFAIK. So its possible that the software has a problem but I doubt it. I can't find the 18F2450 or the hex driver to test it though ;/
Thanks, Jon