Search Engine

Wdt Pic

Add Question

41 Threads found on Wdt Pic
I think you may be confusing the wdt with a normal timer or timing routine. The wdt is a hardware timer with it's own clock that (if enabled) forces the pic to reset rather like you had powered it off and on again. It can't be used as a method of creating a delay because there is no way of resuming when time is up, it always goes back to (...)
hi milan, This may be helpful, I use for USB n the 18F2550 pic E LIST p = 18F2550, r = dec, w = -311, f = inhx32 INCLUDE "P18F2550.INC" ; MPASM Header errorlevel -302, -207 CONFIG PLLDIV=5,CPUDIV=OSC1_PLL2,USBDIV=2,FOSC=HSPLL_HS,IESO=OFF CONFIG VREGEN=ON,CCP2MX=ON,wdt=OFF,wdtPS=32768,PBADEN=OFF ,PWRT=OFF,MCLRE=ON CONFIG LPT1OSC=OFF,BOR=O
Compiler used ? How have you configured wdt ?
I have seen on other threads that people have had similar problems with MikroC so perhaps it is a compiler bug. It is purely a guess but maybe some errant compiler code is crashing your program and that causes the wdt reset rather than it being part of the code you have written. I gave up on that compiler a long time ago, does the newer version ha
The outputs on PORTB should always be high while it is in the loop. The code is correct. I suspect the problem is the watchdog timer is running and resetting the pic every 20mS (~50Hz) or so. Each time it resets the pic it will flash the segments. Try either turning the wdt off or including a wdt reset inside the while(1) (...)
Everything seems right in your code. Some time ago i also made the same project using same method, but i wrote different code. I used pic18F248 Here is the code i used. Reciever #include # pragma config OSC = HS, OSCS = OFF # pragma config wdt = OFF # pragma config BORV = 45, PWRT = ON, BOR = ON # pragma config DEB
Hi, You have Set the Watchdog On in the Config line so no need to repeat it again in your main code. The SwdtEN bit is only used in your code when the Watchdog has been placed OFF by the Config line. With the 4520 the Watchdog Prescaler is also set by the Config parameters. Below are the Config parameters and options. You have an OSC
Hi, The ORG Directive is used to tell the chip where to put the following code in program memory, it IS used in Absolute mode as well. If your code appears to branch to 0x00 at 0xFF then post your code so we can see whats happening as thats not right. Edit - have you got the Watchdog disabled ? wdt=OFF in your Config line, that will
I haven't had time to go through the code yet but if the real hardware watchdog is causing a reset, the most obvious place for it is the while(1); loop. Try inserting an asm statement inside the loop to reset the timer "clrwdt". Brian.
are you cutting down clock to minimum value while in sleep mode? because higher clock rates consumes more power.. as stated in all pic datasheets... make sure that you configure pic to operate in lower frequency while in sleep mode... you have to recalculate the wdt rate to compensate that clock time too..
i am facing problems in interfacing gsm sim 900 with pic18f4550. the code seems to have nothing wrong with it, could any one help me with it. #include #include # pragma config wdt=OFF # pragma config LVP=OFF # pragma config FOSC=HS # pragma config IESO=OFF # pragma config MCLRE=ON # pragma config PBADEN=OFF
Hello, I'm using the microcontroller pic16F877, and I need use two UART, this pic only has got one UART, so I need design a UART software. Well, I designed the UART, and before work fine, without wdt, without sleep, only receive date and send date directly. Now I need save the dates received in a char for send aft
Hi forum your opinion needed Today i programed a pic 16f877a micro controller with a program to test watch dog timer of the micro.I used mikroc serial boot loader to program micro first and the result was :micro controller program did notwork.Then i programed same micro controller with same program but this time using pikit2,and then the progra
Guys, I tried to write this code, but can't see LED blinking on pic IDE simulator Do you know why ? Thanks #include #include #pragma config FOSC = INTOSCIO_EC //Internal oscillator, port function on RA6, EC used by USB #pragma config wdt = OFF //Disable watchdog timer #define LEDPin LATDbits.LATD1 /
could the IC have been damaged because of wrong configuration bits..... because even by using this __CONFIG ( FOSC_HS & wdtE_OFF & PWRTE_OFF & BOREN_OFF & LVP_OFF & CPD_OFF & WRT_OFF & DEBUG_OFF & CP_OFF); it dosent seem to be working....
Hello I build led matrix display based on 16F876 and have problem with resetting pic in most of the time when neon light is turn off in the room and pic is connected to PC. When PC and pic are disconnected everything is ok. Also every time PC is turn off, pic is reset or gets stuck. Here is schematic. Fuses are: (...)
Thank for your reply. this is my configuration word __CONFIG(0x3F32); i think wdt already disabled
Dear All, I need some help on saving current consumption while the pic MCU in SLEEP mode. I used three interrupts that is INT0, RBIF and Comparator Interrupts. I have used 6v, 4.2Ah sealed lead acid battery. I have used wdt to wake up the device every 24 Hrs. Until then I put the device in SLEEP mode. After 24 Hrs expires I have to enable compar
Hi, This is my program to interface LCD with pic DEM 2 plus (18f4520 pic microcontroller).when i m trying tgo display single charcter then its working fine but wen i want to display string some jumbled dchars r being displayed.plz help me. #include #pragma config wdt=OFF #define LCD_RS LATDbits.LATD4 // Register (...)
#include #pragma config wdt=OFF long int count; int adc_result, loop; void main() { TRISD = 0x04; PORTDbits.RD0 = 0; PORTDbits.RD1 = 0; OpenADC(ADC_FOSC_32 & ADC_RIGHT_JUST & ADC_12_TAD, ADC_CH0 & ADC_INT_OFF, 0); //open adc port for reading ADCON1 =0x00; //set VREF+ to VDD and VREF- to GND (VSS) SetChanADC(ADC_CH3);
hi... her is the config bits that we hav set #include <18F8520.h> #device adc=10 #FUSES wdt, #FUSES wdt128 //Watch Dog Timer uses 1:128 Postscale #FUSES HS //High speed Osc (> 4mhz) #FUSES PROTECT //Code not protected from reading #FUSES NOOSCSEN //Oscillator switching
BODEN: Brown-out Detect Enable bit(4) 1 = BOD enabled 0 = BOD disabled This Bit is switching on a special circuit that will put your microcontroller pic12F675 in reset state when the voltage is below a level. This is very usefull for battery power applications !. wdtE: Watchdog Timer Enable bit 1 = wdt enabled 0 = wdt (...)
There is a different way. Use the wdt and set it to let say 1ms. Now put the pic to sleep with sleep instruction and 1ms later +/- 5% you will be woken-up. wdtcon set to 1ms. sleep that is all, 2 cycles and you can make timings between 1ms and a few minutes on some pic's. Check the wdt module for this !. (...)
I use watchdog = 1 to activate the watch dog in proton basic and i use watchdog = 0 to dactivate it Now if I use Timer0 prescaler for it how may i assign it to watch dog time? May I use Option_reg? or else 2 If i use timer) prescaler for watch dog time if wdt will reset the device if the crystal oscilator of the pic stop running?
Hi I am using pic 16f628a and am usin Proton Basic language to program it with ICPROGRA compiler. What I want to learn is that I want to activate and clear the Watch dog timer in my program Pls guide me that how may I Activate and clear wdt Regards
Dear all, In my pic 16F675 Project some time mcro stops working during electrial spikes, I used wdt to reset but sometime its wdt also not workes and circuit Needs to be restart, My project is Based on Live Pover supply made by 220 V AC to 12 volt dc by reducing down it by series capacitor shunted by a 12V/1W zener and then regul
i'm guessing you don't need the prescaler for your frequency counting ? to do this just assign the prescaler to the wdt, look at the OPTION register. The TMR0 will count input pulses on RA4 in sync with internal clock - FOSC/4 look at the block diagram for TIMER0 in the datasheet
Hi, Try this and see what happens: #include #pragma config OSC = HS #pragma config wdt = OFF //Watchdog Timer off #pragma config LVP = OFF //LVP off void main(void); void lcdcmd(unsigned char value); void lcddata(unsigned char value); void MSDelay(unsigned int time); #define rs PORTEbits.RE0 #define en PORTEbits.
Hi, Change your code to: #include #include #include #pragma config FOSC = XT_XT //Crystal oscillator #pragma config wdt = OFF //Watchdog Timer off #pragma config MCLRE = OFF //Master clear off #pragma config LVP = OFF //LVP off void timer_isr (void); unsigned char digit = {0x01,0x4F,0x12,0x06
Hello all, I had a strange issue while debugging in MPLAB. I am using pic 16F73 with HiTECH C compiler. The program counter unexpectedly resets to zero, at some point.The wdt is not enabled atall. Could you please tell me what can be the possible reason? Please the part of code where it happened, switch(DigitCount) { case 0: Ti
Start movlw b'11111111' movwf PORTB goto Start end 1. You have mentioned that you are not getting an output. If the pic is executing the code, the o/p will always be high as per your code. 2. If you have enabled wdt in the configuration fuses, the watchdog will reset the pic since you are not clearing the wdt. (...)
In the pic u will find adc,wdt,eeprom,pwm etc with a bundle. which not able at atmel. many years ago i am starting atmel , but now i comfotable with pic. like open the door.
Hai What about watchdog it enabled by default.Or disabled.Or is there any configuration bits like pic The wdt Initial state of AT90S4414/8515 is disabled at power-up and similar with Safety level 0 of ATMega8515 (FUSE bit S8515C programmed "0" and wdtON unprogrammed "1"). If you're using PonyProg typing CTR
Hai My programe works in wdt disabled mode. I doubt weather wdt can be enabled "on the fly" Thanks picstudent
Everything on wdt and BOR (and other RESET issues) is clarified in this publication: Regards, IanP
Happy 2006 to all, I'm learning VSM simulation for pic and I'm stopped in how to simulate timer interrupts. Can anyone give me a shortcut to where learn faster, in the manuals or other doc. ? Thanks.
hai wdt is used to maintain the function of the controller without any hangng the nature of wdt is it will master clear the controller when it gets overflowed. so in program sequence we will clear the wdt before it gets overflowed. this is done by using any timer. in some circumstances the controller will hang, at the same time (...)
pic microcontrollers are the only one with this wdt thing?
I use internal osc. and if i set wdt to reset whole program, he is making reset, but with to long delay... Example: He should make reset if some condition is true. Condition is true(lighted diode)and then you have to wait cca 30 seconds until the true reset happens. Why is this so?
It's a good idea to have PWRT on. The wdt should be on only if you clear it periodically in the code.
hi traxonja, Currently I use 12F675 chip + 315MHz AM transmitter module as my design. I use wdt to wake up the pic to detect the input and then goes into sleep again after detection.. I think the problem of battery draining too fast maybe due to the power hungry AM transmitter module.Thanks. if you have an extra pin you