Society of Robots - Robot Forum
Electronics => Electronics => Topic started by: eduard2000 on April 27, 2008, 01:13:26 PM
-
??? so i am really confused how to connect the MICROCONTROLLERS to the some object and how does that work
:-\ can some one tell me do that work
-
I am not sure what you are asking... you connect a microcontroller to other things (be it a sensor, or a motor, or something else) with wires. I would take a look at Parallax's "What's A Microcontroller" tutorial... http://parallax.com/Store/Books/EducationalTexts/tabid/181/CategoryID/66/List/0/Level/a/ProductID/139/Default.aspx?SortField=ProductName%2cProductName (http://parallax.com/Store/Books/EducationalTexts/tabid/181/CategoryID/66/List/0/Level/a/ProductID/139/Default.aspx?SortField=ProductName%2cProductName)
You can purchase it or download it for free.
-
any is fine i just need to know how do they work
-
one more question dothey come with the delivery
-
one more question dothey come with the delivery
Does what come with what delivery?
come on man, put some effort into it!
Search google and this forum before you ask a question.
-
I tried to find but, i can't find what I needed to find
Can comeone tel me how dose the signal come in and out of the microcontroller to be able to make some thing to work :-\
Can you help me?
-
FOR EXAMPLE MAKING A LED BLINK
now there are many output ports in a microcontroller each port caontains a no of pins . Let us consider an atmega32 port D and pin no 7 .There are certain programming elements in a microcontroller which will se this pin of port 7 as an output which you have to declare in your program like this DDRD|=(1<<7)... then how do u make it blink after it is set as output???
What you do is you make the pin 7 as On for sometime then make it off for some time and yes do connect the led to that pin and the pin will blink ...
now how you do that
this programming element PORTD is a command which will switch on the pin no we have set as output (remember it will only work if that pin has been set as output)...
we write like this
PORTD|=(1<<7)//SWITCH ON PIN 7 OF PORT D
DELAY SOME TIME
PORTD&=~(1<<7) //SWITCH OFF PIN7 OF PORTD
DELAY SOME TIME
KEEP REPEATING THE STATEMENT AGAIN AND AGAIN AND IT WILL WORK AND LED WILL BLINK
-
cool thanks ;D
-
no problemo u can always ask for help
-
Have you seen this yet?
http://www.societyofrobots.com/step_by_step_robot.shtml
-
Yes I actually was reading it right now ;D
-
It depends on the microcontroller. Some just have a single output which is the SIGNAL wire. Others have a 5v+ and ground wire also. (what microcontroller r u using, can u post a diagram of it).
Basically u need to use the signal wire to switch on another circuit. u can hook a transistor up to a circuit with (say) your motors and a battery. and connect the signal wire to the transistor.
So basically the transistor is like a switch in your circuit (in which u can hook up a motor or a led or whatever) and the transistor is simply turned on when a signal comes out of ur microcontroller and into the transistor.
Alternatively u can use a MOSFET or a relay to do the same thing.
But remember when u send a digital "1" out of ur microcontroller u are sending 5V which u need to run into a switching component like a MOSFET or transistor to switch on another circuit.
-
;)I Have searched a a Little more more on internet and found a helpful Web page http://www.iguanalabs.com/mbktut/ (hope you will like it too)