Hello
I use At89s52 and i want to disable RESET HIGH out feature by set DISRTO bit in SFR AUXR (address 8EH) but AUXR register isn't defined in <REGX52.h> file
so how can i disable this feature in Keil c51??
Note: i use Kiel C51 uvision 4
There is nothing magical about the contents of the header file - you can manage to add own registers if you want to, as long as the processor actually has such a register.
i did that but it didn't work
the main problem in my project that microcontroller doesn't start to excute the program till i press on reset button then it works correctly.
i think this problem occurs due to RESET HIGH out feature that is enabled by default so i try to disable this feature by set DISRTO bit in AUXR sfr.
code:
sfr AUXR = 0x8E; # define DISRTO 3 //3 is number of DISRTO bit in AUXR AUXR |= 1<<DISRTO ; //write 1 to DISRTO bit
i wrote these lines in a keil c51 and it didn't work but when i wrote the same lines on another compiler it worked correctly so is there another way to do that in keil c51??
the main problem in my project that microcontroller doesn't start to excute the program till i press on reset button then it works correctly. what else do you have connected to the reset pin? i think this problem occurs due to RESET HIGH out feature that is enabled by default. I doubt it
Erik
the pin is connected directly to pull down resistor 2.2k
The most common reason for a processor that doesn't start until you fiddle around with the reset signal is that you aren't using a proper 3-pin reset supervisor chip. A "traditional" solution with a resistor and a capacitor have big issues with rise time of power in relation to how fast the capacitor charges.
And a RC reset also has huge problems with a supply voltage that slowly drops and then recovers. The voltage might drop just below working voltage and then rise again - but the capacitor didn't get completely discharged so it doesn't manage a long enough reset pulse.
Given your claim that the software doesn't even start, how did you expect a change to the software to make any kind of difference?
thank you very much
it works correctly when add the capacitor between reset pin and vcc
and
thank you all for your interest and help me
What did you use before? No components at all on the reset pin?
But still note that a RC reset is the worst form of reset you can try. It only works in a situation where VCC has a very distinct rise time and a very distinct fall time, and where there is a guaranteed minimum delay between power-off and next power-on. And even then, you have a solution where the processor will continue to run a number of cycles with too low supply on power-off - so writes to EEPROM could destroy the contents of the memory and there can be accidental activation of external hardware.