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

Function get_ticks(); does not work v4.119

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



Joined: 23 Sep 2009
Posts: 55
Location: Ukraine

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

Function get_ticks(); does not work v4.119
PostPosted: Thu Mar 03, 2011 7:58 am     Reply with quote

I try to use of function "get_ticks ();" and get an error message :

Quote:

*** Error 99 "TestC.c" Line 11(5,44): Option invalid Bad Option: TICKS
*** Error 12 "TestC.c" Line 19(25,26): Undefined identifier -- get_ticks
2 Errors, 0 Warnings.


Code:

#include <12F675.h>
#device adc=8
#FUSES WDT
#FUSES EC_IO
#FUSES NOCPD
#FUSES PROTECT
#FUSES NOMCLR
#FUSES PUT
#FUSES BROWNOUT
#use delay(clock=20000000,RESTART_WDT)
#USE TIMER(TIMER=1,TICKS=1ms,BITS=16,NOISR)
#use fast_io(a)
//---------------------------------
//---------------------------------
void main(){
    unsigned int16 current_tick;
//--------------------------//
for(;;){
   current_tick = get_ticks();
   }
}


In the file "ccs_c_manual.pdf" description of the function # USE_TIMER present, but in the help file (button F11 in the MPLAB) function absent.
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Thu Mar 03, 2011 2:41 pm     Reply with quote

I guess, you should read the manual more thoroughly. The option name isn't TICKS. It's compiling fine with V4.119, once corrected.
Eddy71ua



Joined: 23 Sep 2009
Posts: 55
Location: Ukraine

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

PostPosted: Thu Mar 03, 2011 3:16 pm     Reply with quote

Quote:

Examples: #USE_TIMER(TIMER=1,TICKS=1ms,BITS=16,NOISR)

void main(void) {
unsigned int16 current_tick;
current_tick = get_ticks();
}

ccs_c_manual.pdf, page 174. What wrong?

I try compile in MPLAB project.
Eddy71ua



Joined: 23 Sep 2009
Posts: 55
Location: Ukraine

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

[solved]
PostPosted: Thu Mar 03, 2011 3:26 pm     Reply with quote

In help file:
Quote:

#USE_TIMER(TIMER=1,TICKS=1ms,BITS=16,NOISR)


I change to:
Quote:

#use timer(TIMER=1,TICK=1ms,BITS=16,ISR)


Build done. Error in Help file Crying or Very sad
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Thu Mar 03, 2011 3:37 pm     Reply with quote

Quote:
Error in Help file.

I see. The online help is correct.
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