Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 09:45 17 Jun 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : VT100 won’t program - PICkit 3 issue...

Author Message
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9133
Posted: 02:05am 28 Oct 2014
Copy link to clipboard 
Print this post

This is being a pain in the arse tonight.

PICkit3 and IPE - it won't program either the original VT100 with bootloader, or the upgrade hex files - keeps moaning about an address being unexpected.

Here is the image:




The odd thing about this, is that it moans about address ffffffff - expected a 0, received a 0.

What the hell does that mean?
It expected a zero, got a zero, but that is still wrong?

It's also moaning that the device is not blank, but if you look at the image I posted above, I did a full erase on it, and that completed fine. So, erase device, and that completes sucessfully - device is blank. Attempt to program it, and IPE says device is not blank - WTF?

EDIT: I can read the device fine - this completes without any error, but I can't program it.

ANother image:





I don't get this - I can read the chip, erase the chip, but it won't let me program it..... Edited by Grogster 2014-10-29
Smoke makes things work. When the smoke gets out, it stops!
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3683
Posted: 02:45am 28 Oct 2014
Copy link to clipboard 
Print this post

Does look weird. Maybe the way you're powering the board?

Which IPE version? (In case others have the exact same one and can say if it was OK for them.)

You might try one of the non-PICkit3 ways such as Peter's or mine in case you get some sort of clues.

John
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9133
Posted: 02:55am 28 Oct 2014
Copy link to clipboard 
Print this post

Powering board with 1703-33 regulator with full decoupling caps etc, fed from 5v regulated supply. 1703 is a LDO, and only needs 200mV above output on the input, so 5v is fine, and I have used them before like this....

I suppose I could try a 9v plug-pack on it.

Voltage on PIC32 is 3.29 volts, which is more-or-less spot-on.

IPE version 2.00 - I will look and see if there is perhaps an update.

EDIT: I have downloaded the latest version of IPE(2.20), and installed it, and it updated the PICkit3 when I connected it, but I still can't write the hex to the chip - exactly the same errors - expected a 0, received a 0, whatever the hell that is supposed to mean. Basically, the IPE is telling me that the value it was expecting is correct, but it's wrong, so I'm not going to work for you.

To hell with this - I have had enough for one night. 2:58AM, and my brain hurts.Edited by Grogster 2014-10-29
Smoke makes things work. When the smoke gets out, it stops!
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9133
Posted: 04:25am 28 Oct 2014
Copy link to clipboard 
Print this post

As an experiment, I plugged the PICkit3 into another project I built that uses the VT100, and I was able to erase AND program THAT chip just fine.

Is it conceivable that the chip I have is crook?

Please say no, as it is SOIC, and buried in a very tight PCB, and it will be a pain in the arse to remove and replace it, now that the PCB is fully assembled.

The chip was brand new, and kept in anti-static containers before use, and I also followed all static precautions and used a grounded wrist strap and iron etc, so I figured that static damage is very unlikely. However, perhaps I am just unlucky and have a factory dud?

Brain hurts a-lot now - need sleep. (3:25AM)
Smoke makes things work. When the smoke gets out, it stops!
 
vegipete

Guru

Joined: 29/01/2013
Location: Canada
Posts: 1085
Posted: 08:09am 28 Oct 2014
Copy link to clipboard 
Print this post

Is the circuit affecting the ICSP lines? Anything else connected to PGD and PGC?
Visit Vegipete's *Mite Library for cool programs.
 
BobD

Guru

Joined: 07/12/2011
Location: Australia
Posts: 935
Posted: 08:52am 28 Oct 2014
Copy link to clipboard 
Print this post

Graeme

This was discussed some time back. JP3, Baud Rate Select is also one of the programming pins and is plugged and ties that pin down when running at 38.4k bps.

Is this the problem?

BobEdited by BobD 2014-10-29
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5950
Posted: 12:21pm 28 Oct 2014
Copy link to clipboard 
Print this post

I think BobD is likely to have it.
Also check that the chip is the right type...

Jim
VK7JH
MMedit   MMBasic Help
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9133
Posted: 01:11pm 28 Oct 2014
Copy link to clipboard 
Print this post

NO - nothing connected to the PGC or PGD lines. They are connected to the ICSP only, and nothing else. I did get caught by that once before, so I knew not to let that happen again. I am not using the baud-rate jumpers, I am setting the baud-rate in the menu, if I can get the chip to program, that is.

Chip is PIC32MX250F128B in SOIC. IPE set to match. IPE finds the target device and ID no problems, it starts to program the device(PICkit3 red LED blinks for a few seconds), then I get the fails.

I have tried a 9v PSU on the circuit, but I don't think that is the issue, as the 1703 is normally quite happy with a 5v input.


Smoke makes things work. When the smoke gets out, it stops!
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9133
Posted: 05:31pm 28 Oct 2014
Copy link to clipboard 
Print this post

Based on further tinkering, the PIC32 chip must be faulty - it is about the only thing I can pin it down to now, especially with exactly the same circuit in another PCB using the VT100 terminal and the exact same chip(except that one is a skinny DIL) which programs fine. I have erased and re-programmed the DIL chip about three times this afternoon, and no problems at all. As soon as I go back to the SOIC chip, it fails every time.

I have some Chip-Quik, so will use that to remove the IC and put another one on the PCB. Odd - new parts don't NORMALLY fail like this from reputable firms.

Here is a shot of the ICSP area of the PCB:





Note that although pin3 is connected to both the ICSP and the BAUD solder-blob pads, there is no blobs on any of the baud pads - all three are open-circuit, as I planned to set the baud-rate using the menu. I also changed the 10k pull-up to pin1 for a 4k7, as I note that Geoff's schematic calls for a 4k7, but that made no difference at all.Edited by Grogster 2014-10-30
Smoke makes things work. When the smoke gets out, it stops!
 
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 818
Posted: 09:02pm 28 Oct 2014
Copy link to clipboard 
Print this post

Hi Grogster,

can you show me more of your circuit? What is with your MCLR? Did you have any capacitors on it? Is your VCAP correct soldered?

Frank
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9133
Posted: 09:34pm 28 Oct 2014
Copy link to clipboard 
Print this post

OK, I have removed and replaced the PIC32, and have exactly the same issue - it won't program - keeps reporting that zero error, and device is not blank, even if you check it and it says it is blank.

@ Frank - No caps on MCLR, Vcap correctly soldered. It is a 10uF X5R MLC, 6.3v.
Smoke makes things work. When the smoke gets out, it stops!
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9133
Posted: 09:50pm 28 Oct 2014
Copy link to clipboard 
Print this post

FIXED IT!!!

I replaced the PIC32, but was getting exactly the same errors, so that made me think there MUST be a PCB layout error somewhere, so I studied the PCB layout, and found that the ground side of Vcap was not grounded. It WAS connected to the ground-plane, but that area of the ground-plane was electrically isolated from the rest of the ground-plane due to routing of tracks. I soldered a little link between the ground side of Vcap and the nearest ground reference point, and low and behold - I could program the device!

It's all up and running.

Whose a silly boy then? (rhetorical!)
Smoke makes things work. When the smoke gets out, it stops!
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3683
Posted: 10:32pm 28 Oct 2014
Copy link to clipboard 
Print this post

Yayy!

What a strange way it behaved, very much the weirdest of effects.

John
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9133
Posted: 11:30pm 28 Oct 2014
Copy link to clipboard 
Print this post

Yes indeed.
That was what I could not work out - the fact that it let me read it, and erase it, but not write to it.

Very odd.

But nice that I tracked it down, and I will make very sure all my PCB's in the queue to be made at iTead have indeed got all the grounds - grounded!
Smoke makes things work. When the smoke gets out, it stops!
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024