[bascom] RE: Your answer to INT0 Problem


From "P E" <panther@vasnet.co.in>
Date Fri, 15 Jun 2001 09:06:52 +0530
Cc "Saum, George" <gscomm@mho.net>

Yes I did get that. The other reply was for Mr. Robert.

The problem with Int0 and int1 is that it is hardware interrupt. That is the
intrrupt flags are set if there is any activity on the port lines even if
you do not enable the interrupt vectors.(Enable interrupt). Hence when you
enable the interrupt ( there is no start and stop for interrupts), It
immediately jumps to the interrupt vector. this you can correct by clearing
the Hardware register of 8051 or 8032 which is set by the Hardware, when
there is some activity on the interrupt port lines before enabling the
interrupt.

Hope you understand the concept.

The register which are set or cleared I think is ... no no not sure will
have to ref the data sheet.

Check what exactly happens in the DATA Sheet of your IC's. and then go about
it.

Regards

Srikanth Kamath T



-----Original Message-----
From: Saum, George [mailto:gscomm@mho.net]
Sent: Friday, June 15, 2001 4:29 AM
To: Panther@vasnet.co.in
Subject: Your answer to INT0 Problem


Dear PE:
        Thanks for your reply to my problem.  You must have overlooked the 
part
where I said I was using Bascom-8051, not AVR as your answer refers to.
I also forgot to include the statement: Set TCON.0 in my short code
snippet.  That sets the TCON register to enable detection of the falling
edge on the interrupt signal.  My version of Bascom does not support
Config INT0 = falling.
        It appears that my problem is one of not setting Port 3.2 up for input
even though this is the default condition after reset.  I have two
80C32's that behave identically with respect to INT0 but ok in all other
respects.
        I'm just about ready to give up and do polling instead of interrupts.
                Thanks,
                        Bud