Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Help needed about external interruptions on microcontroller

Status
Not open for further replies.

southafrikanse

Junior Member level 1
Junior Member level 1
Joined
Jun 12, 2007
Messages
15
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Amora, Portugal
Activity points
1,418
Hello all

I'm using a the AT89S8253 microcontroller to work as a Real Time Clock with alarm.

So far so good I've managed to program the clock.

I'm using the two external interruptions of my microcontroller (INT0 and INT1), INT0 is controlled by a switch which works as SET_TIME (in the attachment with the variable "Horas") while INT1 is my SET_ALARM (in the attachment with the variable "Alarme").

I compiled it with Keil and when I went to test if the 2 interruptions were working only INT0 was working. Can you help me find the problem why INT1 can't work?

I asked my friends what should I do but they had the same problem in their project.

I'm using C language. Any questions please ask. I need this solution as soon as possible and I can only use interruptions.

Best regards.

My code is in the attachment.
 

Re: Help needed about external interruptions on microcontrol

i couldn't open the file. may be it's damaged.
try to rar again and upload.
 

Re: Help needed about external interruptions on microcontrol

aupa said:
i couldn't open the file. may be it's damaged.
try to rar again and upload.

You have to open it with notepad.
 

i never worked with this chip but from brief look to datasheet of this micro there is IE (interrupt enable register) which holds interrupt enable flag for different interrupt vectors. You handle interrupt enable by 2 definitions (from your source code ):
#define D_INT IE=0x0;
#define E_INT IE=0x81;

I could not find any other access attempts to IE register in your code . The layout of IE is :

EA – ET2 ES ET1 EX1 ET0 EX0

where bit 0 is enable flag for INT0 and bit 2 is enable flag for INT1 . When assigning 0x81 to IE you only enable INT0 . You have to assign 0x85 :

#define E_INT IE=0x85;

instead of

#define E_INT IE=0x81;

Then pay attention to the interrupt handling routine whether it is properly defined or not .
 
Re: Help needed about external interruptions on microcontrol

@artem

I've done what you told me to. However the problems still is there.:|

EDIT: Never mind it's working, I was calling the alarm interruption in the wrong place. thank you very much for your help.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top