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.

89s52 consumes more power

Status
Not open for further replies.
p3.2 and p3.3 are the external interrupts INT0 and INT1, and section 13 describes how to use them. You have to have an output from the key you can detect that lets you know a key is pressed. Beyond that you just enable the interrupt based on the table in section 13.

Not sure why you are having problems understanding the datasheet, it's a relatively simple part, with no complicated features. Is it a problem with understanding written English? If you point out specific statements in the doc I'm sure someone can paraphrase them so you can better understand.
 

p3.2 and p3.3 are the external interrupts INT0 and INT1, and section 13 describes how to use them. You have to have an output from the key you can detect that lets you know a key is pressed. Beyond that you just enable the interrupt based on the table in section 13.

Not sure why you are having problems understanding the datasheet, it's a relatively simple part, with no complicated features. Is it a problem with understanding written English? If you point out specific statements in the doc I'm sure someone can paraphrase them so you can better understand.

yes... i have written a code to exit idle mode on keypress.
Code:
EA=1;
EX0=0XFF;
EX1=0XFF;
ES=0XFF;
But thia thing doesn't work...

- - - Updated - - -

do i nees to attach any load on INT0 or INT1 and need to drive the load....????
 

Uh, I have no clue what that code does, I don't actually program micros, but I have done hardware design reviews on boards that have micros on them.

The interrupt pins need to have something connected to them to drive the interrupt pin active (low?) which then interrupts the micro out of it's main loop and runs the interrupt service routine. Unless this is some abnormal micro then that is the standard way this kind of thing usually works.
 

please help me for the code....
i tried a lot.... but i am not able to solve it...
i am not getting any output....
i again tried reading the datasheet and tried to understand something related to interrupt.... but then too not able to do soo....
 

Hi,

please look for code examples...

and learn how to set/clear single bits in a byte.

***

EA is a single bit. you can not 0xFF to it, because this is a 8 bit value.
the same is with EX0, EX1 and ES.

IE is a byte that contains 8 bits. Like EX0, EX1...

It seems you want to set (=1) bits: EA, ES, EX1, EX0 in register EI
You could assign the value 0b10010101 = 0x95 to register EI. (This clears the other four bits of IE register)
***
This is no problem related to interrupts, it is a general "C" programming problem.
***

Klaus
 

Hi,

please look for code examples...

and learn how to set/clear single bits in a byte.

***

EA is a single bit. you can not 0xFF to it, because this is a 8 bit value.
the same is with EX0, EX1 and ES.

IE is a byte that contains 8 bits. Like EX0, EX1...

It seems you want to set (=1) bits: EA, ES, EX1, EX0 in register EI
You could assign the value 0b10010101 = 0x95 to register EI. (This clears the other four bits of IE register)
***
This is no problem related to interrupts, it is a general "C" programming problem.
***

Klaus

i have even tried =1.
But still doesn't works.
Code:
EX1=1;
EX0=1;
ES=1;
IE1=1;
IE0=1;
EA=1;
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top