Discussion in "8051 Discussion Forum" started by    rahuljin    Oct 11, 2007.
Thu Oct 11 2007, 02:54 PM
hello, everyone !! i am new to the microcontroller. i am making a car using 8052 microcontroller. i want to call the interrupt to pass the values to other port and rotate the motor. i connect a wire from button to VCC and to the interrupt and other wire to the ground pin of the microcontroller. when i start the microcontroller and i push the button, it short the supply and does not call the interrupt. please help me !! and also help me making a logic invertor(NOT gate) using resistor, diode and transistor !!! thanks anyways
Thu Oct 11 2007, 03:31 PM
can you please provide the circuit? waiting for reply..
Fri Oct 12 2007, 02:17 AM
thanks for the reply !!
i made some changes in the circuit(in hope that it might work).
my real problem is that i am unable to call the interrupt because i dont know how to send signal from the button. i connect one wire of vcc pin and same wire to the interrupt and other wire of the button to the ground pin of the microcontroller.

when i push the button, it draws all the power from the microcontroller and does not call the interrupt( i hav an led on other port which stop on pushing the button).

there is a led on p2.2 which should always on because i programed the microcontroller to do so and to on the led on p2.3 when interrupt is called !!!

please help !! i hav already give 3 day to this problem.

Fri Oct 12 2007, 06:21 AM
in level triggered mode whenever P3.2 will go low , interrupt routine for this interrupt will be called.
so circuit will be like this

and program
sbit led =P2^3;
void abbas() interrupt 0
void main()

[ Edited Fri Oct 12 2007, 06:22 AM ]
Fri Oct 12 2007, 06:58 AM
thanks for the suggestion but how this will pass 1 to the p3.2 (interrupt) ?? i dont know about c language so i write my programs in assembly language.
Fri Oct 12 2007, 08:11 AM
this is the correct way to connect a switch or push button...

all you have to do is.. put the code to be executed during interrupt in your interrupt service routine..
vector table for 8051 interrupts are
0000H - Reset
0003H - INT0
000BH - Timer0
0013H - INT1
001BH - Timer1
0023H - RI and TI interrupt or serial interrupts
Fri Oct 12 2007, 12:27 PM
i got it and it worked !!! thanks to all !!! !dance !dance
but i hav another problem !!! i hav purchased a circuit board(in which microcontroller is attached and it has oscillators, etc.), which works
on 0- logic i.e. it works when 0 is passed. so it calls the interrupt by it self when button is not pushed. when button is not pushed it does not call the interrupt.
any help regarding this !!
Fri Oct 12 2007, 02:19 PM
what do you mean by this?

so it calls the interrupt by it self when button is not pushed.

Fri Oct 12 2007, 04:41 PM
Fri Oct 12 2007, 06:38 PM
I am saying that i did not understand what new problem you are facing.. explain in a better way so we can sort it out..

Get Social


Powered by e107 Forum System


Thu May 13 2021, 07:18 PM
Pretty section of content. I just stumbled upon your weblog and in accession capital to assert that I get actually enjoyed account your blog posts. Any way I will be subscribing to your augment and even I achievement you access consistently quickly. https://mkfinstitute.com Trisha Trisha
Wed May 12 2021, 01:23 PM
Jed Roan
Now you can promote your site all over the internet for FREE: http://www3.listofsitesthatacceptfreeads.club
Wed May 12 2021, 08:20 AM
If some one wants to be updated with most recent technologies afterward he must be visit this web page and be up to date every day. annual credit report https://creditscoresetf.com
Wed May 12 2021, 06:11 AM
Great website. A lot of useful information here. I'm sending it to some pals ans also sharing in delicious. And of course, thanks on your effort! annual credit report https://creditscorecheckn.com
Wed May 12 2021, 05:37 AM
Does your site have a contact page? I'm having problems locating it but, I'd like to shoot you an email. I've got some recommendations for your blog you might be interested in hearing. Either way, great website and I look forward to seeing it improve over time. get credit report https://freecreditreportww.com



Thu Jun 25 2020, 03:46 PM
Mon Jun 22 2020, 03:03 PM
Tue Jun 16 2020, 05:10 PM
Sat Jun 13 2020, 09:43 PM
Thu May 21 2020, 12:44 PM
Thu May 21 2020, 01:28 AM
Wed May 20 2020, 07:05 PM
Wed May 20 2020, 11:52 AM


Guests: 103, Members: 0 ...

most ever online: 182184
(Members: , Guests: 182184) on 06 Aug 2010: 05:37 AM

Members: 38215
Newest member: Mirza123