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 CCS Technical Support

"unknown device type" error V.3249

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
bygolley



Joined: 04 Jul 2007
Posts: 6
Location: Prince George BC CAN

View user's profile Send private message

"unknown device type" error V.3249
PostPosted: Fri Aug 01, 2008 6:03 pm     Reply with quote

Just recently moved my projects over to a newer box with V3.249 on it. Code that compiled cleanly on the older machine (version unknown now but not much older than 3.249) gives me an error "unknown device type "PIC18F458" on the newer machine. The compiler stops at the first line of the standard header file at "#device PIC18F458". All of my "include" directories point to the right locations and the device editor lists the PIC18F458 as well so I am a little mystified as to where else to look. Has anyone come across something like this before.

Cheers,
Bygolley
_________________
Cheers,
Bill
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Fri Aug 01, 2008 6:55 pm     Reply with quote

Which compiler suite are you using? The CCS compiler comes in several 'flavours' for the different PIC families; PCW for PIC12/16, PCWH for PIC12/16/18 and then there are several command line versions of the compiler.

In MPLAB you can get this error when the incorrect chip is selected under 'Configure/Select Device...'.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Aug 01, 2008 6:56 pm     Reply with quote

1. Are you using the CCS IDE, or MPLAB ?
If it's the CCS IDE, is it PCW or PCWH ? You need the later one.

2. If you are using MPLAB, do you have the PCH compiler installed ?
Or is it only the PCM compiler ?

PCWH or PCH is required for the 18F458.
bygolley



Joined: 04 Jul 2007
Posts: 6
Location: Prince George BC CAN

View user's profile Send private message

PostPosted: Fri Aug 01, 2008 7:33 pm     Reply with quote

Thank you both for the quick response. I am using the PCWH flavour
_________________
Cheers,
Bill
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Aug 01, 2008 7:40 pm     Reply with quote

Make a project. Copy and paste in this test program. The program
should consist of this code only. Try to compile it. What happens ?
Code:
#include <18F458.h>
#fuses XT, NOWDT, NOPROTECT,PUT,BROWNOUT,NOLVP
#use delay(clock=4000000)

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

while(1)
  {
   output_high(PIN_B0);
   delay_ms(500);
   output_low(PIN_B0);
   delay_ms(500);
  }

}
   
bygolley



Joined: 04 Jul 2007
Posts: 6
Location: Prince George BC CAN

View user's profile Send private message

PostPosted: Fri Aug 01, 2008 8:19 pm     Reply with quote

It does the same thing as before. It stops at the first line in the 18F458.h header file at "#device PIC18F458". And the same error comes up "unknown device type "PIC18F458". The device editor under "Tools" has it in its listing and I rechecked the "Include dir..." under "Options" and it has the correct path...
_________________
Cheers,
Bill
newguy



Joined: 24 Jun 2004
Posts: 1911

View user's profile Send private message

PostPosted: Fri Aug 01, 2008 8:32 pm     Reply with quote

Hi Bill,

Long time, eh?

At the top of the compiler window is a drop down box. It should have "Microchip PIC18" selected. The other options are Microchip 12 bit and Microchip 14 bit. That's the only thing I can think of that may explain what you're seeing.
bygolley



Joined: 04 Jul 2007
Posts: 6
Location: Prince George BC CAN

View user's profile Send private message

PostPosted: Fri Aug 01, 2008 8:43 pm     Reply with quote

Hi Mark,

Yup it has...how are ya?

That is one of the first things I checked and I have been through the manual checking for the error which led me to the explanation for #device. I tried the command START | RUN | CCSC +Q and it listed my device. The confounded thing also is I moved from a CF 28 Panasonic to a CF 30 with the same OS (XP) so really no big change. Even re-installed the compiler from the disk....sheesh
_________________
Cheers,
Bill
foodwatch



Joined: 18 Apr 2006
Posts: 66

View user's profile Send private message Yahoo Messenger

PostPosted: Sat Aug 02, 2008 11:15 pm     Reply with quote

I had a similar problem awhile back with an 18F4550 where the device file had changed. In my case it was when they added the 10 bit a/d provision by allowing ADC = 10. It is a long shot, but be sure the device files are the same vintage as the compiler.
jfarkas



Joined: 07 Dec 2006
Posts: 4
Location: Croatia

View user's profile Send private message

PostPosted: Sun Aug 03, 2008 3:44 pm     Reply with quote

Copy & paste 18F458 header (device) file to same folder as your project is.
Then try compile. If compiles - it's path problem - empty space or similar

Good luck!
dyeatman



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

View user's profile Send private message

PostPosted: Sun Aug 03, 2008 4:54 pm     Reply with quote

This now has me wondering...

In 3.249, If I just rename my 18F458.h file, I get messages saying the file wasn't found, NOT the "unknown device" message. To me this indicates the compiler itself is an old version that does not recognize the 18F458 chip....

Bygolley, it sounds like to me the compiler may have an installation problem where it is not licensed properly (reg files do change periodically) or the compiler file itself is a version before the chip was added. I would suspect there is more than one version installed and somehow they are mixed... The cure may be to remove the compiler and all misc remnants then re-install the compiler. If you have the reg files for 3.249, since it is still posted, I would download the version from the CCS website and try it.

Anyone else agree or am I off base..?
bygolley



Joined: 04 Jul 2007
Posts: 6
Location: Prince George BC CAN

View user's profile Send private message

PostPosted: Sun Aug 03, 2008 6:08 pm     Reply with quote

Thanx dyeatman...you might be onto something here since the compiler refuses to acknowledge any device. I have tried a number of different part numbers with PCM Programmers snippet and I get the same result. I did try your suggestion and uninstalled etc but no cigar yet. I don't recall having to do any registration when I originally installed on the other puter so I am wondering what you mean by reg files. Could you elaborate? Confused Also, after the new installation (after what I thought was a pretty complete uninstall) the new installation somehow "knew" what my "include dir" list was. I am wondering where it got that from...is it buried deep in the dreaded registry? I'm gonna go snooping..but no editing yet.

BTW...I have tried all of the other suggestions from everyone and many thanx. And this is the compiler version I have been using all along with this chip with no worries for over a year (or so) so I don't think the compiler precedes the chip.
_________________
Cheers,
Bill
dyeatman



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

View user's profile Send private message

PostPosted: Sun Aug 03, 2008 6:26 pm     Reply with quote

In that version the pathing came from one of two places, the ccs.ini file or the autoexec.bat file. I don't believe they put it in the registry at that time.

Your registration files are files ending in .crg that must reside in the same directory as the CCSc.exe and pcw.exe files.

Mine, for PCWH example are pcb.crg, pcm.crg and pch.crg dated 11/8/2005. These were the last ones they sent out prior to version 4.

Back in version 3.xxx CCS periodically disabled the license files which forced the user to go back and ask them for new ones (this apparently was to prevent illegal copies). However, they haven't done it since Ver 4 as far as I remember.

Dave
bygolley



Joined: 04 Jul 2007
Posts: 6
Location: Prince George BC CAN

View user's profile Send private message

PostPosted: Mon Aug 04, 2008 12:39 am     Reply with quote

Dave,

In the words of Montgomery Burns..."Excellent". It is all working now. It wasn't exactly what you thought but you certainly led me down the right path. I retried the uninstall but elected for the custom uninstall instead of automatic. There I was able to ensure that all the files were going to be deleted plus all of the registry entries. I also found a pcw.ini file hiding in C:\ and renamed that as well. A fresh install from the disk was next and voila....success. My latest code version is sitting on the chip as we speak and is ticking away. Thank you for your help and Thank you to everyone else for persisting. Very Happy
_________________
Cheers,
Bill
dyeatman



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

View user's profile Send private message

PostPosted: Mon Aug 04, 2008 5:47 pm     Reply with quote

Glad I could be of assistance! Very Happy
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
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