A beginner's guide to Microcontrollers | Tech-knowledge
- Subir Biswas

- Nov 27, 2020
- 3 min read
Updated: Jan 3, 2021
It's a long time in this embedded field, I see beginners are jumping over to the microcontroller coding without knowing what it is exactly and how it works. In this article, I'll try to cover the basics of microcontroller and prepare a few more to provide a little bit of depth to other articles which helps the beginner to understand the working principle.

Introduction to Microcontrollers
A microcontroller is a single Integrated Circuit (IC) that is typically used for a specific application and designed to implement certain tasks. Sometimes this called an MCU. It has a CPU, RAM (Random Access Memory), special function registers, program ROM memory, data ROM memory, anywhere from one to several parallel I/O (Input/output) ports, and can have a host of on-chip peripherals including but not limited to Analog-to-Digital Converter (ADC), Digital-to-Analog Converter (DAC), Serial UART (Universal Asynchronous Receiver/Transmitter), one or several timers, comparators/on-chip voltage reference, capture/compare/PWM (Pulse Width Modulation) module, Master Synchronous Serial Port for SPI (Serial Peripheral Interface)/I2C (Inter-Integrated Circuit) communications, USB port, ethernet port, on-chip oscillators, along with a host of other peripherals.

Fig: Peripherals of Microcontroller (Source: Microchip)
Basic Uses of Microcontrollers
Products and devices that must be automatically controlled in certain situations, like appliances, power tools, automobile engine control systems, and computers are great examples, but microcontrollers reach much further than just these applications. Essentially, a microcontroller gathers input from different peripheral, processes this information with internal logic, and outputs a certain action based on the information and logic. Microcontrollers usually operate at lower speeds, around the 1 MHz to 100 MHz range, and need to be designed to consume less power.
Microcontrollers are everywhere, whether you’re driving your car, on your computer reading this (or smartphone/tablet), or making a cup of coffee on your coffee machine. With IoT rapidly increasing and data constantly being gathered, microcontrollers are a huge part of the modern world.
CPU
CPU stands for Central Processing Unit. It is basically the “brains” of the microcontroller. It is what fetches the instructions from the code memory and executes the instructions that it fetches. Its two main components are the Arithmetic Logic Unit (ALU), which performs arithmetic and logical operations, and the Control Unit (CU), which handles all of the processor’s instruction executions.
Memory Organisation
There are two types of memory available in the microcontroller devices. Sometimes this termed as on-chip ROM memory (Read Only Memory). It is like a microcontroller’s hard drive.
Program Memory
Data RAM
As Harvard architecture devices, the data and program memories use separate busses; this allows for concurrent access of the two memory spaces.
Considering the PIC18 microcontroller as an example, it has a 21-bit program counter, which is capable of addressing a 2-Mbyte program memory space. Accessing a location between the upper boundary of the physically implemented memory and the 2-Mbyte address will return all ‘0’s (a NOP instruction). On a given PIC microcontroller with say 32K of program space, the program space would occupy ROM addresses 0x0000 – 0x7FF7 (32760 or 32K).
RAM is a component that temporarily stores data and can be accessed quickly. It provides quick read-and-write access to the storage device. RAM improves total system performance because it allows the microcontroller to work with more information at the same time. Since RAM is temporary data, its content is always erased when the microcontroller is shut down. The data RAM on a microcontroller is organised into several “registers”, each with its own unique “address”. A RAM register on an 8-bit microcontroller can hold a total of 8 bits, or one byte of data. A typical RAM space specification may specify that it is 256 x 8. This means that there are a total of 256 registers in the RAM, and those registers can hold 8 bits each.
Check out the information about the peripherals in another article for the peripherals.
























Dạo này hay thấy Sc88 David chơi ko đẹp xuất hiện trong các phần bình luận dạo. Đang cầm điện thoại nên mình cũng tò mò mở tab mới ra xem thử. Mình chỉ vuốt lên vuốt xuống để xem họ tối ưu giao diện trên màn hình nhỏ thế nào thôi. Thấy các khối nội dung được chia rất gọn, khoảng cách các phần hợp lý nên thao tác vuốt khá mượt. Trải nghiệm xem nhanh kiểu lướt qua như vậy rất dễ chịu.
Not every browser game keeps my attention, but thedriftboss.com somehow does. The gameplay is simple, the controls are smooth, and unlocking new vehicles gives me another reason to keep collecting coins.
Really enjoyed reading "A beginner's guide to Microcontrollers | Tech-knowledge", and it gave me a useful reminder to stay intentional. This fits well with Controls guide for Devil Hunter Roblox movement, combat, and. Definitely bookmarking this one. devil hunter controls
https://gg88.co.com/ mình ghé thử chủ yếu vì tò mò giao diện ra sao, chứ chưa có thời gian nghịch nhiều. Vào cái thấy bố cục khá dễ chịu, nhìn không bị rối mắt, mấy phần nội dung chia theo khối nên lướt nhanh vẫn nắm được ý. Mình có dừng lại ở mục FAQ/câu hỏi thường gặp, kiểu trình bày ngắn gọn nên đọc cái hiểu luôn, hợp cho người mới. Có đoạn họ nhắc chuyện tài khoản mới xác thực xong sẽ có tiền trải nghiệm, mình thấy ghi rõ ràng nên cũng yên tâm hơn. Nói chung trang này làm phần tiêu đề và các hộp thông tin tách bạch, kéo xuống tìm FAQ khá nhanh vì các…