how can i disable WDT in PIC18F2550?!?

20 views
Skip to first unread message

majid ebru

unread,
Jul 26, 2021, 2:20:26 AM7/26/21
to jallib
Hi to all

i use PIC18F2550.
when i compile my program.i see error:
 unknown pragma target: wdt pragma

how can i disable WDT??

i opened 18f2550.jal and go to line :

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)
       }

and change CONTROL to DISABLE .

is it true??

please help and guide me

kind regards

Oliver Seitz

unread,
Jul 26, 2021, 2:35:52 AM7/26/21
to jal...@googlegroups.com
Hi Majid,

don't change the device file, it is useless. The chip only has the options of "enabled" and "control", no matter what names you give to the options.

It's explained in the comments you copied: If you set the pragma to "control", the bit SWDTEN controls the watchdog. Presumably that bit by default disables the watchdog, but to be sure, have a look in the device's datasheet.

Greets,
Kiste




Am Montag, 26. Juli 2021, 08:27:55 MESZ hat majid ebru <majid...@gmail.com> Folgendes geschrieben:
--
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 jallib+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jallib/2b08c525-38f4-4882-aab1-c9d57ccb046cn%40googlegroups.com.

majid ebru

unread,
Jul 26, 2021, 2:57:57 AM7/26/21
to jallib
Thanks Kiste

Kind regards
Reply all
Reply to author
Forward
0 new messages