P89C52 Hangs!!

Dear all,

I am using a P89C52 for Keyboard reading purpose. I have a problem that when i turn on and off the device(Keyboard) it sometimes reads the keys and sometimes does not. P89C52 has a active high reset, the above problem is solved when i repeatedly reset the microcontroller manually using reset switch. My power on reset circuit is connected Below is the link for reset page 5, values 10ufd and 8.2K and i ve not used the BAW62.

formatting link
associated%20docs/reset_circuits_slave_micro.pdf - ' What should i do in order to keep my controller running in a proper manner Thanks and regards,

Nick

Reply to
Nick
Loading thread data ...

Use an MCP810. Also enable the WDT if that chip has one.

Best regards, Spehro Pefhany

--
"it\'s the network..."                          "The Journey is the reward"
speff@interlog.com             Info for manufacturers: http://www.trexon.com
 Click to see the full signature
Reply to
Spehro Pefhany

The link didnt work but anyway these problems generaly far into two catagories. 1. Software problem, all you can do there is find it and fix it. 2. Power supply problem. In this case it would seem like rise time but could be spikes. Fit a vcc supervisor chip eg. TL7700A.

Reply to
cbarn24050

A better reset circuit would probably fix it. The one you're using wasn't intended for applications where power might be intentionally interrupted.

The URL above doesn't work btw.

Graham

Reply to
Pooh Bear

Not very helpful really !

Always a good idea.

Graham

Reply to
Pooh Bear

formatting link

martin

Reply to
martin griffith

formatting link

LOL ! I tried editing it a bit but gave up before I tried that one.

Graham

Reply to
Pooh Bear

formatting link

Right.

He *does* need to use the additional diode. " The optional diode rapidly discharges the capacitor when the supply voltage falls, to ensure that a reset occurs if the supply voltage is interrupted only briefly. "

But hang on...... If the supply is *disconnected* rather than *turned off*, then the diode can't do its job very well. But worth trying anyway.

Graham

Reply to
Pooh Bear

formatting link

As the chip loads down the disconnected supply rail the top of the capacitor is pulled down to 0V so the bottom of the capacitor is pushed -VE WRT GND - some technologies can latch up if a reset I/P is driven outside the rails - often with destructive results!

Reply to
ian field

It is always helpful to read the errata on the Philips web site related to the part.

formatting link

Page 7 states

VDD.1:VDD Power cycling

To generate a proper Power-On-Reset (POR), VDD must have dropped below 0.2V before being powered back up. Power-cycling without VDD having dropped below

0.2V may result in incorrect Program Counter values.

If you have a big electro Cap on the Vdd line then it will take time for Vdd to discharge below 0.2 volts.

Some customers have implemented a "pinch" circuit to discharge the Cap when detecting Vdd drop.

Adding Reset IC's and parts and other reset features is always a good choice.

Getting a micro to "fire-up" reliably 100% of the time.... under all easy and difficult conditions is a bit of an art form and a detailed understanding of the power up sequence is required

JG

Reply to
Joe G (Home)

And why would you say something like that?

Best regards, Spehro Pefhany

--
"it\'s the network..."                          "The Journey is the reward"
speff@interlog.com             Info for manufacturers: http://www.trexon.com
 Click to see the full signature
Reply to
Spehro Pefhany

He said he was using an 89C52. Nothing wrong with that. You'd seriously advice changing CPUs ?

Graham

Reply to
Pooh Bear

"Pooh Bear" schreef in bericht news: snipped-for-privacy@hotmail.com...

advice

You didn't google for MCP810, did you?

--
Thanks, Frank.
(remove \'q\' and \'.invalid\' when replying by email)
Reply to
Frank Bemelman

Ah, no I wouldn't. The MCP810 is an inexpensive multiple-sourced supervisory circuit in SOT-23-3 with push-pull active-high output.

There is a CPU with a similar (esp. to dyslexics) number, the Freescale (nee Motorola) 32-bit MPC8xxx series PowerPC, but that would be a bit much. More information available here:

formatting link
and here:
formatting link

Best regards, Spehro Pefhany

--
"it\'s the network..."                          "The Journey is the reward"
speff@interlog.com             Info for manufacturers: http://www.trexon.com
 Click to see the full signature
Reply to
Spehro Pefhany

formatting link

Ooops. Mea culpa.

Graham

Reply to
Pooh Bear

My bad !

Graham

Reply to
Pooh Bear

used the BAW62.

manner

formatting link

discharges the

the supply voltage is

then the diode can't

We had this discussion here a while back. I use an extra diode in my reset circuits on account of this because it makes me feel more comfortable.

Graham

Reply to
Pooh Bear

formatting link

You'll appreciate a produiction issue I had last week then. With a TUSB3210 micro, similar reset circuit (with diode).

micro's wouldnt start up, sometimes the oscillator started but feebly, other times it didnt start at all.

50 PCBs worked fine. So we built another hundred. 38 of them didnt work.

It took a while, but I tracked it down to an incorrect reel change. A mis-labelled reel made it thru 3 checks (because it was mis-labelled) and we accidentally fitted 4,000 10nF caps instead of 100nF caps. 104 of those caps were decoupling caps, one was the reset cap. doh.

On the bright side, the contract manufacturer only had to change one cap per PCB to fix the problem, which cheered them up immensely.

Cheers Terry

Reply to
Terry Given

You just reminded of a clock oscillator start-up problem with an 8051 design.

It had a 12MHz crystal and 2 x 33pF caps around XTAL1 and XTAL2.

Worked fine for a year or so then maybe 20-30% wouln't run. Easy enough to see it was the clock of course but why ?

Well....... These guys I worked with hated introducing new components. They didn't have a 33pF in stores so unbeknown to me they subbed 22pF instead !

But here's the cute bit. The schematic had 33pF on it. Oh joy. These guys were forever 'taking short cuts' like that.

Graham

Reply to
Pooh Bear

it was the clock of

didn't have a 33pF in

forever 'taking short

ya gotta love that sort of thing.

I once had 17,000 900W UPS' made in China. THose guys did all sorts of evil things - 1/4W 10% in lieu of 1W 0.1% that sort of thing. cost far more to fix the fuckups than we saved getting the boards made in China....

nage bu hau.

Cheers Terry

Reply to
Terry Given

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.