Discussion in "8051 Discussion Forum" started by    rahuljin    Oct 11, 2007.
Thu Oct 11 2007, 02:54 PM
#1
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
#2
can you please provide the circuit? waiting for reply..
Fri Oct 12 2007, 02:17 AM
#3
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
#4
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
#include<reg51.h>
sbit led =P2^3;
void abbas() interrupt 0
{
led=0;
}
void main()
{
EA=1;
EX0=1;
while(1);
}


[ Edited Fri Oct 12 2007, 06:22 AM ]
Fri Oct 12 2007, 06:58 AM
#5
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
#6
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
#7
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
#8
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
#9
yes.
Fri Oct 12 2007, 06:38 PM
#10
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

Information

Powered by e107 Forum System

Conversation

Thu Jun 11 2020, 06:27 AM
anudee
sir could please send the code for I2C and wifi interfacing with 8051
scena
Tue May 19 2020, 10:29 PM
Does anyone have microcontroller programming software for STC15F104W (core 8051, 4 k, 128 byte, 6 I/O pin, UART ... DIL8), that works?
Sat May 02 2020, 07:38 PM
Tamu Gurung
Hi I am looking for a assembly language program for a digital decimal counter. Time counts max limit of 2 mins starting from 2.00 mins and ending at 0.00. time is to be displayed on 4 7-segment LED displays. Edsim51 simulator to be used. Thanks
Wed Mar 25 2020, 01:39 PM
Tajammul
Sir kindly send the code file i2c for 8051
ExperimenterUK
Fri Mar 13 2020, 10:36 PM
@ Rohitnani,ABEBE..which project ?
Fri Mar 13 2020, 12:55 PM
ABEBE
how can get hadwere of this project
Rohitnani
Sat Mar 07 2020, 05:11 PM
Sir, Could you please send me the zip file input password....
Wed Feb 26 2020, 04:58 PM
Peter Parker
Is it possible to send multiple messages using only 1 GSM module?
Sat Feb 01 2020, 10:12 AM
Pearl Olin
Hello,
Wed Jan 22 2020, 06:16 PM
MINU CHAUDHARY
I m getting errors while simulation process during interfacing socket output and lcd... Can i get the report of ur project which is same as us.

Downloads

Comments

Mirza123
Thu Jun 25 2020, 03:46 PM
eunicelove124
Mon Jun 22 2020, 03:03 PM
cerouno
Tue Jun 16 2020, 05:10 PM
Marce
Sat Jun 13 2020, 09:43 PM
Davidthils
Thu May 21 2020, 12:44 PM
Jakeror
Thu May 21 2020, 01:28 AM
motorCar
Wed May 20 2020, 07:05 PM
Vordrync
Wed May 20 2020, 11:52 AM

Online

Guests: 42, Members: 0 ...

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

Members: 38215
Newest member: Mirza123
Forum Activity
ExperimenterUK Avatar
Posted By ExperimenterUK
Wed Jul 01 2020, 11:07 PM
PS: I am a new learner thats why my question may s...
Mirza123 Avatar
Posted By Mirza123
Wed Jul 01 2020, 02:05 PM
Thanks for the assistance. I have read the data sh...
ExperimenterUK Avatar
Posted By ExperimenterUK
Wed Jul 01 2020, 10:12 AM
See section 15 (Ports) of the data sheet. ...
wimac Avatar
Posted By wimac
Tue Jun 30 2020, 10:05 AM
How did you know that it is not 8051. Mirza123It i...
Mirza123 Avatar
Posted By Mirza123
Tue Jun 30 2020, 08:39 AM
It seems ports on the AT89LP2052 is not like on th...
ExperimenterUK Avatar
Posted By ExperimenterUK
Tue Jun 30 2020, 08:34 AM
It seems ports on the AT89LP2052 are not like on t...
Mirza123 Avatar
Posted By Mirza123
Thu Jun 25 2020, 04:07 PM
Hello!i am trying to use AT89LP2052 ( AT89LP2052 h...
ExperimenterUK Avatar
Posted By ExperimenterUK
Wed Jun 17 2020, 09:42 PM
It is about capacitor? i should put it between Vcc...
cerouno Avatar
Posted By cerouno
Wed Jun 17 2020, 10:37 AM
Take another look at the power supply to the LCD.A...
ExperimenterUK Avatar
Posted By ExperimenterUK
Wed Jun 17 2020, 02:01 AM
Take another look at the power supply to the LCD.A...