Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Thread Tools Display Modes
Old 7th June 2008, 05:47 AM   (permalink)
Default Help With Microcontrollers!!!!

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....
tech_vaibhav_eee is offline   Reply With Quote
Old 7th June 2008, 06:24 AM   (permalink)
Default

some1 please reply....
tech_vaibhav_eee is offline   Reply With Quote
Old 7th June 2008, 06:48 AM   (permalink)
Default

Quote:
Originally Posted by tech_vaibhav_eee View Post
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.?
__________________
Eric
"Good enough is Perfect"

PIC tutorials:
Gramo's: www.digital-diy.net/
Bill's: www.blueroomelectronics.com/

Last edited by ericgibbs; 7th June 2008 at 06:49 AM.
ericgibbs is offline   Reply With Quote
Old 7th June 2008, 08:41 AM   (permalink)
Default

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??
tech_vaibhav_eee is offline   Reply With Quote
Old 7th June 2008, 08:46 AM   (permalink)
Default

Quote:
Originally Posted by tech_vaibhav_eee View Post
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?
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.

Quote:
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.
__________________
=========================
Futz's Microcontrollers & Robotics
=========================

Last edited by futz; 7th June 2008 at 08:47 AM.
futz is online now   Reply With Quote
Old 7th June 2008, 09:44 AM   (permalink)
Default

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...
tech_vaibhav_eee is offline   Reply With Quote
Old 7th June 2008, 12:40 PM   (permalink)
Default

Quote:
Originally Posted by tech_vaibhav_eee View Post
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
__________________
Eric
"Good enough is Perfect"

PIC tutorials:
Gramo's: www.digital-diy.net/
Bill's: www.blueroomelectronics.com/
ericgibbs is offline   Reply With Quote
Old 7th June 2008, 06:48 PM   (permalink)
Default

Quote:
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 by Hank Fletcher; 7th June 2008 at 06:49 PM.
Hank Fletcher is offline   Reply With Quote
Old 8th June 2008, 10:54 PM   (permalink)
Default 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
ece_jm is offline   Reply With Quote
Old 8th June 2008, 11:04 PM   (permalink)
Default

Swordfish BASIC for the PIC18F is easy IMO.
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is offline   Reply With Quote
Old 8th June 2008, 11:11 PM   (permalink)
Default

thanks.

I think I have already read about that a month ago.
ece_jm is offline   Reply With Quote
Old 9th June 2008, 06:34 AM   (permalink)
Default

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

Intro To PIC Programming - The Beginners Guide (17 Minutes)
  • 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


__________________
Spency.

PIC Micro's - Your mind is the limit

PIC's and interfacing with other devices - a PIC Basic Guide @ digital-diy.net

Last edited by gramo; 9th June 2008 at 06:34 AM.
gramo is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Latest
new to microcontrollers... need help uditag Micro Controllers 9 28th September 2007 07:46 AM
Two MicroControllers Eng.Remon Micro Controllers 73 13th June 2007 11:32 PM
MicroControllers! Nanya Electronic Projects Design/Ideas/Reviews 1 11th April 2007 07:55 PM
8-bit microcontrollers samcheetah Micro Controllers 8 23rd December 2006 08:39 AM
PIC Microcontrollers robchava Datasheet/Parts Requests 3 27th May 2003 03:38 PM



All times are GMT. The time now is 01:37 AM.


Electronic Circuits  |  Electronics Wiki
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.