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

Total Newbie. Help!! Missing 18F452.h file

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



Joined: 08 Aug 2005
Posts: 5

View user's profile Send private message Send e-mail

Total Newbie. Help!! Missing 18F452.h file
PostPosted: Mon Aug 08, 2005 7:47 am     Reply with quote

1st day doing any PIC programming. I'm just attempting to get anything/something to compile then downlaod it on to a PIC. I'm using a PIC18F452 device on a PICDEM2 dev board. At the moment the compiler is coming up with an error:

#include file can note be opened:

Not in file c:\program files\PICC\devices\18F452.h

I have run the CCSC +Q program and it confirms that the 18F452 device is installed on the compiler. Why is there no associated .h file?

If anybody could recommend some good starter material for newbies it would be appreciated.
treitmey



Joined: 23 Jan 2004
Posts: 1094
Location: Appleton,WI USA

View user's profile Send private message Visit poster's website

PostPosted: Mon Aug 08, 2005 8:25 am     Reply with quote

Try compiling this. Work through some of the samples. Also I put a PICDEM2 PLUS LCD driver in the code library. Get that and try to print something to the LCD. If this doesn't compile, I would say that the software wasn't installed correctly. adding a path env variable to "C:\Program Files\PICC"
Code:
#include <18f452.h>
#case
#use delay(clock=16000000)
#fuses hs,nowdt,noprotect,nolvp
#use rs232(baud=19200,xmit=PIN_B4,invert,stream=DEBUG)
#zero_ram
#define VER_MAJOR 2
#define VER_MINOR 00

//======================= MAIN ============================//
void main(void)
{
  fprintf(DEBUG,"\n\r");
  fprintf(DEBUG,"STARTING\n\r");
  fprintf(DEBUG,"FIRMWARE VERSION %u.%02u\n\r",VER_MAJOR,VER_MINOR);
  //****************//
  fprintf(DEBUG,"Start..\n\r");
  fprintf(DEBUG,"done!\n\r");
  while(1)
  {
  }
}

KevinMonk



Joined: 08 Aug 2005
Posts: 5

View user's profile Send private message Send e-mail

PostPosted: Mon Aug 08, 2005 8:54 am     Reply with quote

Thanks.

but.. I'm still left wondering why I dont have an 18F452.h file in any of my include directories. SUrely they should be there right?
rwyoung



Joined: 12 Nov 2003
Posts: 563
Location: Lawrence, KS USA

View user's profile Send private message Send e-mail

PostPosted: Mon Aug 08, 2005 9:22 am     Reply with quote

Are you using the demo version of the compiler or a full licensed version?

From the CCS web page:

Quote:
Only the Microchip 14 bit PIC16F877, PIC16C544 and 16 bit PIC18F458 target devices may be specified. Click here for a current and complete list of devices supported by CCS. All PIC12, 14, 16 and PIC18 devices are supported in the full product.

_________________
Rob Young
The Screw-Up Fairy may just visit you but he has crashed on my couch for the last month!
treitmey



Joined: 23 Jan 2004
Posts: 1094
Location: Appleton,WI USA

View user's profile Send private message Visit poster's website

PostPosted: Mon Aug 08, 2005 9:28 am     Reply with quote

rwyoung is right. If you don't have the file
"c:\program files\PICC\devices\18F452.h"

Then the software isn't installed right
OR
you don't have the full commercial version.

The free version only works on limited PICs.

ie I have 280 files in the devices folder.
KevinMonk



Joined: 08 Aug 2005
Posts: 5

View user's profile Send private message Send e-mail

PostPosted: Mon Aug 08, 2005 9:58 am     Reply with quote

Ok. problem solved. Seems I was using the PCW compiler rather than the PCWH compiler that is needed for compiling code for PIC18F devices.

Thanks for your help anyway.

The CCSC +Q thing still tells you that the program has 18F devices included though.

All seems to be compiling now. Now i've just got to figure out how to get the program on the board and I'll hopefully be a little bit higher up this VERY steep learning curve. Shocked I'm just hoping that it will be one of these things that just starts to click and gets easier the more you get in to it.
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