Help with getting Olimex pic-kit3 to program device

Started by got_olim, January 28, 2021, 01:51:56 AM

Previous topic - Next topic

got_olim

Hello,
I'm new to the Olimex PiC-kit3
I've been using a the Pickit2 from microchip for a number of years.
As my first trial I have a blink program for a 12F683
I took a fresh device and plugged the Pickit2 into MPLAB 8x
It programmed the device successfully with internal osc and mclr turned off.

I then proceeded to try this with the Olimex PK3 with no success.
I switch to the Pickit3 as the programmer and turn on 5vdc to the device just in cast that is needed.
It doesn't want to program the chip at first.
But if I select "Read" it appears to perform this successfully
Then I can select "Program" and it appears to success
I see the MPLAB's blue progress bar
And then it says Program Complete
But I get nothing from the device.
And after programming it with the Pickit2 I try to erase the device with the Olimex
With the Olimex it appears to success erasing the PIC.
But the program I put into it with the Pickit2 is still running.

Can't seem to get the Olimex to work.

LubOlimex

Make sure that the PIC-KIT3 is not connected in reverse. This is the most common problem for people switching from Microchip tools to Olimex tools.

If you have checked the orientation and the problem remains, then it is probably something related to the powering circuit. Quick test to check if I am right would be to power the target from another source and test again.

> I normally put my PICs into a ZIF connector board with no circuit and nothing else attached to any pins on the device.

Well, that is not how you should be doing it. You need a resistor between VDD and MCLR (reset), preferably between 4.7k and 10k. Else some reset problems are expected. Refer to the this picuture:



Let me know how it goes.

There are many results online for PIC12F683 and PICKit3 maybe some of them would apply for that specific case you face. I would recommend searching for "PIC12F683 PICKit3".
Technical support and documentation manager at Olimex

got_olim

#2
Thank you!
I have tried it both ways.
The Olimex has a  yellow LED
My belief is that - that is the side of the port which pin 1 is located.

The only difference in the interconnect that you have in your drawing - that I don't have is the 10K resistor holding Mclr up to 5+.

With all of my programmers through the years, I have always programmed the PIC devices in a ZIF socket.  There was never any need to pull the mclr pin up to 5+

And what I read in the manual would indicate that this resistor is only needed when one is programming the PIC "In-Circuit".

Can you verify whether or not pulling mclr up is necessary for programming?
If that is the case then I won't be able to use my Zif sockets for programming.
Or perhaps I could add the 10k resistor into the Olimex's mirrored interconnect cable?

BTW: I don't think it is specific to the 12F683 device
I'm getting the same issue with the 16F1825 device

Also is the question of whether I should be using an external power supply with the Olimex.
Since I always try to program chip configs with MCLR_OFF and Internal OSC
Does that pose some problem that is peculiar to the Olimex?

got_olim

Ok, so I'm now testing Olimex with a different PIC.
This is a brand new 16F887

I've put the PIC into a ZIF adapter for PIC programming.
This PIC is a 40 pin device - so the adapter settings are:
Jumper 1 = A
Jumper 2 = 2-3
Jumper 3 = 2-3

I plug the Olimex mirror cable into the ZIF connector board.
I use an ohm meter to verify the pins on the Olimex connecter are going to the correct pins on the device.

Olimex 1 mclr = pin 1 mclr
Olimex 2 vdd = pin 11 vdd
Olimex 3 vss = pin 12 vss
Olimex 4 dat = pin 40 dat
Olimex 5 clk = pin 39 clk

I plug the mirror cable into the Olimex PK3
Pin 1 (mclr) is on the side of the Olimex near the YELLOW LED

So far I believe the Olimex is connected to the correct PINS on the device

I plug the Olimex PK3 into the USB port of the computer
I open MPLAB 8.80
I select the device
I choose programmer as PICKIT3

Here are the results:

PICkit 3 detected
Connecting to PICkit 3...
Firmware Suite Version...... 01.26.81
Firmware type......................Midrange
PICkit 3 Connected.
Target Device ID (00000000) does not match expected Device
ID (00002080).

I've seen this warning with the 12F683 also.
The fact that the Target Device ID returned is 0000 - makes me suspect the Olimex is not talking to the PIC.

In MPLAB I go to Programmer -> settings -> Power
Turn on 5vdc to the device

And then Programmer -> Reconnect
Same response.

This is obviously an issue that is peculiar with the Olimex programmer

got_olim

Well - I just temporarily added a 10K resistor between VCC and MCLR on the ZIP board.
Same response.
So the MCLR pull-up resistor does not appear to be a determining factor.

One thing I don't understand - what is meant by "Mirrored" cable?
It appears to me that the cable is a simple one-to-one pass-through.
As far as I ca see, it no different than the pickit2 interconnect.