WeeK 04 - Embedded programming

Assignment items

Group assignment

Individual assignment




Tools

The process

This week is exceiting and area I wanted to learn more about in details. I usually used the microcontrollers for eductaional used which are already build to make robotics and coding easy for children K to 12 who are our main stakholders in the robotics eductaion domain

Microcontroller Comparision:


I am very new in this, so I asked FabGPT to help me in comparing between the list provided and the selection process

HTTP link

01 | I asked for hep to compare and select few to compare

Personal Access Token

02| Asked for table with basic comparison before opening the data sheets

MCU CPU / Class Clock Memory (on-chip) Big “why”
AVR128DB32 8-bit AVR 24 MHz 128KB Flash, 16KB SRAM Best practical 8-bit mixed-signal + 5V friendliness
RP2040 Dual-core Cortex-M0+ up to 133 MHz 264KB SRAM Best for timing + learning 32-bit MCU structure
ESP32-C3 RISC-V + Wi-Fi/BLE up to 160 MHz ~400KB SRAM (family) Best entry to IoT + wireless MCU datasheets
ESP32-C6 RISC-V + Wi-Fi 6/BLE/802.15.4 up to 160 MHz 512KB SRAM (noted by vendor) Best for modern multiprotocol (Thread/Zigbee)
I agree
  • Feedback:I was interested to learn more about Rasberry Pie and ESP


Task 01: RP2040


New file in Photoshop

01 | I opened the dtatsheet from this link

Tools used for drawing

02| This is one main information I saw "Code may be executed directly from external memory" "Debug is available via the SWD interface"

raster image zoom in

03| This diagram shows the pins available to be used in connected the other elements and devices

raster image zoom in

04| This sentence is in English but I did not anderstant what it means "The four bus masters can access any four different crossbar ports simultaneously, the bus fabric does not add wait states to any AHB-Lite slave access."

raster image zoom in

05| I looked on youtube for a simple explaination and found this video

raster image zoom in

06| As I have limited time to allocate for this task, I search sor some explaination video to make sure I understand main concept xand that im ready for the next assifnment from this link

raster image zoom in

07| I also shared the DataSheet with FabGPT to create me a one page highlighting important information as a user with no experince

raster image zoom in

08| Functional diagram

raster image zoom in

09| and I asked to reference pages and section from the datasheet against each important information

raster image zoom in

10| I looked in to Power Supply Schemes, Im still not sure how will this effect my desecion building the circute

raster image zoom in

11| I looked in to the different kinds of memorries and tried to understart the differences

raster image zoom in

12| Processor Controlled Boot Sequence

raster image zoom in

13| Logic and structure of the GPIO

raster image zoom in

14| I found this block diagram and the explaination on page 443 was a good summury of all I read in this datasheet

I liked RP2040
  • Feedback: I learned alot and I think PR2040 would be a good choise for a more complicated project than the shoulder guided posture fixture
  • Challenge: it was not easy to understant the datasheet bas I did not know many of the conceptes and referenced mentioned

Programing Microcontroller:


Option 01: Building simple curcit


HTTP link

01 | I will be using ESP32-C3-Suppermini for this task as we have more peices of this in our lab and for my project I will need two Microprocessors communicating

HTTP link

02 | It is small and I enough GPIOs for my project

HTTP link

03 | I used AI Gemeni to learn more about the microcontroller

HTTP link

04 | I read the ESP32-C3-Suppermini datasheet to get more details

A dedicated token

05| I connected the Microcontroller to a breadboard and made sure I do not connect two pins on the same pinline to avoid short curcits. I also added a 4 legs button

Token scope should be API

06| then I added a LED light bulb and a 10K resestor.

Token scope should be API

07| Then I used wire jumppers to connectmy circut.
Pin7 > LED > Resstors > GND
Pin9 > Button > GND. and as Im documneting, I realized a huge mistake. Resstor should be connected before the LED not after

Token scope should be API

08| then I connected teh MC to the computor to strat programing

Token scope should be API

09| I used this code from a previous project on Arduio and downloaded the program to the MC

Token scope should be API

10| When pressing the button, the LED lights ON.

Not bad at all
  • Feedback: This was a simple curcit created fast to fulfill this assignment.
  • Challenge: I mis connected the resestor and LED and came to know about the mistake while I was documneting. This showed the value of documneted to reevaluate the projects and also importance to recheck connections. misplacing resestor may results in damaging some parts.

Option 02: Paython


Didn't have the time!
  • Feedback:
  • Challenge: