|
|
View previous topic :: View next topic |
Author |
Message |
kev Guest
|
Config Register settings |
Posted: Fri Jan 17, 2003 6:00 am |
|
|
Hi All,
I am using a 18F452 on a current project using PCH ver. 3.136. My question is this, is it possible to directly access the config registers? The FUSE values given in the compiler do not appear to cover all combinations regarding code protection.
Thanks for any help.
Regards, Kev
___________________________
This message was ported from CCS's old forum
Original Post ID: 10749 |
|
|
Woody Guest
|
Re: Config Register settings |
Posted: Fri Jan 17, 2003 8:16 am |
|
|
The configuration area 0x300000 - 0x3FFFFF an be accessed using table reads and writes (See data sheet - Special Features of th CPU).
The following code snippet would write CONFIG5L onwards.
Hope this helps.
void configuration (void)
{
#pragma ASM
MOVLW 0x08 // Set TBLPTR to 0x300008
MOVWF 0xFF6
MOVLW 0x00
MOVWF 0xFF7
MOVLW 0x30
MOVWF 0xFF8
MOVLW 0x0F // Value to write
TBLWT*+ // Write value
// MOVLW 0x06 // Value for 0x300009
// TBLWT*+ // write value etc...
#pragma ENDASM
}
___________________________
This message was ported from CCS's old forum
Original Post ID: 10751 |
|
|
R.J.Hamlett Guest
|
Re: Config Register settings |
Posted: Fri Jan 17, 2003 8:39 am |
|
|
:=Hi All,
:=
:=I am using a 18F452 on a current project using PCH ver. 3.136. My question is this, is it possible to directly access the config registers? The FUSE values given in the compiler do not appear to cover all combinations regarding code protection.
:=Thanks for any help.
:=
:=Regards, Kev
Worth realising, that the abilities of the FUSE statement are configurable from the device editor. At the top right of the screen for this, you get the fuse 'words', the mask they generate, and the register number to be used. You can add your own definitions here, or edit the supplied ones. :-)
Best Wishes
___________________________
This message was ported from CCS's old forum
Original Post ID: 10752 |
|
|
kev Guest
|
Re: Config Register settings |
Posted: Fri Jan 17, 2003 10:01 am |
|
|
Thanks.
Regards, Kev
:=:=Hi All,
:=:=
:=:=I am using a 18F452 on a current project using PCH ver. 3.136. My question is this, is it possible to directly access the config registers? The FUSE values given in the compiler do not appear to cover all combinations regarding code protection.
:=:=Thanks for any help.
:=:=
:=:=Regards, Kev
:=Worth realising, that the abilities of the FUSE statement are configurable from the device editor. At the top right of the screen for this, you get the fuse 'words', the mask they generate, and the register number to be used. You can add your own definitions here, or edit the supplied ones. :-)
:=
:=Best Wishes
___________________________
This message was ported from CCS's old forum
Original Post ID: 10757 |
|
|
|
|
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
|