View previous topic :: View next topic |
Author |
Message |
GeorgeHS
Joined: 04 Jul 2008 Posts: 2
|
Unknown device type "18F2450" |
Posted: Fri Jul 04, 2008 4:40 am |
|
|
I get the following error message when I try to build my project:
--- Info 300 "D:\Clients\In10did\Projects\In10did\PIC18F2450 Source\18F2450.h" Line 2(9,15): More info: Device database: "E:\PICC\devices4.dat"
*** Error 24 "D:\Clients\In10did\Projects\In10did\PIC18F2450 Source\18F2450.h" Line 2(9,17): Unknown device type "18F2450"
When I build a 16C745 project I have no problem.
When I run CCSC +Q from the command line it does not list any 18F parts. |
|
|
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
|
|
Posted: Fri Jul 04, 2008 8:08 am |
|
|
Most likely you have a compiler package which doesn't support PIC18 processors.
CCS sells different command-line compilers for the different PIC families:
- PCB: for the PIC12 series
- PCM: for the PIC16 series
- PCH: for the PIC18 series
Then there are compiler packages with a Windows environment:
- PCW == Windows IDE + PCB + PCM
- PCWH == Windows IDE + PCB + PCM + PCH
See also http://www.ccsinfo.com/content.php?page=ideoverview
To check which compiler package you have you can execute 'CCSC +v' |
|
|
GeorgeHS
Joined: 04 Jul 2008 Posts: 2
|
|
Posted: Fri Jul 04, 2008 8:54 am |
|
|
'CCSC +v' list both PCM and PCH |
|
|
Guest
|
|
Posted: Fri Jul 04, 2008 9:01 am |
|
|
The problem was that I had specified #DEVICE 18F2450 and it need to be
#DEVICE PIC18F2450 |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Fri Jul 04, 2008 12:26 pm |
|
|
You should never have to type in that statement. You just "include"
the header file for the PIC in your program. The header file contains
the correct #device statement for the PIC, as well as all the constants
used by the built-in CCS functions. This example shows how it should
be done:
Quote: |
#include <18F2450.h>
#fuses HS,NOWDT,NOPROTECT,BROWNOUT,PUT,NOLVP
#use delay(clock=20000000)
#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, ERRORS)
//=================================
void main()
{
printf("Hello World\n\r");
while(1);
} |
|
|
|
|