Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

programming in 89c51 ,........ interrupt based

Status
Not open for further replies.

muralistarshine

New Member
org 00h;
ljmp main;
org 0003h
setb p2.0;
RETI;
org 0013h;
clr p1.0;
reti;
org 0030h;
main:
mov IE,#10000001b ;
mov p3,#00h;

clr p2.0;
here: sjmp here;

end;

i have worked out this in proteus software .....it has been build successfully but it cant give desired output ....
could anyone chalkout mistake in above programmmmmmmmmmm
 
To enable both external interrupts IE should be 10000101 B You have made port3 an output where as to detect interrupts it should be configured as an input.
 
i have changed port 3 to input and ie value too but there is output at p2.0 without any interrupt whats the problem?
how to rectify it?
 
To enable both external interrupts IE should be 10000101 B You have made port3 an output where as to detect interrupts it should be configured as an input.


i made it as per ur suggestion i.e to make p3 an input port and ie value tooo
still i am getting p2.0 =1 and without any interrupt at p3.2 ........what can ido to rectify this problem??????
 
The interrupts need a pull up.Change your code
"
here: sjmp here;

end; "

to this to see the change:


here:
CLR P2.0
sjmp here;

end;
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top