Discussion in "8051 Discussion Forum" started by    rahuljin    Oct 11, 2007.
Thu Oct 11 2007, 10:54 AM
#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, 11:31 AM
#2
can you please provide the circuit? waiting for reply..
Thu Oct 11 2007, 10:17 PM
#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, 02: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, 02:22 AM ]
Fri Oct 12 2007, 02: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, 04: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, 08:27 AM
#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, 10:19 AM
#8
what do you mean by this?

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

Fri Oct 12 2007, 12:41 PM
#9
yes.
Fri Oct 12 2007, 02: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

scena
Tue May 19 2020, 06: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, 03: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, 09:39 AM
Tajammul
Sir kindly send the code file i2c for 8051
ExperimenterUK
Fri Mar 13 2020, 06:36 PM
@ Rohitnani,ABEBE..which project ?
Fri Mar 13 2020, 08:55 AM
ABEBE
how can get hadwere of this project
Rohitnani
Sat Mar 07 2020, 12:11 PM
Sir, Could you please send me the zip file input password....
Wed Feb 26 2020, 11:58 AM
Peter Parker
Is it possible to send multiple messages using only 1 GSM module?
Sat Feb 01 2020, 05:12 AM
Pearl Olin
Hello,
Wed Jan 22 2020, 01: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.
Tue Jan 14 2020, 02:08 AM
shubham kharade
when i am trying to simulate the program in Proteus 8 professional, I am getting some errors as cannot find module file dhtxx.md can u help me

Downloads

Comments

Davidthils
Thu May 21 2020, 08:44 AM
Jakeror
Wed May 20 2020, 09:28 PM
motorCar
Wed May 20 2020, 03:05 PM
Vordrync
Wed May 20 2020, 07:52 AM
JadenjiT
Wed May 20 2020, 03:15 AM
scena
Tue May 19 2020, 06:08 PM
CodySiz
Tue May 19 2020, 02:22 PM
ClaireSat
Mon May 18 2020, 09:50 PM

Online

Guests: 99, Members: 0 ...

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

Members: 38211
Newest member: Davidthils
Forum Activity
xrxx Avatar
Posted By xrxx
Thu Apr 30 2020, 06:59 AM
BCD MULTIPLICATIONAssume that you have to 2 BCD nu...
liqian Avatar
Posted By liqian
Tue Apr 28 2020, 05:26 AM
I happened to see your post and I got many useful ...
ExperimenterUK Avatar
Posted By ExperimenterUK
Tue Apr 28 2020, 04:21 AM
The code is hard to read.Please zip it and attach ...
rogermado Avatar
Posted By rogermado
Sun Apr 26 2020, 01:53 AM
@ExperimenterUK, thanks for your reply. You'll fin...
ExperimenterUK Avatar
Posted By ExperimenterUK
Sat Apr 25 2020, 05:42 PM
Some simulators handle displays better than others...
rogermado Avatar
Posted By rogermado
Sat Apr 25 2020, 03:59 PM
Hello everyone, sorry in advance if i'm not in the...
PHANTOM28 Avatar
Posted By PHANTOM28
Fri Feb 28 2020, 10:25 AM
Hi.I hope you all can help me. I am relatively ne...
ExperimenterUK Avatar
Posted By ExperimenterUK
Fri Feb 21 2020, 05:05 PM
ajay_bhargav Avatar
Posted By ajay_bhargav
Fri Feb 21 2020, 04:45 AM
Yes you can do that.1. Create a channel @Thingspea...
ananyagupta Avatar
Posted By ananyagupta
Thu Feb 20 2020, 03:58 AM
With regards to the particular characters sent to ...