Wednesday, February 9, 2011

The relation between human brain and microcontroller

Before explaining any thing about the relation between human brain and microcontroller lets do one small hands on...
what you need to do is follow the instructions
do the calculation but don't use paper and pen..
And finally write down your answer on  paper.


lets assume 
A = 1;
B = 2;
C = 3;
D = 0;


Now assume next sequence of instruction and do the calculation in same order
i]     D = B + 4;
ii]    B = 3 * A;
iii]   C = B - A;
iv]   D = C * 2;
v]    A = D - 1;
vi]   C = B + A + D;
vii]  D = C - 2;
viii] A = D / 2;
ix]  C = A+5;
x]  B = C * 7;

What is final Value of B?
Are you done??
Now right down your final answer on Paper .


Good!!!  It was very simple :)
But real test is ahead

Now answer the next 3 question without referring previous instruction sequence
1.What was the value of C after question number 7.
2. After question number 9  which one is smaller in value B or D ?
3.What was your final answer ?


Unexpected questions ???


First thing i will like to remind you is that microcontroller is a small micro computer,which can perform some dedicated task assigned by user.It has all the essential component on single chip.i.e. CPU,RAM,ROM,Timers,Communication Ports.etc.etc. Since it is on single chip it has its own limitation.There for it is used in small applications.

Now lets compare our brain with microcontroller...


Now in the hands on, what you were brain was doing was simply following my instruction. Now assume I am your programmer.I programmed you to follow my instructions in particular sequence and finally write down the answer on paper.

So in this example your eyes were working as input channel for your brain.
On my every instruction you used to accept some variable and do some calculations in your Brains ALU. and used to remember the values of all the variables after each instruction that is something like RAM space.
After evry single instruction values of variable were changing so you used to remember the new values each.
There for when i asked you about the values after 7 th or 9 th instruction you were unable to answer it as those value were replace by the new fresh value on next instruction set.


That is how microcontroller also work
It accept varibales from user program.
Store it temporary in to RAM space .
Perform Arithmetic operation and store result in RAM again.
And when it is asked to give output, it will give you the desire result.
You will remember the final answer always.
The reson behind that is, when I say, it is final answer.You will remember the final result in your mind .Now this part of your brain act like ROM.where you are storing values.

Then when I asked you to write down answer on paper.That means you are storing the data in some external device which can be used by others also.And you can refer it whenever you required.Even after 1 week or 1 month.Something like EEPROM.

This is just an example to explain you, how exactly microcontroller and human brain matches each other. Human brain has its own intelligence and its self learning ability keep it improve its intelligence.In case of micro controller it doesn't have self learning ability but AI can make it capable for same in future.


Now from next post onward i will start with some hard core technical data description.But in my own style ;)


Please note this is not any research paper.This is just my views about relation between human brain and micro-controllers.



Tuesday, February 8, 2011

Pouring life to micro-controllers

Pouring life to micro-controllers ?????????
sound wired but its true!!!!!!!!!!!

This knowledge was shard to me by my Sir,when i was new to this field and very enthusiastic about how this stuff work.

He told me "There is close relation between human and micro-controller."
"If you are on accident site and you saw lots of human bodies lying here and there and you have to identify which one is alive? How you are going to identify a live person."
I said "simple!, the one who breathing and heart is beating is alive!"
Sir replied "Good ! "
"But  now the human body u chose  is completely drain, he or she  don't have any power to stay alive, what will you do?"
"I will give him some water to drink, will give some food if possible,so that there will be some energy and he can move,and then will move him to nearest health center or clinic."
"but if he sleep on the way? when u don't have any transport and you have to run all the way to hospital"

"wake up him....., If he want to stay alive he cant sleep...,its dangerous for him...,and difficult for me too"
Now there was smile on my Sir's face.

You know micro-controller is like that human body only,who wont be able to run without heart beats,energy and wake up call. If your embedded system has to work your microcontroller must have all this 3 thing to keep it alive.

For any micro-controller its clock input is like its heart beats.If heart beats there then system is running. Some controller has in built clock oscillator and in some controller we have to provide clock externally.
There is no micro-controller in the world which run without clock and energy.
Now from where micro controller gets it's energy?
Energy is nothing but a Power source.Different controllers different power requirements.

Now the last thing is wake up call..
Your embedded system is real time system.It always keep on running to deliver output.But now suppose if it sleeps then??????
then you have to wake up it using some signal.That signal is known as Reset signal.

So to pour a life in to micro-controller you need
1.Clock source
2.Power Supply
3.Reset 

There are other things also which keep controller running.Which will take decisions by executing programs.
So that means there is close relation between human body and micro-controllers.

Let me tell you friends.That day onward, whenever i came across any of the micro controller application.I always related that application with human body and it helped me lot to understand the concept of micro-controllers.
I will discuss the relation between human brain and micro-controllers in next post.



Monday, February 7, 2011

About this blog

Hi friends,I have been working in the field of embedded systems since last few year,I learned lots of things during this period. During development phase of different systems I faced number of problems and at the same time how those problem can be tackled. So i decided to put all those things on this blog. Idea behind this is sharing knowledge and gaining from others.
I have worked on different controllers,so will be discussing on all those controller on my blogs.But 8051 is my first love.Its a micro-controller from which I started my journey in this field.So I am starting with my love.
I will start with basics and will try to reach as high as i can possible post by post.The post will be including the basic concepts of micro-controllers,different peripherals,designing of circuits and applications on it.

Looking forward for great journy.............