Skip to content
Home » Archives for Anwar Hossain Mokhter

Anwar Hossain Mokhter

UART Basics and Working Principle Explained with Examples

  • 4 min read

Hey! Let’s dive into UART, a super cool way for gadgets like microcontrollers (think AVR Controller) to talk to each other. It’s like sending text messages between two devices, but instead of words, they send bits (0s and 1s). Here’s a simple explanation to get you started! What is UART? UART stands for Universal Asynchronous… 

AVR Digital Inputs: Build a 4-Bit Binary Counter from Scratch!

  • 5 min read

Are you interested in learning how to create a simple 4-bit binary counter using the ATmega8 microcontroller? This project is perfect for beginners who want to dive into embedded systems and microcontroller programming. In this tutorial, I’ll guide you step-by-step to build a 4-bit binary counter that counts from 0000 to 1111 (0 to 15… 

LED and Button with ATmega8 – AVR GPIO Input Tutorial (Beginner Friendly)

  • 7 min read

Today, we will learn how to interface a push button with the Atmega8 microcontroller using a hardware pull-up resistor. This project will help you understand how microcontrollers read button inputs.Let’s break everything down in a simple way!A push button is a simple switch that connects or disconnects the circuit when you press it. Microcontrollers like… 

LED Blink Using ATmega8 – AVR GPIO Output Tutorial (Beginner Friendly)

  • 3 min read

Blinking an LED is the simplest way to get started with ATmega8 programming. The basic steps are: • Configure a GPIO pin as output.• Turn the LED ON and OFF with a delay. Components Required • ATmega8 microcontroller• LED• 220Ω resistor (for current limiting)• AVR Programmer (like USBasp)• Breadboard and Jumper Wires• 5V Power Supply Programming Diagram Circuit Diagram… 

Understanding Data Types in Rust: A Beginner’s Guide with Examples

  • 3 min read

Data Types Rust’s type system ensures safety and efficiency, making it a powerful language for systems programming. This tutorial explores fundamental data types, compound types, and custom data types in detail. Fundamental Data Types Fundamental data types in Rust are divided into scalar and compound types. Scalar TypesScalar types represent a single value. 1. Unsigned… 

Constants vs Static Variables in Rust: Key Differences with Examples

  • 2 min read

Constants and Static Variable Constants (const) • Purpose: Compile-time fixed values that never change.• Memory Efficiency: • Constants are inlined at compile time, meaning the value is directly embedded wherever it’s used.• No separate memory allocation at runtime, making them highly efficient. • Use Case: Best for fixed, unchanging values like mathematical constants, configuration settings,… 

Understanding Outer and Inner Scopes in Rust: A Beginner-Friendly Guide to Variable Lifetimes

  • 3 min read

Outer and inner Scope In Rust, scopes determine the lifetime and visibility of variables. They help define where a variable can be accessed or modified and when it is created and destroyed. Scopes are created using curly braces { } and can be nested, forming inner and outer scopes. Outer Scope • Variables declared in… 

Rust Compile-Time vs Runtime: How Rust Ensures Safety and Speed

  • 3 min read

Runtime and  Compile-Time In Rust, the distinction between runtime and compile-time is crucial for understanding performance and safety. Here’s an explanation: 1. Compile-Time • Definition: The phase when the Rust compiler checks, analyzes, and translates your code into machine code before the program runs.• Purpose: Ensures that certain errors (e.g., type mismatches, borrow rules) are… 

Immutable Variables vs. Constants in Rust: When to Use Each

  • 4 min read

Immutable variables or constants The decision to use immutable variables or constants in Rust depends on the specific use case and the behavior you want to enforce in your program. Here’s a detailed explanation: When to Use Immutable Variables Immutable variables (let) are used when: 1. The value doesn’t need to change during the program’s…