Hi Peter,

No the pragma fills the configuration registers. These are special registers in 
the PIC and are also programmed separately since they are not part of the 
normal program memory.

For example, the pragma MCLR INTERNAL will clear the MCLR bin in the Config 
register.

Note the following. The datasheet for the PIC12F508/509/16F505 has a different 
config word for the 16F505, the one might have looked at was for the 12F508/509.

If you look at the datasheet for the 16F505 you see for FOSC:
[cid:3678d3dc-29fe-475c-b1cb-20a91367bcda]

and in the device file for the 16F505 you find:

pragma fuse_def OSC 0x7 {                -- Oscillator Selection bits
       RC_CLKOUT = 0x7                   -- External RC oscillator/CLKOUT 
function on RB4/OSC2/CLKOUT pin
       RC_NOCLKOUT = 0x6                 -- External RC oscillator/RB4 function 
on RB4/OSC2/CLKOUT pin
       INTOSC_CLKOUT = 0x5               -- Internal RC oscillator/CLKOUT 
function on RB4/OSC2/CLKOUT pin
       INTOSC_NOCLKOUT = 0x4             -- Internal RC oscillator/RB4 function 
on RB4/OSC2/CLKOUT pin
       EC_NOCLKOUT = 0x3                 -- EC oscillator/RB4 function on 
RB4/OSC2/CLKOUT pin
       HS = 0x2                          -- HS oscillator
       XT = 0x1                          -- XT oscillator
       LP = 0x0                          -- LP oscillator

So as  you see the pragma map on the config bits.

I hope this clarifies it.

Kind regards,

Rob


________________________________
Van: [email protected] <[email protected]> namens Zet Weeh 
<[email protected]>
Verzonden: dinsdag 12 mei 2020 14:09
Aan: jallib <[email protected]>
Onderwerp: [jallib] Re: 16F505

Hi Rob

So I can write:

pragma target FOSC100

Kind regards, Peter

--
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
[email protected]<mailto:[email protected]>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jallib/98a9db50-fb0f-4205-828d-f6dd3a5aa17a%40googlegroups.com<https://groups.google.com/d/msgid/jallib/98a9db50-fb0f-4205-828d-f6dd3a5aa17a%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jallib/AM0PR07MB6241A7781B0359D5ADDD0362E6BE0%40AM0PR07MB6241.eurprd07.prod.outlook.com.

Reply via email to