View previous topic :: View next topic |
Author |
Message |
Chibouraska
Joined: 11 May 2007 Posts: 57 Location: Montreal,Canada
|
No timer1 defines in H file for 18FJ4611 |
Posted: Mon Mar 22, 2010 1:58 pm |
|
|
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
|
|
Posted: Mon Mar 22, 2010 2:05 pm |
|
|
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
|
|
Posted: Mon Mar 22, 2010 2:29 pm |
|
|
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
|
|
Posted: Mon Mar 22, 2010 3:01 pm |
|
|
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
|
|
Posted: Tue Mar 23, 2010 10:33 pm |
|
|
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
|
|
Posted: Wed Mar 24, 2010 11:03 am |
|
|
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
|
|
Posted: Wed Mar 24, 2010 12:33 pm |
|
|
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
|
|
Posted: Wed Mar 24, 2010 3:01 pm |
|
|
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. |
|
|
|