Questions about microcontrollers

  • Thread starter diegzumillo
  • Start date
In summary: Microcontrollers 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.
  • #1
diegzumillo
173
18
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:
Computer science news on Phys.org
  • #2
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.
 
  • #3
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.
 
  • #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.
 
  • #5
diegzumillo said:
First, why are microcontrollers so much more popular and cheap than microprocessors?
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.

diegzumillo said:
Being a tiny computer in a chip doesn't mean it's limited to its assigned rom and ram memories, does it?
Depends on the type. Some are limited: some has limited capabilities for extensions.

diegzumillo said:
Still on the subject of expanding a microcontroller, how about communication between microcontrollers?
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.
 
  • #6
diegzumillo said:
Hi all. This is the closest thing I know of a "computery" forum, so here goes nothing.

...

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?

You may like this video about building a supercomputer of sorts based on the Raspberry Pi.

 

1. What is a microcontroller?

A microcontroller is a small computer on a single integrated circuit that is designed to control specific functions and processes. It typically contains a processor, memory, and input/output peripherals, making it a complete computing system in a small package.

2. What are the main applications of microcontrollers?

Microcontrollers are used in a wide range of electronic devices, including smartphones, computers, household appliances, medical equipment, and automotive systems. They are also commonly used in industrial applications for automation and control.

3. What are the advantages of using a microcontroller?

Microcontrollers offer low power consumption, high processing speed, and compact size, making them suitable for a variety of embedded systems. They also have a lower cost compared to traditional computers and can be easily programmed and reprogrammed for different tasks.

4. How do you program a microcontroller?

Microcontrollers can be programmed using specialized software, such as integrated development environments (IDEs) or programming languages like C or assembly. The code is then loaded onto the microcontroller using a programmer or a microcontroller development board.

5. What are some common features of microcontrollers?

Microcontrollers typically have features such as timers, interrupts, analog-to-digital converters, and communication interfaces like UART, SPI, and I2C. Some microcontrollers also have built-in features for specific applications, such as motor control or wireless communication.

Similar threads

Replies
2
Views
1K
  • Computing and Technology
Replies
2
Views
1K
  • Computing and Technology
Replies
10
Views
2K
  • Electrical Engineering
Replies
3
Views
2K
  • Electrical Engineering
Replies
18
Views
3K
  • Electrical Engineering
Replies
2
Views
1K
  • Electrical Engineering
2
Replies
53
Views
2K
  • Programming and Computer Science
Replies
12
Views
2K
  • Computing and Technology
2
Replies
36
Views
3K
  • Electrical Engineering
Replies
4
Views
2K
Back
Top