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

ExperimenterUK
Sat Oct 12 2019, 10:23 PM
Log in.. then post your code in the 8051 forum
Sat Oct 12 2019, 10:18 AM
Bhadra Sajikumar
i am doing a countdown timer with 8051 for my project, unfortunately our professor had to take a leave of absence before he could teach us most of it.. can someone explain the .asm code of it for me?
Mon Sep 23 2019, 07:37 AM
Nathaniel
I am doing a project for my schools wireless security system with cameras,sensors and spot lights using 8051 micro controller, could you help me out with the design and its source code.
Wed Sep 18 2019, 08:48 PM
Caryn Kover
Thank you for your time,
ExperimenterUK
Mon Aug 05 2019, 07:09 PM
@Ismail ..post in forum, give details
Mon Aug 05 2019, 04:33 PM
Ismail balghmi
Hello. Please I won't download
ExperimenterUK
Wed Jul 24 2019, 12:47 AM
@BUSTER123 Please post in the forum
Tue Jul 23 2019, 06:13 PM
BUSTER123
hello! newbie here. i am kind of a guy who hates using ready - made existing libraries, so this helped a lot as i was trying to control and write to a character lcd display. however, i can't figure out how to set the cursor position. for example, i want to set it to the 5th column in the first row, so position 5. so according to the table, i am sending 10000101 on the 8 data lines of the lcd (register select pulled low). the cursor does not move there however. and i cant move the cursor left or right too. is it something wrong that i am doing? thank you.
ExperimenterUK
Thu Jul 11 2019, 07:55 PM
@ramos https://www.theengineeringprojects.com/2017/09/l298-motor-driver-library-proteus.html
ExperimenterUK
Thu Jul 11 2019, 07:44 PM
@praveen123. Can you give a link to the project ?

Downloads

Comments

Casmir
Wed Nov 13 2019, 06:25 AM
DeepakBGattani
Mon Nov 11 2019, 01:31 PM
Jeanbusatta
Sun Nov 10 2019, 04:42 AM
mdayaz
Sat Nov 09 2019, 03:41 PM
baoyen123
Fri Nov 08 2019, 10:06 AM
xiwang
Fri Nov 08 2019, 07:28 AM
ilylily07
Tue Oct 15 2019, 04:32 PM
hientran123
Tue Oct 15 2019, 02:27 AM

Online

Guests: 32, Members: 1 ...
ilylily07 viewing chatbox_menu.php

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

Members: 38103
Newest member: Casmir
Forum Activity
Jeanbusatta Avatar
Posted By Jeanbusatta
Sun Nov 10 2019, 04:43 AM
ty, really needed it
ExperimenterUK Avatar
Posted By ExperimenterUK
Tue Oct 22 2019, 05:18 AM
wimac Avatar
Posted By wimac
Mon Oct 21 2019, 09:18 AM
I’ve been following this thread and looking at the...
s_dinesh40@yahoo.com Avatar
Posted By [email protected]
Sun Oct 20 2019, 03:09 PM
s_dinesh40@yahoo.com Avatar
Posted By [email protected]
Sun Oct 20 2019, 03:02 PM
sir, when i on display ,sometime 3rd display is no...
s_dinesh40@yahoo.com Avatar
Posted By [email protected]
Sun Oct 20 2019, 02:53 PM
sir, when i on display ,sometime 3rd display is no...
ExperimenterUK Avatar
Posted By ExperimenterUK
Sun Oct 20 2019, 12:21 AM
Your code seems okay on my simulationTry my code o...
s_dinesh40@yahoo.com Avatar
Posted By [email protected]
Sat Oct 19 2019, 07:13 PM
please find video attachment. 3rd & 4th displa...
s_dinesh40@yahoo.com Avatar
Posted By [email protected]
Sat Oct 19 2019, 07:05 PM
sir, 3rd and 4th dot matrix display flickering, ...
ExperimenterUK Avatar
Posted By ExperimenterUK
Fri Oct 18 2019, 09:18 PM
Hopefully you understand some of the program.Which...