abc_de
Full Member level 5
- Joined
- Jan 9, 2014
- Messages
- 243
- Helped
- 11
- Reputation
- 22
- Reaction score
- 11
- Trophy points
- 1,298
- Location
- Ludhiana ਪੰਜਾਬ
- Activity points
- 2,939
hello
i am trying to configure WDT in PIC for 16msec but after so efforts i am unable to get reset.
i am trying to configure WDT in PIC for 16msec but after so efforts i am unable to get reset.
Code C - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 #include"p18f4520e.h" #pragma config OSC = INTIO67 // INTERNAL OSCILLATOR IS ON #pragma config DEBUG = OFF // DEBUGGER IS OFF #pragma config WDT = ON // WATCH DOG TIMER IS OFF #pragma config LVP = OFF // LOW VOLTAGE PROGRAMMING IS OFF //16MSEC WDT TIMER void main(void) { OSCCON=0X64; TRISC=0X00; LATC=0X00; while(1) { WDTCONbits.SWDTEN=1; LATC=0X00; Delay10KTCYx(10);//100MSEC LATC=0XFF; Delay10KTCYx(1);//10MSEC WDTCONbits.SWDTEN=0; }
Last edited by a moderator: