Hi Peter,
That is not completely correct. The pragma is not always the same for every
PIC. I you look at the blink sample you find:
pragma target WDT CONTROL -- watchdog
That is because the options given in the device file 16f4455 for WDT are:
pragma fuse_def WDT:3 0x1 { -- Watchdog Timer Enable bit
ENABLED = 0x1 -- WDT enabled
CONTROL = 0x0 -- WDT disabled (control is placed on
the SWDTEN bit)
}
So you have to check the device file if you really want to know which settings
to use for which pragma (and what the default is, in this case 0x1 so ENABLED)
or you can have a look at the blink sample for your PIC, that is often the
easiest way to get the right pragmas for your application.
Kind regards,
Rob
________________________________
Van: [email protected] <[email protected]> namens Zet Weeh
<[email protected]>
Verzonden: maandag 2 december 2019 11:43
Aan: jallib <[email protected]>
Onderwerp: [jallib] Re: WDT
Op zondag 1 december 2019 07:57:59 UTC+1 schreef Zet Weeh:
LS
I can't find the difference between:
'WDTCON_SWDTEN = off' and 'pragma target WDT control'.
I searched on Internet but I could not find the answer.
I hope someone will explain.
Kind regards
Peter
LS
Wauw, I got a lot of answers also by mail and some with examples.
I learned a lot about WDT.
I understood that 'pragma target WDT Disabled ' gives an error because it's
already standard in tthe PIC-lib 18F4455 I use.
Thanks for your help.
Peter
Heiloo
--
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/70c02f88-1f1a-40d0-bed6-c60ea8940e35%40googlegroups.com<https://groups.google.com/d/msgid/jallib/70c02f88-1f1a-40d0-bed6-c60ea8940e35%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/AM0PR07MB4948466CC3792645C413F557E6430%40AM0PR07MB4948.eurprd07.prod.outlook.com.