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

Clock declaration?!!

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



Joined: 16 Oct 2010
Posts: 20

View user's profile Send private message

Clock declaration?!!
PostPosted: Mon Oct 18, 2010 3:46 pm     Reply with quote

Hello
I am using pic16f877A. I don't understand what to write in declaration to define my 10MHz crystal.
Should I write #USE DELAY (CLOCK=10000000)??

Also I don't understand what are fuses?!
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Oct 18, 2010 4:03 pm     Reply with quote

There is a tutorial that explains all your questions. It's about 1/2 way down
the page on the following link. Look for the section called "Sample Code".
He explains a small program line-by-line:
http://harfordhackerspace.org/2010/02/programming-pic-microcontrollers-in-c/
doryme



Joined: 16 Oct 2010
Posts: 20

View user's profile Send private message

PostPosted: Mon Oct 18, 2010 4:16 pm     Reply with quote

PCM programmer wrote:
There is a tutorial that explains all your questions. It's about 1/2 way down
the page on the following link. Look for the section called "Sample Code".
He explains a small program line-by-line:
http://harfordhackerspace.org/2010/02/programming-pic-microcontrollers-in-c/


Thanks alot for this link..it is very useful!
but i know now that i use INTRC_IO fuse when i use internal oscillator, what should i write when i use external one?!
bkamen



Joined: 07 Jan 2004
Posts: 1615
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Mon Oct 18, 2010 4:22 pm     Reply with quote

doryme wrote:
PCM programmer wrote:
There is a tutorial that explains all your questions. It's about 1/2 way down
the page on the following link. Look for the section called "Sample Code".
He explains a small program line-by-line:
http://harfordhackerspace.org/2010/02/programming-pic-microcontrollers-in-c/


Thanks alot for this link..it is very useful!
but i know now that i use INTRC_IO fuse when i use internal oscillator, what should i write when i use external one?!


You will probably want either HS (depends on the PIC).

You want to read the datasheet for the device.

-Ben
_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
Humberto



Joined: 08 Sep 2003
Posts: 1215
Location: Buenos Aires, La Reina del Plata

View user's profile Send private message

PostPosted: Mon Oct 18, 2010 4:29 pm     Reply with quote

Quote:

but i know now that i use INTRC_IO fuse when i use internal oscillator, what should i write when i use external one?!


You can find a short explanation to understand the FUSES meaning in:
http://www.ccsinfo.com/forum/viewtopic.php?t=24336&highlight=fuses

Regards
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