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

No timer1 defines in H file for 18FJ4611

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



Joined: 11 May 2007
Posts: 57
Location: Montreal,Canada

View user's profile Send private message

No timer1 defines in H file for 18FJ4611
PostPosted: Mon Mar 22, 2010 1:58 pm     Reply with quote

Hi!

I updated to 4.105 PCWHD compiler and there is no defines for timer1 in the header file for the PIC18F46J11 so i get an error in my program. How come and what should i do. Thanks

AC
-------------
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Mar 22, 2010 2:05 pm     Reply with quote

You're right. I installed vs. 4.104, and it has these constants.
You can edit your .h file, and add these to it.

But make sure you email CCS support and tell them about the bug
in vs. 4.105.
Code:

////////////////////////////////////////////////////////////////// Timer 1
// Timer 1 Functions: SETUP_TIMER_1, GET_TIMER1, SET_TIMER1
// Constants used for SETUP_TIMER_1() are:
//      (or (via |) together constants from each group)
#define T1_DISABLED         0
#define T1_INTERNAL         0x07
#define T1_INTERNAL_TIMES_4 0x47
#define T1_EXTERNAL         0x87
#define T1_EXTERNAL_SYNC    0x83

#define T1_CLK_OUT          8

#define T1_DIV_BY_1         0
#define T1_DIV_BY_2         0x10
#define T1_DIV_BY_4         0x20
#define T1_DIV_BY_8         0x30
Chibouraska



Joined: 11 May 2007
Posts: 57
Location: Montreal,Canada

View user's profile Send private message

PostPosted: Mon Mar 22, 2010 2:29 pm     Reply with quote

Thanks PCM! your always a great help. I will email support.
Charlie U



Joined: 09 Sep 2003
Posts: 183
Location: Somewhere under water in the Great Lakes

View user's profile Send private message

PostPosted: Mon Mar 22, 2010 3:01 pm     Reply with quote

I reported this to CCS regarding the missing parameters in the 16F1937.h files. I received an email from Darren stating that this will be corrected in V4.106 which will be released either today or tomorrow.
bkamen



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

View user's profile Send private message

PostPosted: Tue Mar 23, 2010 10:33 pm     Reply with quote

4.106 was released today.

Interestingly, these are the values for timer1

Code:

////////////////////////////////////////////////////////////////// Timer 1
// Timer 1 Functions: SETUP_TIMER_1, GET_TIMER1, SET_TIMER1
// Constants used for SETUP_TIMER_1() are:
//      (or (via |) together constants from each group)
#define T1_DISABLED         0
#define T1_INTERNAL         0x05
#define T1_EXTERNAL         0x87
#define T1_EXTERNAL_SYNC    0x83
#define T1_FOSC             0x45

#define T1_CLK_OUT          8

#define T1_DIV_BY_1         0
#define T1_DIV_BY_2         0x10
#define T1_DIV_BY_4         0x20
#define T1_DIV_BY_8         0x30

#define T1_GATE           0x8000
#define T1_GATE_INVERTED  0xC000
#define T1_GATE_TOGGLE    0xA000
#define T1_GATE_SINGLE    0x9000
#define T1_GATE_TIMER0    0x8100
#define T1_GATE_COMP1     0x8200
#define T1_GATE_COMP2     0x8300


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



Joined: 09 Sep 2003
Posts: 183
Location: Somewhere under water in the Great Lakes

View user's profile Send private message

PostPosted: Wed Mar 24, 2010 11:03 am     Reply with quote

Hi Ben,

Why do you say "interestingly"? Are these wrong? At first glance, they look correct. There are definitely some new ones vs 4.104.

Charlie
bkamen



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

View user's profile Send private message

PostPosted: Wed Mar 24, 2010 12:33 pm     Reply with quote

PCM programmer wrote:

Code:

#define T1_DISABLED         0
#define T1_INTERNAL         0x07
#define T1_INTERNAL_TIMES_4 0x47
#define T1_EXTERNAL         0x87
#define T1_EXTERNAL_SYNC    0x83


PCM programmer wrote:

Code:

#define T1_DISABLED         0
#define T1_INTERNAL         0x05
#define T1_EXTERNAL         0x87
#define T1_EXTERNAL_SYNC    0x83
#define T1_FOSC             0x45


Look at the different between the 2.. a couple #defines have different values AND the names.
_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
Charlie U



Joined: 09 Sep 2003
Posts: 183
Location: Somewhere under water in the Great Lakes

View user's profile Send private message

PostPosted: Wed Mar 24, 2010 3:01 pm     Reply with quote

I must be the one that is "dazen and confused". I was just looking at them from the definition stand point, not the delta from 4.104 to 4.106. Anyway, let's hope that these are correct and won't change in another release. I am off to check the 16F1937.h file now to see if it is correct for my project.
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