WEEK 4 EMBEDDED PROGRAMMING

1. INTEGRATED SYSTEMS

When we talk about an embedded system, we are referring to a device designed to perform specific tasks. These systems are adapted to applications that typically operate within a defined hardware and software environment. Embedded systems are currently a fundamental part of various sectors. Programming an embedded system involves developing the embedded software, which can be written in low-level programming languages.

CHARACTERISTICS

They are designed to carry out total control of all industrial processes, making it easier to perform tasks with greater detail and without errors.
Control processes are executed in less time and with low economic cost, contrary to what happens when they are executed through other types of systems.
They are easy to find and assemble, with the intention of making installation easier.
They allow high connectivity between the different technological sets found in industrial facilities

2. MICROCONTROLLERS

WHAT IS?

A microcontroller is a small computer designed to manage specific tasks and integrate processing, memory, and input/output peripherals, thus becoming independent and cost-effective units. This instrument works similarly to a computer, but is smaller in size.

RP2040

SPECS
Dual Cortex M0+ processor cores, up to 133MHz (or 200MHz at 1.15V, see Section 2.15.3)
264kB of embedded SRAM in 6 banks
30 multifunction GPIO
6 dedicated IO for SPI Flash (supporting XIP)
Dedicated hardware for commonly used peripherals
Programmable IO for extended peripheral support
4 channel ADC with internal temperature sensor, 500ksps, 12-bit conversion
USB 1.1 Host/Device

WOKWI ACTIVITY

For the Embedded Programming week, I developed a finite state machine on an RP2040 microcontroller. The project was initially simulated in Wokwi and structured for later migration to a custom-built board. The system uses a push button as a digital input and three digital outputs: two LEDs and a buzzer.

The program implements three states: inactive , armed , and alert . In the inactive state, the green led flashes slowly. In the armed state, the blue led remains continuously lit. In the alert state, the blue led flashes rapidly while the buzzer sounds. Each time a button is pressed, the system advances to the next state.

Wokwi Main Menu

To begin, we'll open the Wokwi main menu to choose which type of microcontroller or board we'll use for our simulation. We'll see several options such as ESP32, STM32, Arduino, and Pi Pico. Something very important here is defining the development platform, that is, the brain of your system. This determines what type of code we'll use and what capabilities our project will have.

Start a new project

In the following image, I'm on the screen where I'll confirm the start of a new project, Wokwi, using the Raspberry Pi Pico board, which is based on the RP2040 microcontroller the hardware and programming environment to be used in the simulation have already been defined the next step is to establish the complete foundation of the embedded system.

13. RESULTADOS DEL APRENDIZAJE