|
|
View previous topic :: View next topic |
Author |
Message |
Ttelmah
Joined: 11 Mar 2010 Posts: 19539
|
|
Posted: Wed Sep 14, 2016 4:16 am |
|
|
I think you need to understand they are not 'illegal statements'. CCS would highlight them if they were.
The strings like 'T0_DIV_1' are just convenience 'defines' for numbers. The function accepts any number, it is up to you to ensure that the values you select are right.
You can put any define into a setting, just as you can enter any number into a calculator. However they will only make sense if they are the numbers for the sum you want.
In this case, you are mixing a define from the T0 set, with others from the RTCC set. If you look at the RTCC set, they say:
"The following are provided for compatibility with older compiler versions".
You are mixing old with new.
It's like having a tape measure in inches, and another in cm, and then taking one set of values using the former, and mixing them with ones from the latter. Not surprising if you get a wrong result....
CCS can't check these values, since just as with the calculator, and value could be the one you actually want.
The big difference though is that in the second statement you are running the timer in 16bit mode. The default. The first statement would give exactly the same, if you removed the 8_bit part. |
|
|
Linuxbuilders
Joined: 20 Mar 2010 Posts: 193 Location: Auckland NZ
|
|
Posted: Wed Sep 14, 2016 2:30 pm |
|
|
Thnx, I agree. It is copy/paste from old program I have overlooked. So I agree but compiler could check device file and then indicate that current entries do not match the device file. This would help. _________________ Help "d" others and then you shell receive some help from "d" others. |
|
|
|
|
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
|