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.

[help] car using microcontroller

Status
Not open for further replies.

rahuljin

New Member
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 :eek:
 
Totally lost. Can you explain what you want to do. That would help a lot.

You stated you are new.

You need power on the micro to make it work. And you have a button to interrupt pin and a program running on the micro I assume?
 
thanks for the reply !!
i change the circuit.
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. but this is not working. help me please !! i hav give 3 days to this problem.

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).

**broken link removed**

i provide a 12V, 1.3 AHr supply to the microcontroller.
mramos1,u r right i hav button on int0 and i hav programed the microcontroller.
 
Last edited:
From your diagram, when you press the button, you have the 5V from the power supply shorted to ground, which creates a short circuit, causing everything to not run if you don't a spark. The proper way to connect the button would be have the button connected between Vcc and one end of the resistor, with the other end of the resistor connected to ground. There should be another connection at the node of the resistor and button that connects to the input pin so that the microcontroller can detect the change in the voltage levels.
 
thanks dude !!! it may help me !!!

will 1k ohm be enough ??? also can u tell me how to make a logic inverter(NOT gate) with the resistors, diode or transistor with complete description(values and their number) ??

thanks for the great help !!!
 
i got it and it worked !!! thanks to all !!!
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 pushed it does not call the interrupt.
any help regarding this !!
 
Did you check if there are any unintentional shorts or if the interrupt input pin is getting the signals properly?
 
i put a 15k ohm resistance and it works correctly.

can u help me to my another problem (sorry for so much trouble) ??

when circuit is on, circuit board pins has 1 to its pins and gives 0 to all the pins of the microcontroller. therefore when i give 0 value to the pins of the circuit board, circuit board give 1 to the microcontroller.
therefore when button is not pushed, 0 is passed to the pin of the circuit board and circuit board gives 1 to the pin of the microcontroller and microcontroller calls the interrupt.
circuit board works on 0-logic.
circuit board is the test board.
 
Last edited:
try hooking up swapping the resistor and the switch around. i.e. instead of having:

Vcc - switch - resistor - ground
|
interrupt pin

try


Vcc - resistor - switch - ground
|
interrupt pin

to invert the logic on the circuit level.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top