Wellys Dev

  • Home
  • Search/Topics
  • Writings
  • About
  • 2023-03-19
    Embedded Ada on an AVR Microcontroller: Introduction

    Where I begin to explore using Ada on an Arduino Uno.

    Introduction

    On the Adafruit site, I ran across a mention of an award as to an “Ada Crate on an AVR” microcontroller. Which I found fascinating. Ada is a language developed for larger computers and wasn’t something I would expect to fit on to the AVR-series of microcontrollers.

    This led me down a path of attempting to understand:

    1. What is Ada as it relates to microcontrollers?
    2. Is there value to using Ada on a microcontroller as compared to C?
    3. How do I do so?

    This post describes my journey and how to begin to develop in Ada on an Arduino Uno or AVR ATmega328P

  • 2023-03-05
    Developing in C on the RP2040: Exploring Blink

    Where I develop multiple versions of blink to better understand the timing API and bit-setting hardware API in the Pico C SDK in learning how to program the Pico in C.

    Sources

    • Pico C SDK
    • Raspberry Pi Pico and Pico W
    • Demystifying bitwise operations…

    Introduction

    The Pi Pico family of microcontroller boards have an incredible price/performance ratio. Ranging in price from $4 to $10, the Pico can provide a low-cost, high-performance dual-core Cortex M0-based board with or without wireless or installed headers (for easy breadboarding).

  • 2023-02-27
    Developing in C on the RP2040: macOS

    Updated: Feb 27, 2023: Where I install the tools and frameworks necessary to develop code in C on the RP2040 on a macOS platform.

    Sources

    • Getting Started with Pico
    • Raspberry Pi Pico SDK: Raspberry Pi Pico SDK
    • Raspberry Pi Pico Pinout
    • Shawn Hymel on Digikey

    Introduction

    Just as I did for the Linux platform, in this entry I’ll work through the steps required to be successful with developing code in C for the RP2040 on the Mac. Updated: This entry has been tested on both an Intel 2018 MacBook Pro and a M1 2020 Mac Mini.

  • 2023-02-15
    Using Arduino on the RP2040: Notes

    Introduction

    Where I share various observations as to how to use the Pico with the Arduino software framework and the legacy (~1.8.19) Arduino IDE.

    Pico Reset Button

    While most RP2040 boards will have a Reset button, the Pico does not. Why? To save costs. It also has a micro-USB connector instead of a USB C connector for the same reason. The single best way to ensure your Pico uploads properly (or more accurately) the Arduino IDE uploads to the Pico, properly is to press and hold the Boot/Sel button then unplug and plug-in the Pico. This can be required a great deal when testing I2C and the unplug/plug-in is a bit of a pain.

  • 2023-02-14
    Using Arduino on the RP2040: I2C

    Where I explore how to use the Pico’s abundance of I2C interfaces to create 2 separate I2C instances.

    Sources

    • GitHub Repository

    Introduction

    I have been using the Arduino framework and legacy IDE (1.8.19, not the 2.0 version) to develop code on the Raspberry Pi Pico. The Pico is an incredible board, well worth using due to its outstanding price/performance ratio. For only $4, you can buy a very powerful, very well documented and easily available microcontroller. With the addition of the Arduino framework, it makes using the Pico a simple decision for a lot of Uno projects..

  • 2023-01-08
    Working with GitHub and Sensors: dataLogger

    Where I demonstrate how to use a GitHub repository to develop a data logger with the Arduino Uno to measure and record analog values. In this example, I will be measuring voltage, however the same approach could be used to measure capacitance, temperature, or light etc.

    NOTE: The SparkFun Qwiic Alphanumeric Display uses 3.3V and not the 5V from the UNO! Please use a level-shifter or a Pi Pico (or equivalent) when using this specific display.

    SparkFun Qwiic Alphanumeric Display

  • 2022

  • 2022-12-29
    Setup a Raspberry Pi as a Apache/PHP/SQLite Server

    The beginning of a short course on setting up a webserver on a Raspberry Pi.

    Introduction

    It is helpful to understand how to setup a webserver from scratch. As doing so, gives you complete control as to what that server can do. For example, using a low-cost Raspberry Pi, it provides a local cloud server for you to safely learn how to program a webserver. Using a public cloud can be problematic as it will be much easier for someone to hack into your cloud software.

  • 2022-11-01
    Developing in C for the ATmega328P: I/O Ports

    Where I describe how to improve the performance of your programs by accessing the input/output (I/O) ports on the Arduino Uno, natively.

    Introduction

    The Arduino framework and Uno hardware has performed an admirable job in abstracting much of the complexity of the ATmega328P into something which is easier to understand. This approach works well for a beginner in microcontrollers and embedded C programming. Once you begin to understand how the ATmega328P works, its not unusual to find the Arduino simplification is holding you back.

  • 2022-10-29
    Analyzing Circuits Using the Espotek Labrador: Measuring Servo Control

    Where I demonstrate different methods of measuring a servo pulse to ensure it meets requirements.

    Introduction

    In the entry on servos I discussed the specific pulse requirements to make a servo move. In a nutshell, a servo needs a positive pulse .5ms to 2.3ms in a 60Hz signal. Or to put it another way, it requires a 60Hz signal with a duty cycle ranging from 3% to ~14%.

  • 2022-10-17
    Hardware Debug: Command and Configuration Reference for Bloom and gdb

    Reference page for Bloom configuration and commonly used avr-gdb commands.

    Sources

    • gdb Resources
    • Online User Manual: Debugging with GDB
    • Bloom (replaces avarice)
    • Microchip SNAP (replaces the Atmel Dragon)
    • Atmel-ICE Debugger more expensive version for both ARM and AVR

    Bloom Configuration

    Atmel ICE Debugger Configuration

    environments:
      default:
        debugTool:
          name: "atmel-ice"
    
        target:
          name: "atmega328p"
          physicalInterface: "debug-wire"
          disableDebugWirePreDisconnect: false
          manageDwenFuseBit: true
          variantName: "atmega328p-pu"
    
        debugServer:
          name: "avr-gdb-rsp"
          ipAddress: "127.0.0.1"
          port: 1442
    
    insight:
      enabled: true
    

    avr-gdb Configuration

    .gdbinit

    set history save on
    set history size 10000
    set history filename ~/.gdb_history
    
    file main.elf
    target remote :1442
    set listsize 0
    
    define cll
    make 
    load main.elf
    mon reset
    refresh
    list
    end
    
Page 4 of 15
Copyright © 2025 Lief Koepsel
  • Home
  • Search/Topics
  • Writings
  • About