CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

MPLAB 8.70 and PIC18F46K22 (Concluded. Was ICD2 problem)
Goto page 1, 2  Next
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Mike Walne



Joined: 19 Feb 2004
Posts: 1785
Location: Boston Spa UK

View user's profile Send private message

MPLAB 8.70 and PIC18F46K22 (Concluded. Was ICD2 problem)
PostPosted: Fri Jan 22, 2016 11:06 am     Reply with quote

I know this is probably an MPLAB issue but I'm stuck.

I'm trying to migrate to PIC18F46K22.
I've got the chip plugged into my trusty PICDEM2 plus board with MPLAB 8.70, an ICD2 and an AC164112.
I get a string of messages which include the following (with some in red or blue).

ICDWarn0068: This device has a VPP(max) below the minimum ICD2 VPP level of 12V.
Please ensure that external protection for MCLR is in place. (Press the Help button for an example circuit or use AC164112 available from microchipDIRECT.com.)
Connecting to MPLAB ICD 2
...Connected
ICDWarn0031: MPLAB ICD 2 contains the incorrect operating system for the selected device. Would you like to download the correct operating system?
Downloading Operating System
ICD0191: Unable to perform operation as hardware memories are locked. Try later.
...Download Operating System Failed
Setting Vdd source to target
Target Device PIC18F46K22 found, revision = Rev 0x4
...Reading ICD Product ID
Running ICD Self Test
... Failed Self Test. See ICD2 Settings (Debugger->Settings) (status tab) for details.
ICD0024: Communications: Failed to write ('$7F00
' - 6 of 6 bytes - Windows::GetLastError() = 0x0, 'The operation completed successfully.
' - USBCOM = 0x1)
Setting Vdd source to target
Target Device PIC18F46K22 found, revision = Rev 0x4
...Reading ICD Product ID
Running ICD Self Test
... Failed Self Test. See ICD2 Settings (Debugger->Settings) (status tab) for details.
MPLAB ICD 2 ready for next operation

Are these known problems?
I can read the messages but don't know where to start to fix the problem.
Is the system telling me I can't use ICD2 with the 18F46K22?
Has anyone got this combination to work?

Mike

I can go back to older chips ('877, '458 etc), the're OK.
I've looked very carefully at the new PIC, seems OK (no folded over pins etc).


Last edited by Mike Walne on Wed Jan 27, 2016 8:09 am; edited 3 times in total
temtronic



Joined: 01 Jul 2010
Posts: 9135
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Fri Jan 22, 2016 11:26 am     Reply with quote

hmm...
this one..
ICD0191...Download Operating System Failed

might be the cause...
It sounds like the 'new operating system' never got installed. If so , everything after that probably are 'red herrings'.

I'd try again,from the beginning and get 'the new operating system' installed. I know the PICKit3 needed 'upgrading' to use the 18 series so I'm assuming he same for the ICD..


Might have to upgrade MPLAB from 8.70 to 8.86 ? Maybe the msg means MPLAB can't access the ICD2 correctly,why, I don't know...

I have used MPLABv8.86 + PICKIt 3 to program 18F46K22 in the past.

Jay
Mike Walne



Joined: 19 Feb 2004
Posts: 1785
Location: Boston Spa UK

View user's profile Send private message

PostPosted: Fri Jan 22, 2016 12:17 pm     Reply with quote

Thanks jay.

I tried MPLABX but it does not recognize ICD2 (only ICD3 onwards).
I'll try the latest of the MPLAB numbered versions 8.92.
(And cross everything.)

I can do other 18 series parts (18F1320, 18F452, 18F458 etc).
So not clear what the real issue is.

Mike
temtronic



Joined: 01 Jul 2010
Posts: 9135
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Fri Jan 22, 2016 1:37 pm     Reply with quote

Hay Mike

I've never upgraded from .86 as it works for me. One of them old skool...it ain't broke, don't need fixin things


jay
Mike Walne



Joined: 19 Feb 2004
Posts: 1785
Location: Boston Spa UK

View user's profile Send private message

PostPosted: Fri Jan 22, 2016 3:32 pm     Reply with quote

Hi jay,

Totally agree, we're the same vintage(ish).
Unfortunately it's broke, so I have to do something.
I've removed 8.70 and replaced with complete 8.92 install.

Result. No change.
I can program PIC18F458, no problem.
PIC18F46K22 is same as before.
Will try to negotiate with MPLAB, and post anything helpful.

Thanks again for trying.
It's late here (UK), I've had too much rioja, so will have to wait till tomorrow.

Mike
temtronic



Joined: 01 Jul 2010
Posts: 9135
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Fri Jan 22, 2016 3:39 pm     Reply with quote

sigh
my gut feeling says it's the ICD SW, maybe the 46k22 isn't in it's database while the others are?
Too much fancy technology...wish I could go back to Teletypes, 6L6 tubes and milk from a cow.

Maybe google the problem or icd2 46k22 ?? though i imagine you've thought of that.

Jay
edit:
From the mchip page...
The MPLAB ICD 2 is not recommended for new designs and will not support new MCU or dsPIC devices released after September 2010.
hmmmm....
dyeatman



Joined: 06 Sep 2003
Posts: 1917
Location: Norman, OK

View user's profile Send private message

PostPosted: Fri Jan 22, 2016 4:18 pm     Reply with quote

I have the ICD-U64 and had to send it to CCS for a firmware upgrade to handle these chips...
_________________
Google and Forum Search are some of your best tools!!!!
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Jan 22, 2016 8:39 pm     Reply with quote

I tested this problem with the following:

1. 18F45K22, silicon rev. 2 (it's the same family as a 18F46K22).
2. ICD2 (the sticker on the back says ECO 3013, Rev 23).
3. AC164112 - MPLAB ICD 2 Vpp Voltage Limiter.
4. PicDem2-Plus (older, red board, non-rohs version)
5. MPLAB 8.92
6. MPLAB set for Release mode.

The PIC runs at +5v on this board.

Initially I had the AC164112 installed backwards and the ICD2 wouldn't
connect to the PIC. I quickly flipped it in the cable, and that was fixed.

I programmed the following test program and it works fine. It blinks
the LED on pin B0.
Code:

#include <18F45K22.h>
#fuses INTRC_IO, NOWDT
#use delay(clock=4M)

//=====================================
void main()
{

while(TRUE)
  {
   output_toggle(PIN_B0);
   delay_ms(500);
  }

}


Suggestions:
1. Check the ECO and revision level on the back of your ICD2.
What is it ?

2. Make sure that the Configure menu in MPLAB is set for your PIC.
Mike Walne



Joined: 19 Feb 2004
Posts: 1785
Location: Boston Spa UK

View user's profile Send private message

PostPosted: Sat Jan 23, 2016 5:53 am     Reply with quote

Hi PCM,

That's all very reassuring.
Nice to know connecting the limiter in reverse seems to cause no damage.

My ICD2 does not have an ECO No.
It's got a P/N 10-00319 R13
And Serial# BUR033010154

I have configured MPLAB for the correct part.
The compiler complains if I don't.

So I ignored the previous messages and simply tried to program the chip with code to flash B0 and got this string of messages.

Programming Target...
...Validating configuration fields
...Erasing Part
...Loading DebugExecutive
...Programming DebugExecutive
ICD0042: API: Error response (Framing Error (0x01))
ICD0151: Failed to sync memory (MT = Test) (Dir = 0x1)
ICD0275: Programming failed.
MPLAB ICD 2 ready for next operation

I'll try MPLAB next.
Thank you.

Mike

This is the list of supported devices which accompanies MPLABv8.60

DLL and Firmware versions:

ICD2.dll v8.53.6.1
PIC12F/16F v2.07.06 (ICD01020706.hex)
PIC12F61X/16F61X v1.01.04 (ICD15010104.hex)
PIC12F520 v0.00.04 (ICD23000004.hex)
PIC18F v2.08.00 (ICD04020800.hex)
PIC18F Extended v1.04.05 (ICD05010405.hex)
PIC18C601/801 v1.02.05 (ICD06010205.hex)
PIC10F2XX v1.04.06 (ICD07010406.hex)
PIC16F68X v1.06.01 (ICD08010601.hex)
PIC12F629/675 v1.00.03 (ICD09010003.hex)
dsPIC30F Rev B1 v1.06.05 (ICD10010605.hex)
dsPIC30F SMPS Rev 1 v1.00.09 (ICD18010009.hex)
PIC18F67J/87J v3.00.06 (ICD11030006.hex)
PIC16F72 v1.02.03 (ICD12010203.hex)
PIC18F45K20/14K50 v2.06.00 (ICD16020600.hex)
dsPIC33F v3.04.08 (ICD14030408.hex)
PIC32MX v1.02.00 (ICD20010200.hex)
PIC16F Enhanced v0.03.03 (ICD22000303.hex)
PIC24F16KA102 family v0.01.00 (ICD21000100.hex)
PIC24FJ256DA210 family v0.00.07 (ICD24000007.hex)

October 25, 2010

Stangely '45K20 is in the list but not the '46K.
As you say they're all the same family, so should not be a problem.
List is dated October 2010. Worryingly my ICD2 predates that by a long way.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sat Jan 23, 2016 11:05 am     Reply with quote

I thought you were going to upgrade to MPLAB vs. 8.92. That's what you
should do. The PIC family is in the last digits. "K20" is a different PIC
family than "K22".

If you can't make it work, put in a trouble ticket to Microchip support.
Ask them if your ICD2 revision will work with the 18F46K22. If it can't,
will they upgrade it for you ?
Mike Walne



Joined: 19 Feb 2004
Posts: 1785
Location: Boston Spa UK

View user's profile Send private message

PostPosted: Sat Jan 23, 2016 12:04 pm     Reply with quote

PCM programmer wrote:
I thought you were going to upgrade to MPLAB vs. 8.92. That's what you
should do. The PIC family is in the last digits. "K20" is a different PIC
family than "K22".

If you can't make it work, put in a trouble ticket to Microchip support.
Ask them if your ICD2 revision will work with the 18F46K22. If it can't,
will they upgrade it for you ?

Yes, I did upgrade to 8.92 with no change in the result.
The 8.60 list I used was the first to hand.
I've checked with the 8.92 readme file which includes
Quote:
PIC18F45K20/14K50 v2.06.00 (ICD16020600.hex)
My system appears to be uploading that file when it downloads a new operating system (firmware).
I don't appear to have much choice but deal directly with MPLAB.
I'm now a bit clearer about where the problem lies, and may be asking the right questions

Thanks again

Mike
temtronic



Joined: 01 Jul 2010
Posts: 9135
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sat Jan 23, 2016 12:13 pm     Reply with quote

Mike, you might have to 'upgrade' to ICD-3 or PICkit-3. I did the PK3 thing few years back as uC wouldn't upgrade the PicstartPlus anymore.......have 2 'dust collectors' now.

PK3 are about $75 CDN, clones only $30 ! Don't know about $$ on your side of the pond.

Jay
Mike Walne



Joined: 19 Feb 2004
Posts: 1785
Location: Boston Spa UK

View user's profile Send private message

PostPosted: Sat Jan 23, 2016 5:36 pm     Reply with quote

temtronic wrote:
Mike, you might have to 'upgrade' to ICD-3 or PICkit-3. I did the PK3 thing few years back as uC wouldn't upgrade the PicstartPlus anymore.......have 2 'dust collectors' now.

PK3 are about $75 CDN, clones only $30 ! Don't know about $$ on your side of the pond.

Jay
Yes, I've got a horrible feeling you're probably spot on.
Goes against the grain a bit, but that's how it is, don't have the time and resources to work it out.

Been thinking back to the olden days of 2716's and their ilk.
Built my own programmer from scratch then coded a Z80, in assembler, to run it!
Over here ICD3 on its own is about £130 + 20% tax. (Don't know the conversion to $CDN.)
Even more if you shell out for yet another PICDEM version to go with it.

Mike
temtronic



Joined: 01 Jul 2010
Posts: 9135
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sat Jan 23, 2016 7:31 pm     Reply with quote

I checked digikey-gb and the PK3 is about 35 pounds, maybe have a look at the specs to see if it's an option? I only use it to blast the PICs,always test in real world.

I still have the original remote energy control computer here, 6800 with 8 - 2708s as the 'brains', 8K bytes works on MILES of copper and hacker proof.About 5K when new..could be replaced with a $5 PIC.

things have changed a wee bit in 30 years !

Jay
gpsmikey



Joined: 16 Nov 2010
Posts: 588
Location: Kirkland, WA

View user's profile Send private message

PostPosted: Sat Jan 23, 2016 9:18 pm     Reply with quote

Yep - still have a bunch of 2716's (and even a few 2708's) downstairs too. Had the Cromemco Bytesaver programmer for them. Hand assembled 8080 (and Z-80) code until I got an assembler running under CP/M. Still have my handy little slide rule gadget that allowed you to calculate octal code for the various instructions (and still remember many of them too 176 and 167 were used to move to/from memory and the ACC. Got a kick out of the fact that the halt instruction was 166 (MOV M,M). Octal was the easiest to use because most instructions consisted of a 2 bit opcode followed by two 3 bit fields for destination, source. I was thrilled when things like the 8751 became available then the PICs came along and an entire board full of "stuff" ran on a single voltage and was only a couple of bucks (remember the ads in Byte magazine and others for a Z-80 cpu and manual for $149??)

Much more fun with the PIC and CCS compiler to work with C instead of assembler (and having to calculate addresses).

mikey
_________________
mikey
-- you can't have too many gadgets or too much disk space !
old engineering saying: 1+1 = 3 for sufficiently large values of 1 or small values of 3
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group