We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello, I have a AT89C5131 development kit and I want do disable the WDTCN (watchdog timer) but in the list of the registers in the file "at89c5131.h" it looks like there are two registers: Sfr ( WDTRST, 0xA6 ) ; Sfr ( WDTPRG, 0xA7 ) ;
What do I need to do in order to Disable the watchdog timer.
Thanks!
What does the Datasheet tell you?
In the datasheet it is written that the microcontrollre has only one register for watchdog timer that calls WDTCN but in the softwere there are two registers with different names.
So - have you made sure that both the datasheet and the include file are for your specific processor?
Ofcourse I checked if the header file matching the microcontroller. It even has the same name.
Of course?
I mentioned two clauses in my query - you only cared about one...
The datasheet I did look at mentions two registers - not one. So what datasheet have you been looking at?
I am using the datasheet of microcontroller at89c5131a and also its headfile. I would like to have your datasheet if its different then mine
You still haven't said what datasheet you are using - what link on Atmel's site?
Remember that there is nothing special nor magic about the header file; it is just a perfectly normal C51 header file - no different from any other C51 header file.
There is nothing to stop you from creating your own header file, working direct from the datasheet.
1) So the datasheet suddenly now mentions two register? And with names matching the header file? How come?
2) Did you decide to not even read the first section of the watchdog description?
Does someone knows what value I need to put to those two registers to disable the WDT?
Have you still not taken the time to read the first section of the datasheet? The part where they say that the watchdog can't be disabled after having been started - except by resetting the processor.
You really haven't much progress with datasheets...
I read it. I would be glad if you stop trying to fight me. Its my first time using this microcontroller and its strange that I cant disable it from the beggining of the program. Have a good day!
So all the more reason why you need to really spend time thoroughly studying the datasheet!!
"its strange that I cant disable it from the beggining of the program"
Is that what the datasheet actually says?
Chips function in accordance with what's stated in their datasheet - not the way you think you'd like them to behave!
Sometimes, the way a chip behaves (as stated in its datasheet) will not be suitable to your specific requirements - so you either need to select another chip, or revise your approach...
Well, its not my choice to use this microcontroller. If you have a correct answer that can help me I will be happy to listen to you.
Again, the answers you require are clearly stated in the Datasheet - read it carefully and thoroughly.
"its not my choice to use this microcontroller"
So have you discussed this with whoever assigned you this project?