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

The use of delay for external crystal on a PIC12F1572

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



Joined: 03 Jun 2009
Posts: 29

View user's profile Send private message

The use of delay for external crystal on a PIC12F1572
PostPosted: Sun Feb 16, 2020 5:07 am     Reply with quote

Hi

I am having trouble understanding what's wrong with my code on a PIC12F1572.

My code (*.c)
Code:
#include <CCS_12F1572_Billy.h>

void main()
{

  while(TRUE)
  {

    //Example blinking LED program
    output_low(LED);
    delay_ms(DELAY);
    output_high(LED);
    delay_ms(DELAY);

    //TODO: User Code
  }

}


The header file (*.h)
Code:

#include <12F1572.h>
#device ADC=10
#use delay (crystal=4MHz)

#define LED PIN_A0
#define DELAY 10


Anf here is the error from CCS compiler version 5.078

Quote:

Compiling E:\UserData\PIC-Stuff\Examples Momo\CCS_12F1572_Billy on 16-Feb-20 at 12:01
*** Error 99 "E:\UserData\PIC-Stuff\Examples Momo\CCS_12F1572_Billy.h" Line 3(5,26): Option invalid Invalid Combination
1 Errors, 0 Warnings.
Build Failed.


Any help? any advice?

Many thanks.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Feb 16, 2020 5:41 am     Reply with quote

Look at the oscillator diagram in the datasheet. It shows no crystal
oscillator support circuit or pins. It has a single CLKIN pin. That's for
an external clock source. Yes, a small number of PICs have no support
for crystals.
Momboz



Joined: 03 Jun 2009
Posts: 29

View user's profile Send private message

PostPosted: Sun Feb 16, 2020 10:02 am     Reply with quote

PCM programmer wrote:
Look at the oscillator diagram in the datasheet. It shows no crystal
oscillator support circuit or pins. It has a single CLKIN pin. That's for
an external clock source. Yes, a small number of PICs have no support
for crystals.


That was the issue.
Many many thanks.
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