This week I learned what embedded programming constitutes.
Group assignment: demonstrate and compare the toolchains and development workflows for available embedded architectures
Individual assignment: browse through the data sheet for your microcontroller write a program for a microcontroller, and simulate its operation,
to interact (with local input &/or output devices) and communicate (with remote wired or wireless connections)
extra credit: test it on a development board extra credit: try different languages &/or development environments
RP2040 is a low-cost, high-performance microcontroller device with flexible digital interfaces. Key features:
Dual Cortex M0+ processor cores, up to 133MHz
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
Trying out WOKWI
WOKWI is an online simulator for microcontrollers, allowing users to test and debug embedded systems without needing physical hardware.
It supports various microcontrollers, including the Raspberry Pi Pico, Arduino boards, and ESP32,
along with virtual peripherals like LEDs, buttons, sensors, and serial monitors. i tried to simulate and learn basic codes to work a circuit.
. Open Wokwi and make an account for yourself and add a new project
Select Pico as Microcontroller. Also select the language as Micropython.
A templete with the raspberry pi board will appear on the screen along with a window on the left for writing the code.
Now we can add components and write codes to simulate an action. Since this was the the first time i was doing this i went with a simple circuit
containing a LED that will turn on with a push button switch.
So i placed an LED on to the board and connected its ends to a ground pin and another available pin. You can customize the colours of the LED too.
Similaryly add a push button switch to the circuit
Components of a PCB
Switches:can either allow current or block depending if they are closed or open.
There are several different types of switches available such as slider, push button, lever, toggle, key switches
etc.
Resistors:Resistors are one of the most commonly used components in PCBs. They are used to resist the flow of
current by dispersing the current flowing into it as heat.
Capacitors: Another common component seen in PCBs. They temporarily hold electric charge and then dispersed
whenever more power is required in th ecircuit.
It functions by collecting opposite charges on two conductive layers with a insulating material in between.
Inductors: They store energy in the form of magnetic field which is formed when current flows through an coil
of wire.
They are used to block or filter out certain signals.
Diode: This device only allows current to flow from the anode to cathode i.e. only in one direction. This
helps to stop current to flow not the wrong path which may cause damage. LEDs are semiconductor light sources that
emit light when current flows through it in the correct direction.
Transistors: the are used to amplify the charge or as electronic switches. They can either be n-channel
transistor or p-channel transistors.
The NPN transistors .
Designing a PCB
We have to design and map out a PCB before it is built. To do so we have to seek out CAD tools such as
Eagle,EasyEDA,kiCAD,OrCAD etc. The software is used
for designing the PCB is kiCAD.KiCad is an open-source Electronic
Design Automation (EDA) software that helps users to create schematic diagrams of electronic circuits and convert
them into PCB layouts and 3d models.
There PCB design can be separated into 2 categories; schematic diagram of the the PCB and PCB layout to help
design how the components will be mapped out physically on the board.