Help With Microcontrollers!!!!

Status
Not open for further replies.
what is the function of a microcontroller?? it just takes inputs from various pins and for various combination of inputs, it give various output(through programming)...is it the only function of a microcontroller or does it do anything else also??
if it is the function of a microcontroller,then can we make various devices like comparators , adc, opamp just using microcontrollers(i understand this is not a great idea but just want to know if we can do this....)

for example : to construct an adc which gives 00 for voltage less than 1v,01 for 1v-2v, 10 for 2v-3v and 11 for 3v-4v.., we will take an analog input pin of microcontroller and 2 digital output pins,and we would program the microcontroller to give the desired output for these inputs...
please correct me if i am wrong here....
 
some1 please reply....

hi,
Your OP question is confusing.

If you want to know what a Micro-controller is designed to do, it would be a good idea to look at
some of the earlier Micro-processors or CPU's [central processing units]

The early CPU's did not have peripheral harware within the ic.
They controlled external peripherals, such as memory, I/O ports, analog convertors. etc.

The lastest generation of micro-controllers now have a number of these peripherals as hardware within the ic.

This makes circuit designs simpler, smaller and more reliable.

Does this help.?
 
Last edited:
k..i will try to make myself more clear...
first of all..i am asking just the function of a microcontroller without any external hardwares attached to it....
suppose i am making a line follower...
1) sensors are used to give an output analog voltage ...
2)these voltage outputs go to comparators which gives a digital o or 1..
3) now these digital outputs are attached to a microcontroller, now my question is what does the microcontroller do with these input??( i am just talking about the small microcontroller chip and not the system on chip coming nowadays in the market with external hardwares attached to it)
4)now the output pins of the microcontroller are attached to motor driver (does the microcontroller decide what would be the output on these pins through programming??)
so basically my question is that does this microcontroller acts as a bridge between the inputs and the logital output based on these inputs??
 
Many (most?) microcontrollers (MCUs) have comparators onboard. The MCU can do whatever your little programmer heart desires with the data. It's up to the programmer who writes the code what happens in response to input.

4)now the output pins of the microcontroller are attached to motor driver (does the microcontroller decide what would be the output on these pins through programming??)
Yes.
 
Last edited:
thanks ...
i have just 1 last doubt...
a digital 0 refers to a voltage 0v to 1v approx.(i know it depends on the mcu we are using) and digital one to a voltage about 3v to 5v..so if we program a microcontroller to give a output digital 1 for input digital 0...what voltage would the output pin have???
also, what happens if the input voltage is outside the limits of digital 0 or 1...
 

hi,
Look at this link for voltage threshold levels.

Logic Voltage Thresholds for TTL, CMOS, LVCMOS, and GTLP IC's
 
what happens if the input voltage is outside the limits of digital 0 or 1...
That depends on what kind of device you're inputting the voltage into, and to what magnitude you are outside the expected limits of operation of the device. Suffice to say, nothing good will come of it, at best. You can usually find the maximum and minimum extreme specs in the datasheets for most devices.

Just as an example, for a PIC mcu, putting -5V on an input pin, rather than 0V or 5V or something in between, will either damage the IC, cause unexpected operation of your program, or not have any effect at all (although putting -5V on the input pin won't do any good, either).

Good electronics design will mean making sure you're always conscious of the parameters within which the products you're using were designed to work. I know that can be a bit of a puzzle to make the pieces all fit together when you're first starting out, but the more you work at it, the more obvious and practical solutions will become.
 
Last edited:
Best Programming language for PIC

Guys,

I'm a newbe in Electronics and programming but I am very much intersted in PIC. I want to start with something easy to learn programming language that could be very useful in PIC programming.

Thanks in advance
 
If your really new to PIC's maybe this will help?

**broken link removed**

  • From start to end - how to get an LED to blink!
  • Basic hardware requirements
  • Concept of breadboards
  • How to use PICKit 2 and Swordfish software
  • How to drive datasheets to extract pinouts etc


**broken link removed**
 
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…