What exactly are you trying to communicate?
+5V and zero. Exact details are a little sketchy now, I'm just trying to
see what the terrain looks like. But I had in mind things involving an
address bus, command bus, and data bus. To tell a particular peice, for
instance, "Hey, motor, turn on", or "Spinny thing, report position".
Microcontrollers are like
magic glue that can connect a PC to the "real world". They usually
contain all the abilities necessary to connect to various sensors and
then pass that data to a full fleged PC for extended processing,
graphing, making it visible on the internet, etc etc etc.
The ones I saw were, e.g. 6 pin IC packages. And I thought to myself
"Okay, so I have a microcontroller in my little device. I still don't
know how to talk to the microcontroller with my computer." It didn't seem
to put me ahead.
As you learn
about the sensors you might use on a robot, you will begin to appreciate
how micros fit into it all. They can offload work from your main
controlling pc as well as do work that your pc really can't do without
special equipment, like the precision timing you might use in range
finding. They are cheap, extremely powerful devices that can save you
allot of frustration, keep an open mind about them.
Certainly. But they also seemed a little adult for me just now. I'm
still about at the level of "Hey, motor, turn on!"
That timing thing is interesting, though. I'd wondered how I might move
data in with precise timing information over, say, a USB, which I gather
communicates in chunks basically when it feels like it. An external clock
and about 32 bits of memory seemed sufficient if I only needed to know
when a value occured rather than ensuring something happens at a
particular time-- send the time along with the data.
I don't think you understand what they can do for you.
That is a very strong possibility. The world of microcontrollers is about
seven hours old for me now.
But I fear also that my competence has been over-estimated. I have about
the electronics skills you would expect from a physicist that has never
done electrical engineering work more complicated than a few op-amp
circuits.
As for
communicating to the PC, they are fully capable of doing so in numerous
ways (rs232, lpt port, usb, ir etc). The magic is in the fact that most
sensors don't output data in a form compatible with your pc. The micro
has the ability to transform that data into something that you can use.
What do you mean by numerous ways (rs232, etc.)? From my brief reading of
datasheets, it seemed that simply means data can be digitized and stored
in memory so that it can be read by a computer if only I were able to
build the electronics that would turn a communication standard into
suitable digital signals to tell the microcontroller what to do. Which is
exactly the problem that I came here with.
If you mean that, say, the pins of a serial port connector mounted on the
board can be connected to the designated pins of the controller and then
talking to it immediately reverts to a software problem, that is more
interesting.
They are ok, if you don't mind being tethered to a pc. It's nothing
compared to what you can do with a micro.
-) For example, a PIC
16F88 has 2 comparators, 16 i/o pins, a 7 channel 10-bit ADC, 3 timers,
hardware PWM ability, hardware USART for rs232/spi/i2c, internal
multispeed oscillator that's switchable on the fly from 32khz to 8mhz,
4k words code space, 368 bytes ram, and 256 bytes eeprom memory. Not
too bad for something that only uses ~75uA running at 1Mhz and costs
just over $3.00. BTW, PICs don't care who they talk to. ;-)
All that for just over $3.00 is impressive. But microcontroller or not, I
wanted to save data to the PC to graph or analyze, so it would be there
anyway. At least in the shorter term projects.