|
|
View previous topic :: View next topic |
Author |
Message |
ysaacb
Joined: 12 Jun 2006 Posts: 19
|
Register file map |
Posted: Wed Jun 14, 2006 6:11 am |
|
|
Hi everybody
I worked with another C compiler an now I am trying with CCS
Why the register file map is not defined in the device header, I understand that in CCS C is necessary to use #BYTE or #BIT directive to access directly to one of the register.
Considering that in a project can occur to change the device, the code has to be revised an adapt to the new file addresses. And there is the need to find in the data sheets the corresponding address.
In other compilers the table is already defined for each device.
Ysaac |
|
|
treitmey
Joined: 23 Jan 2004 Posts: 1094 Location: Appleton,WI USA
|
|
Posted: Wed Jun 14, 2006 8:04 am |
|
|
I don't know whats going on in CCS's head.
And correct me if I am wrong...
But I think the therory is that most people don't change chips very often.
((I use only 3 16F877A,18F452,18F4525))
and the 4525 is the replacement for the 452
Since you don't change often.. this remaping is just part of the move.
just like you will have to review the spec for other changes, and the errata,
and timming, and the ports.... |
|
|
Ttelmah Guest
|
|
Posted: Wed Jun 14, 2006 8:08 am |
|
|
The point is that CCS, do not expect you to manually access anything. In general, 99% of code, should not need to touch the registers directly at all. The compiler already has the setups for all the peripherals, and IO functions for them all as well. The only times when register accesses are needed, are where:
1) There is a fault with the inbuilt functions.
or
2) You want to use a peripheral in a manner that the standard code does not support.
Most other compilers have signifcantly fewer 'prebuilt' functons, so instead provide the map for you to write your own.
Best Wishes |
|
|
|
|
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
|