Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Questions about microcontrollers

  1. Apr 27, 2018 #1
    Hi all. This is the closest thing I know of a "computery" forum, so here goes nothing.

    I know a microcontroller is basically a tiny computer in a chip, so it's possible to make it into a tiny computer, even having a kernel and tiny os. I've seen people do even simple videogames with pic, atmega etc. I personally have little experience with these little things, mostly just arduino projects, but I'm interested in adopting this as a new hobby. I'm not good at it but low level programming has a soothing effect on me. Go figure.

    Anyway, before embarking on this I have some burning questions that will take a long time to answer on my own and I'm too curious now.

    First, why are microcontrollers so much more popular and cheap than microprocessors? I guess it's a market thing, seeing the need for a microcontroller is larger than a microprocessor, that require more things around it. Still, it's odd that we don't see simple 8 bit cpus, the ones used on old pcs, still being manufactured and sold for simpler applications and enthusiasts, while you can buy an atmega in batches for $2 each.

    Being a tiny computer in a chip doesn't mean it's limited to its assigned rom and ram memories, does it? I imagine it isn't, but is this usual? Do people do that? does it have drawbacks?

    Still on the subject of expanding a microcontroller, how about communication between microcontrollers? Can this be made to work like all the different boards in my desktop computer, efficiently working together, or would this communication be too slow or limiting to have a similar function?
     
    Last edited: Apr 27, 2018
  2. jcsd
  3. Apr 27, 2018 #2

    jedishrfu

    Staff: Mentor

    These are interesting questions. Each of which has many possible answers. You’re right about micro controllers. They are specialized to control external hardware. The programming is specific to the controlling task. The arduino fits into that category in the sense that it has a minimalist design and does great at controlling electronic projects.

    The raspberry pi is at the other end. It has USB, Bluetooth and Ethernet communications capability. It has a general purpose OS in Linux. It has an hdmi video port. However, it’s memory is limited to what can be stuffed onboard and it has an SD card for disk storage. But still it’s a working computer that programmers can use given its limitations,

    Some folks marry the two together where the PI is the arduino development center and arduino programs are built and downloaded to the arduino. If something goes wrong on the arduino in your program you have to use the PI to diagnose and fix it using whatever limited debugger is provided.

    Microcomtrollers can talk via whatever protocol you can think up since you can control both sides. However you need to be knowledgeable about how communications work on the port you’re using. Old time microcomputers used to use serial communications with just a couple of wires connected to a serial port. It’s slow relative to other schemes but effective. Other strategies were using the printer parallel port but micros no longer have these by default.
     
  4. May 1, 2018 #3

    analogdesign

    User Avatar
    Science Advisor

    Microcontrollers are still popular in industry because they are cheaper. Not only is a microcontroller cheaper on a per-unit basis than even a simple microprocessor, they typically have a high level of integration. That means they include the need memory, communications circuits and sometimes even simple analog circuits needed to do their job. This leads to both reduced cost and a reduced number of components (called "Bill of Materials" in industry jargon) that is very attractive indeed.

    As far as communication, the hobby systems typically have communication facilities built in. For example, Raspberry Pi has I2C and SPI components built into the kernal (if you ask for them) that make communication with other chips a breeze.
     
  5. May 1, 2018 #4
    Hey, thanks for helping, you two. Took me a while to get reply but I read it.

    I started messing around with programming them here. Slow and simple, but fun. I found some projects to make computers out of these micro controllers but they all seem to avoid using more than one, so I'm guessing it must be a lot more challenging and not necessarily worth the trouble.
     
  6. May 2, 2018 #5
    Microcontrollers (at least the cheap ones you are asking about) are usually not produced on the actual top FABs, and their specs are usually far lower than the common CPUs (like the usual x86 types). Typical x86 these days has four 3-4GHz core, and a chase which can handle 100W dissipation: a cheap ucontroller has one core and can handle 1-2W at most.

    Depends on the type. Some are limited: some has limited capabilities for extensions.

    These things mostly built to handle several different low level IO devices and has specialized communication interfaces like SPI, I2C, RS232, CAN and such. Some has inbuilt USB and/or Ethernet circuits too, so they can be connected. But actual "efficiently working together" would require different interfaces.
     
  7. May 7, 2018 #6
    You may like this video about building a supercomputer of sorts based on the Raspberry Pi.

     
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Loading...