In that condition the micro acts as a simple timing device; exactly how it performs that function is down to the program code you give it.
It controls the led by turning one of its output ports high or low which allows the current to flow, via a current limiting resistor, to the led.
There are many tutorials / books out there to give you a better understanding, though we can better help you if you say what make of Micro your intend to use and also what programming language you want to learn.
Have a look at this Pic tutorial on how to Light a Led to get a better understanding of how a micro works.
**broken link removed**
By output port high or low,do you mean 0 or 1. And secondly,what if i wanted to control the brightness of the led,will i use the micro processor to control the high and the low or is that the work of a variable resistor?.
I am using the avr microcontroller.I want to learn what goes on to turn on or off an led from a micro controller and also to control the brightness of the led possibly from a microcontroller.
Yes, high and low level means 1 and 0 logic and also 5V and 0V in digital circuits. 5V is logic high if it is a 5V logic device. Brightness of LED can be controlled using PWM of microcontroller. The more the duty of the PWM pulse more bright the LED will glow. Some compilers like mikroC PRO AVR have built-in PWM libraries and you can set PWM duty between 0 and 255. For 0 duty the LED will be off and for 255 the LED will have max brightness.
The MOSFETS controlling the output pin act as switches and they either source or sink current. They can source or sink current through LED connected to it. Read about transistor and mosfet switching circuits.
By output port high or low,do you mean 0 or 1. And secondly,what if i wanted to control the brightness of the led,will i use the micro processor to control the high and the low or is that the work of a variable resistor?.
I am using the avr microcontroller.I want to learn what goes on to turn on or off an led from a micro controller and also to control the brightness of the led possibly from a microcontroller.
Using a breadboard, AVR chip and programmer does work but its not the easiest of ways to start for a complete novice imho.
Assuming you are wanting to use some form of C programming then my choice would be to go down the Arduino Uno route.
The reasons for this are that you get a complete microboard thats usable the instant you plug it into your USB port and it has masses of ready made program examples and tutorials plus its own extensive forum.
Your current kit will be a perfect match as you can use the breadboard with the Uno for your experiments and later you can burn your Uno proven program code onto your own chips with your programmer.
A genuine Uno cost about GBP £20 but you can buy very good clones for around £6, I bought one the other month as it was cheaper than building the equivalent circuit .
**broken link removed**
If you want to see how the Arduino is set up then have a look at this video which really does take you every step of the way (a lot of other tutorials can assume you already know quiet a few things ) https://www.youtube.com/watch?v=kLd_JyvKV4Y