What is the relationship between microcontroller and embedded? Which one should I learn first if I am doing hardware?

There is a close correlation between microcontroller and embedded systems.

A microcontroller is a microcomputer that integrates basic components such as a central processor, memory, and input/output devices to control external devices and perform specific tasks. It is often included in embedded systems to perform specific functions and tasks.

An embedded system is a computer system designed to perform specific tasks. It usually consists of hardware and software and is embedded in other products such as home appliances, automobiles, and medical devices. Embedded systems are designed with the goal of meeting the requirements of a specific application area.

Understanding microcontrollers is an important step if you wish to pursue a career in the field of hardware development. Learning about microcontrollers allows you to understand basic concepts such as computer architecture, control logic and hardware interfaces. You can choose to learn some of the popular microcontrollers such as 8051, Arduino, Raspberry Pi, etc.

Once you have a basic understanding of microcontrollers, you can start learning about embedded system design and development. This includes choosing the appropriate hardware platform, learning to use various sensors and peripherals, and developing embedded software to control the system.

In short, if your goal is to do hardware development, it is recommended that you learn microcontroller first, and then further study the design and development of embedded systems. This way you will be able to understand and master the interaction between hardware and software and be able to build feature-rich embedded systems.