Should I Use A Microcontroller Or A Microcomputer?

In summary: For simplicity's sake, you may want to use a single chip for all the peripherals and interrupts.In summary, the group is considering using a microcontroller to control the car's various devices. They are considering the pros and cons of using a microcontroller versus a Zilog Z80 chip. They are also considering what peripherals are needed for the project.
  • #1
VarietyBook
9
0
I am working on, with some friends, a small project. It is to take a toy radio-controlled car and put a rotating electronic rangefinder on it in order to have it drive itself around SIMPLE obstacles. We all have a slight background in electronics (not much) and lots of experience in computer programming. We are currently torn between using a Zilog Z80, with required peripherals, or a microcontroller. The car is about 8"x16", so size really isn't a problem. It runs from two BLDC motors. We have decided on using two rangefinders, two color sensors, various servo motors, and other data-gathering peripherals. The rangefinders will be building a simplistic map of the car's surroundings in order to navigate them.

Do you recommend us to use a microcontroller, build a full system with the Z80, choose a different option, or do something else with our time?
 
Engineering news on Phys.org
  • #2
If you're mainly programmers and not EE types with lots of electronic chip level building experience the best thing is to have a system designed for your type of application that allows for modular hardware. A Z80 is a good general purpose chip that won't have much of the type of internal hardware needed for embedded control. Yes, it's possible to add the needed hardware but it's much easier to get the job done with a micro-controller designed for reading encoders, controlling motors , sending data with SPI/I2C/RS-232 ,converting analog to digital and back with one or two chips on a module.
 
  • #3
I switched from Z80 to PIC microcontrollers long ago.
Everything you need to do can be done with a microcontroller.
Consider for example the Microchip PIC and dsPIC 16-bit microcontrollers.
Once you have written a real time operating system it will be trivial to program your system.
The RTOS must handle all interrupts, the clock and schedule future tasks.
My original minimal RTOS for PIC16F84 assembled to 32 words.
It made it possible to implement new projects in assembly language in less than an hour.
If the workload gets too much for one processor then you can distribute the workload across several slave microcontrollers.
 
  • #4
As much as I love the Z80, it is a bit dated now. The newer microcontrollers are far faster and smaller. Most include internal EEPROMs and have inexpensive development boards available with prototyping areas on them. You can get a complete development system (including a dev board) for under $100.
 
  • #5
Thank you, everybody. After reading your posts, we have decided to go with something that comes all-in-one, in this case Texas Instruments's Launchpad boards that come with everything. Once again, thank you all for pointing us in the right direction.
 
Last edited:
  • #6
You mentioned that you would have several servos. I have a hint for you. Do some digging and make sure that your chip has enough hardware timer interrupts to support all the servos and motors. It's really easy to use one timer interrupt to control one servo or motor. Controlling many servos and motors with one timer is a pain and it's difficult to debug the software. You'll see what I mean when you get into writing the software. More timers is more better for more RC projects.

Some chips even offer multiple PWM's that are easy to configure as motor and servo drivers.

For PIC's you can find out what peripherals and interrupts are available in PIC's product selection guide. I would recommend finding something similar for the ARM's in the launchpads and putting some thought into what kind of interrupts and peripherals you want.
 

1. Should I use a microcontroller or a microcomputer for my project?

The answer to this question depends on the specific requirements and goals of your project. Microcontrollers are typically used for embedded systems and tasks that require real-time processing and control, while microcomputers are better suited for applications that require more processing power and multitasking capabilities. Consider the size, power consumption, and complexity of your project to determine which option would be more suitable.

2. What is the main difference between a microcontroller and a microcomputer?

The main difference between a microcontroller and a microcomputer is their purpose and functionality. A microcontroller is a compact and self-contained system designed for a specific task, while a microcomputer is a general-purpose computer that can perform a wide range of tasks. Microcontrollers typically have fewer resources and are more specialized than microcomputers.

3. Can I use a microcontroller for tasks that require complex processing?

While microcontrollers are not as powerful as microcomputers, they can still handle some level of complex processing. The processing power of a microcontroller is determined by its clock speed, architecture, and memory. If your project requires a significant amount of processing, you may need to consider using a microcomputer instead.

4. What are the advantages of using a microcomputer over a microcontroller?

The main advantages of using a microcomputer over a microcontroller are its higher processing power and multitasking capabilities. With a microcomputer, you can run multiple programs and handle more complex tasks. Additionally, microcomputers often have more memory and storage space, making them more suitable for applications that require large amounts of data.

5. Can I switch between a microcontroller and a microcomputer for different stages of my project?

While it is possible to switch between a microcontroller and a microcomputer for different stages of a project, it may not be the most efficient approach. The two systems have different architectures and require different development tools and programming languages. Switching between them may result in compatibility issues and additional development time. It is best to carefully consider your project's requirements and choose the most suitable option from the beginning.

Similar threads

Replies
3
Views
813
  • Electrical Engineering
Replies
4
Views
2K
  • Electrical Engineering
Replies
4
Views
1K
Replies
2
Views
879
Replies
3
Views
4K
  • Electrical Engineering
Replies
2
Views
12K
  • General Engineering
Replies
19
Views
10K
  • Electrical Engineering
3
Replies
85
Views
8K
Replies
23
Views
11K
Back
Top