6. Electronics Design¶
Group assignment¶
- use the test equipment in your lab to observe the operation of an embedded microcontroller
Using oscilloscope¶
In Fablab Dillijan Mariam and Hrach used *** GW Instek GDS-1152A-U *** oscilloscope to observe microcontroller board operations.
This model is part of the *** GDS-1000A-U *** series and is known for its durable and user-friendly design.
Key features:
- MemoryPrime Technology: Maintains a high sampling rate (1 GSa/s) over longer time periods using a 2 Mega-point record length.
- Performance: 150 MHz bandwidth, 2 channels, and a 2.3 ns rise time.
- Display: 5.7-inch TFT color LCD with a resolution of 320 × 234.
- Connectivity: USB Host and Device ports for data logging and saving waveforms in formats such as CSV, JPEG, or video.
- Power: Supports universal 100–240 V AC input.

Mariam wrote a program with Thonny for XIAO RP2040 to send data via I2C to the LCD. Than she used oscilloscope to observe data and clock lines of I2C and after she manully decoded data by looking to diagram of signals.
Here is code.
``` import machine import time from pico_i2c_lcd import I2cLcd # Ensure this file is on your Pico
I2C configuration¶
I2C_ADDR = 0x27 # Common address; use i2c.scan() to confirm I2C_NUM_ROWS = 2 I2C_NUM_COLS = 16
Initialize I2C (Bus 0, SDA=GP0, SCL=GP1)¶
i2c = machine.I2C(0, sda=machine.Pin(0), scl=machine.Pin(1), freq=400000) lcd = I2cLcd(i2c, I2C_ADDR, I2C_NUM_ROWS, I2C_NUM_COLS)
counter = 0
while True: lcd.clear() lcd.putstr(“Counter: ” + str(counter)) # Print current count print(“Count:”, counter)
counter += 1
time.sleep(1) # Wait 1 second


Than she also did pin toggle test, to observe signal frequency which gives an idea how fast does the main loop run.
Below you can see code.
from machine import Pin, Timer
Setup GPIO 15 as output¶
led = Pin(15, Pin.OUT)
Define the toggle function¶
def toggle_pin(timer): led.toggle()