Hi Rob
I already looked in the library and understood 0x1 = enabled.
I did not understand
pragma fuse_def WDT:3 0x1
but that’s less important because I then knew how to handle.
Kind regards,
Peter
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
![]()
To view this discussion on the web visit https://groups.google.com/d/msgid/jallib/AM0PR07MB4948466CC3792645C413F557E6430%40AM0PR07MB4948.eurprd07.prod.outlook.com.