博文

How to get microcontroller stuck on breadboard out?

图片
 Unplug everything first, then treat it like a fragile LEGO brick, not a nail you yank out. Here’s a safe way to free a stuck DIP microcontroller from a breadboard without wrecking the pins or the board. 1. Before you start Power off & unplug Remove USB, battery , bench supply – everything . Remove all jumper wires from that IC It’s much easier to pull straight when nothing is tugging on the pins. 2. Best method: lift a little from each side If you have proper tools IC extractor or IC puller Hook onto both ends of the package. Pull straight up , very gently, rocking side-to-side by 1–2 mm max until it walks out. If you don’t have an extractor (common case) Use two small flat tools : tiny flat screwdriver metal spudger butter knife / guitar pick (careful!) Steps: Insert tool on one long side Slide the tip between the plastic body of the MCU and the breadboard top, not under the pins. Gently twist or lever Aim...

How to program an Arduino?

图片
  You “program” an Arduino by writing a sketch (a C/C++ program), compiling it, and uploading it to the board over USB. Let’s walk it from zero to blinking LED. 1. What you need An Arduino board (Uno, Nano, Mega, etc.) USB cable that matches your board (Uno: USB-B, newer: USB-C/micro-USB) A computer (Windows / macOS / Linux) Arduino IDE installed If you don’t have the IDE yet, download it from the official Arduino site (Arduino IDE 2.x). Install it like any normal app. 2. Connect the Arduino Plug the USB cable into the Arduino and your computer. The power LED on the Arduino should turn on. Windows may install a driver automatically; on macOS and Linux it usually just works. 3. Open the Arduino IDE and select your board Start Arduino IDE . Go to Tools → Board and choose your board, for example: Arduino Uno Arduino Nano Arduino Mega or Mega 2560 , etc. Go to Tools → Port and pick the port that shows something like: COM3 (...

How to boot stm32 Blue Pill?

图片
 On the STM32 “Blue Pill”, “booting” basically means: Power the board correctly Put it in the right boot mode (BOOT0/BOOT1) Have valid firmware in flash I’ll walk you through the typical ways to boot it. 1. Powering the Blue Pill (don’t skip this) The board has an STM32F103C8 (or CB) + a 3.3 V regulator. You can power it in three safe ways : Via USB port (Mini-USB) Plug into USB → board gets 5 V → regulator makes 3.3 V for the MCU. Via 5V pin Feed regulated 5 V into the 5V pin, GND to GND. Direct 3.3 V Feed 3.3 V into 3.3V pin, GND to GND (bypasses regulator). ⚠️ Never put 5 V on the 3.3 V pin → instant blue smoke risk. If power is good, the red power LED should light. 2. Boot mode basics: BOOT0 & BOOT1 The STM32 decides where to boot from using BOOT0 and BOOT1 at reset: On the Blue Pill: BOOT0 is broken out with a jumper. BOOT1 (PB2) is usually fixed low (GND) with a resistor. So the useful modes are: BO...

How to power on DE10 FPGA?

图片
 To power on a Terasic DE10 FPGA board , you mainly need the right power source and the correct switch/jumper settings. I’ll cover the common boards (DE10-Nano, DE10-Lite, DE10-Standard). The exact steps are very similar. 1. Identify which DE10 board you have Look at the silkscreen on the PCB: “DE10-Nano” (with HPS/ARM and RJ45 Ethernet) “DE10-Lite” (small, MAX 10 FPGA, usually used in courses) “DE10-Standard” (larger, Cyclone V , more connectors) If you’re not sure, follow the section that visually matches what you see. 2. DE10-Nano – how to power it on The DE10-Nano can be powered in two main ways : Option A: Via DC barrel jack (recommended for heavy loads) Use a 5V regulated DC adapter , usually 5V / 2A (check label on board or kit PSU). Plug the adapter into the DC jack on the board. Make sure the power select jumper (often labeled JP3 / PWR or similar) is set to DC IN / EXT (depends on revision). Slide the ON/OFF switch (if present) t...

How to install Raspberry Pi OS?

图片
 Here’s the straightforward way to install Raspberry Pi OS, step by step. 1. Prepare what you need Hardware Raspberry Pi board (any supported model) microSD card (8 GB minimum, 16–32 GB recommended, Class 10) Card reader for your PC Power supply for the Pi (Optional) HDMI cable + monitor, USB keyboard/mouse On your computer A PC running Windows, macOS, or Linux Raspberry Pi Imager (official tool) 2. Download and install Raspberry Pi Imager Go to the official Raspberry Pi website and download Raspberry Pi Imager for your OS. Install it like a normal application and then open it. Imager handles downloading the correct Raspberry Pi OS image and writing it to the SD card for you. 3. Flash Raspberry Pi OS to the microSD card Insert the microSD card into your computer. In Raspberry Pi Imager : Click Choose Device (if available) and select your Pi model (e.g. “ Raspberry Pi 4 ”). Click Choose OS For most users: Raspberry...

How to store config file on microcontroller?

图片
 You treat the “config file” as a small block of non-volatile data and give it a safe place + a simple protocol, rather than literally thinking “files on a PC”. Here’s a practical way to do it. 1. Decide where to store the config Depending on your MCU and how big the config is: Internal EEPROM (AVR, some STM8 , some STM32 , PIC , etc.) Easiest: byte-wise writes, survives reset and power off. Great for a few bytes to a few kB (baud rate, calibration constants, flags…). Internal Flash (most Cortex-M, ESP32, etc.) Use one or more flash pages/sectors reserved for config. You must erase a whole page before rewriting; limited erase cycles (often 10k–100k). Common for MCUs without EEPROM (STM32, nRF, etc.). External non-volatile memory I²C/SPI EEPROM/FRAM/Flash if you need more space or don’t want to wear out internal flash. FRAM is great when you want many writes (wear basically not a problem). SD card / filesystem Overkill for tiny conf...

How to do wiring for shield board for Arduino Nano in KiCad?

图片
Think of an Arduino Nano shield PCB in KiCad as: A board with two rows of female headers that match the Nano’s pins, plus whatever parts you want to connect to those pins. “Wiring” is really just connecting Nano pins (on the schematic) to your parts , then routing those nets on the PCB. I’ll walk you through it step-by-step. 1. Decide what the shield should do Before KiCad: Which Nano pins do you need? (D2–D13, A0–A7, 5V, 3V3, GND, VIN…) What will you connect? e.g. joystick module: X→A0, Y→A1, SW→D2 LEDs on D3/D5 I2C connector on A4/A5, etc. Write this mapping down; you’ll literally implement that in the schematic. 2. In the schematic: use Nano symbol as the “connector” Assuming you already have an Arduino Nano symbol (from previous step / library): Create a new KiCad project for the shield. Open Schematic Editor . Place the Arduino Nano symbol This symbol represents the female headers where the Nano will plug in. Its pins D0, D1, 5V, GND… are yo...