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

How to create a header file for images

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



Joined: 07 Feb 2012
Posts: 34

View user's profile Send private message

How to create a header file for images
PostPosted: Sun Mar 25, 2012 11:24 am     Reply with quote

hello guys !
I'm using more than 5 images (pic18f452+GLCD (ks0108) 128x64)
and when i declare them in my code I don't feel comfortable, so I would like to know how to put them in a header file and use #include to call them !! thanks
_________________
NOway!!
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Mar 25, 2012 12:53 pm     Reply with quote

Just make a new file. Every IDE (CCS or MPLAB) has a file menu option
called File / New. It make a new file. Then copy and paste your arrays
into that file. Delete them from the old file. Then save the new file as
images.h or some suitable name. Save it in the same directory as your
main project file. Then edit your main source file and put in an #include
statement for images.h, like this:
Code:

#include <18F452.h>
#fuses XT,NOWDT,PUT,BROWNOUT,NOLVP
#use delay(clock=4M)
#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, ERRORS)

#include "images.h"

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

while(1);
}
exodia505



Joined: 07 Feb 2012
Posts: 34

View user's profile Send private message

PostPosted: Sun Mar 25, 2012 1:27 pm     Reply with quote

Thanks, is it the same if want to move my procedures or functions that I've created too?
_________________
NOway!!
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Mar 25, 2012 4:59 pm     Reply with quote

Yes, do it the same way.
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