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

Problem with fuses

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



Joined: 28 Nov 2017
Posts: 1

View user's profile Send private message

Problem with fuses
PostPosted: Tue Nov 28, 2017 4:37 am     Reply with quote

Hello to everybody,
I'm going crazy with #FUSES defined with pic16f88 and ccs/ide version 5.019.

This is the code:
file .h
Code:

#include <16F88.h>
#device ADC=10

#FUSES NOWDT

//#device ICD=TRUE
#use delay(clock=8000000)

file.c
Code:

#include <VR_PWM.h>

/*
#INT_TIMER1
void  TIMER1_isr(void) {

clear_interrupt(int_TIMER1); 
}
*/

void main() {
setup_oscillator(OSC_8MHZ|OSC_INTRC);
setup_wdt(0);
  // setup_adc_ports(sAN0);
  // setup_adc(ADC_CLOCK_DIV_2);
  // setup_timer_1(T1_INTERNAL|T1_DIV_BY_4);      //131 ms overflow
  // setup_timer_2(T2_DIV_BY_1,39,1);      //20,0 us overflow, 20,0 us interrupt

  // setup_ccp1(CCP_PWM);
  // set_pwm1_duty((int16)0);

  // enable_interrupts(INT_TIMER1);
  // enable_interrupts(GLOBAL);

  while(TRUE){
      //TODO: User Code
      output_High(PIN_A2);
      delay_ms(100);
      output_Low(PIN_A2);
      delay_ms(100);
   }

}

When i compile the code i have:
Quote:
Unknown keyword in #FUSES "NOWDT"

I tried to change multiple fuses but the result is the same!

Simone
temtronic



Joined: 01 Jul 2010
Posts: 9249
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Tue Nov 28, 2017 6:19 am     Reply with quote

I don't see why that error occurs. Perhaps remove all commented out code, the pwm header, etc. and recompile. Even IF the device header was bad, that error shouldn't happen.


this...
setup_wdt(0);

is incorrect as '0' is not a valid option. If you look at the pic 'device' header, it lists all the options for that PIC.

I'd start with the simple '1Hz LED program', get it working, then build upon that.

Jay
dyeatman



Joined: 06 Sep 2003
Posts: 1937
Location: Norman, OK

View user's profile Send private message

PostPosted: Tue Nov 28, 2017 6:21 am     Reply with quote

It compiles under 5.075 with no problems.
_________________
Google and Forum Search are some of your best tools!!!!
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Nov 28, 2017 6:32 am     Reply with quote

You have this line at the top of your program:
Quote:
#include <VR_PWM.h>

You call your header file "file.h". But you don't have an #include line
for file.h. You have it for VR_PWM.h.

What is in VR_PWM.h ?
temtronic



Joined: 01 Jul 2010
Posts: 9249
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Tue Nov 28, 2017 9:41 am     Reply with quote

maybe (V)ariable (R)esistor to (P)ulse(W)idth(M)odulation .

it is confusing though

For small 'beginner' or 'test' programs, it's always best to have the ENTIRE program in one file. Everything from PIC device.h to end of main(). Once it does work THEN you can breakdown into smaller 'include' files.
I have a separate 'fuses' file ( 46k22_basic_fuses.fuz ) for PIC18F46K22 projects. It is a complete(yes, every fuse) set that works as tested with a 1Hz LED program. I'm a lousy typist(bad finger) so doing it once really helps, especially since there are more fuses than PIC instructions !
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