The Cyber-Spy.Com Usenet Archive Feeds Directly
From The Open And Publicly Available Newsgroup
This Group And Thousands Of Others Are Available
On Most IS NNTP News Servers On Port 119.
Cyber-Spy.Com Is NOT Responsible For Any Topic,
Opinions Or Content Posted To This Or Any Other
Newsgroup. This Web Archive Of The Newsgroup And
Posts Are For Informational Purposes Only.
From: Mike Harding
Subject: Re: Max232 and 8051 drivin' me crazy - Solution found!
Date: Wed, 01 Jan 2003 09:49:29 +1100
References: <firstname.lastname@example.org> <email@example.com> <firstname.lastname@example.org>
NNTP-Posting-Date: Tue, 31 Dec 2002 22:38:31 +0000 (UTC)
X-Newsreader: Forte Free Agent 1.92/32.572
On Wed, 1 Jan 2003 09:14:52 +1100, "Michael Culley"
>> I wouldn't even put test routines (as this was) down at 0000h.
>> Spurious interrupts could be a real PITA to track down. I
>> *always* put a handler for each interrupt, even it it is only a
>> jump to 0000h or a spin loop.
>Good point, especially in my case cause from what I could tell the registers
>were not being cleared properly. Would a RETI be OK?
If you receive an unexpected interrupt you may well
need to clear status bits relating to that interrupt (very
processor dependent). Really it would be best to
force a reset at this time, ideally by allowing a watchdog
to time out or otherwise a jump to the reset vector.
If your system will be upset by unexpected resets then
a RETI is the next best thing, but it's all pretty flaky
because something bad is happening and you really
need to find out what and stop it.
It may also be worth keeping a counter (ideally in non
volatile memory) which is only cleared when the system
is initially started up (ie. only ever cleared once) and is
incremented whenever an unexpected interrupt occurs.
So if that counter is ever non zero you know a problem
>I certainly wasted plenty of my own time on this, about 25 hours, although I
>did learn a few things on the way :-)
That's not wasted time - that's the learning process.
Go Back To The Cyber-Spy.Com
Usenet Web Archive Index Of
The sci.electronics.design Newsgroup