View previous topic :: View next topic |
Author |
Message |
alexhenrique
Joined: 30 Oct 2014 Posts: 2
|
Handle with internal registers |
Posted: Sat Nov 08, 2014 7:27 am |
|
|
I wonder how I can using the CCS compiler to manipulate the bits of special registers. That's because I do not like the way the CCS automatically configures the registers, I prefer to manually adjust.
Another reason is because I have some programs that facilitate adjusting the registers, such as this, made for mikroC.
http://pic-timer-calculator.software.informer.com/ |
|
|
dyeatman
Joined: 06 Sep 2003 Posts: 1934 Location: Norman, OK
|
|
|
alexhenrique
Joined: 30 Oct 2014 Posts: 2
|
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19552
|
|
Posted: Sat Nov 08, 2014 12:58 pm |
|
|
Look at the second example already given.
Look at how much clearer and shorter Ckielstra's translation into CCS is, than the original code.
There are _very_ repeat _very_ few times when direct access is wanted. The first example given already, shows me doing this to allow 16bit accesses to be turned 'off' for the timer, and to write the single byte. This is the sort of things were such accesses are worthwhile, but 99.9% of the time, the CCS functions are safer (include things like bug fixes for the processor), and ensure things are set in the proper order. |
|
|
|