Commit 7a646778 authored by Jonathan Chery's avatar Jonathan Chery 💬
Browse files

Finished week09

parent f3fd123e
Pipeline #234473 passed with stage
in 52 seconds
......@@ -4,8 +4,8 @@ This week I worked on:
- Previous Week
- Reading the datasheet for the microcontroller I was programming
- Exploring the datasheet for ESP32
- Programming a board
- Exploring the datasheet for ESP32­-WROOM
- Programming a Board
- Link To Group Assingment
## Previous Week
......@@ -32,32 +32,44 @@ First off, reading a datasheet is tough. There's a lot of content and can easily
Scanning through the datasheet, there were a lot of information given. Some of the information that were given, I didn't quite know what to do with it however, others seemed to be quite useful. For example, Figure 1-1. tinyABR 1-Series Overview gave me insight of the Flash Memory and Pins available for the type of ATtiny.
![figure_1](../images/week08/figure_1.png)
![figure_1](../images/week09/figure_1.png)
Another information that I'm able to use from this datasheet is the ordering code for the ATtiny 412:
![figure_2](../images/week08/figure_2.png)
![figure_2](../images/week09/figure_2.png)
The 8-pin SOIC was another aspect of this datasheet that I can use to help me further understand how to work with the ATtiny 412:
![figure_3](../images/week08/figure_3.png)
![figure_3](../images/week09/figure_3.png)
In all, microchip datasheet is quite helpful in understanding what technology a person is working with. Though not all the information might be relevant for me, some which were pointed out in the images above will help in programming the ATtiny 412.
## Exploring the datasheet for ESP32
## Exploring the datasheet for ESP32-­WROOM
ESP32-WROOM is the micro-controller I want to use for my final project. That said, I explored the [ESP32 datasheet](https://www.espressif.com/sites/default/files/documentation/esp32-wroom-32_datasheet_en.pdf). In the datasheet, I found the overview of the chip helpful. The overview can be found on page 6:
![overview](../images/week09/overview.png)
I also found the pin out for the ESP32 quite helpful:
![esp32_pinout](../images/week09/esp32_pinout.png)
Along with the pinout definition which can be found on pages (8-9).
## Programming a Board
My goal was to create a program that causes my board to light up every time I click the button. When I click the button, the LED would turn on until I click the button again, where the LEd would close. To get the programming working, I needed a:
## Programming My Board To Do Something Simple
My goal was to create a program that causes my board to light up every time I click the button. When I click the button, the LED would turn on until I click the button again, where the LEd would close. To get the programming working, I needed a ![UPDI 3 adapter](http://academy.cba.mit.edu/classes/embedded_programming/UPDI/hello.serial-UPDI.3.jpg). This adapter was inspired the ![schematic](http://academy.cba.mit.edu/classes/embedded_programming/UPDI/hello.serial-UPDI.3.png) using the following ![traces](http://academy.cba.mit.edu/classes/embedded_programming/UPDI/hello.serial-UPDI.3.traces.png) and ![interior](http://academy.cba.mit.edu/classes/embedded_programming/UPDI/hello.serial-UPDI.3.interior.png).
![UPDI 3 adapter](http://academy.cba.mit.edu/classes/embedded_programming/UPDI/hello.serial-UPDI.3.jpg)
This adapter was inspired by the:
![schematic](http://academy.cba.mit.edu/classes/embedded_programming/UPDI/hello.serial-UPDI.3.png)
![traces](http://academy.cba.mit.edu/classes/embedded_programming/UPDI/hello.serial-UPDI.3.traces.png)
![interior](http://academy.cba.mit.edu/classes/embedded_programming/UPDI/hello.serial-UPDI.3.interior.png)
![serial_UPDI_3](../images/week09/serial_UPDI_3.png)
I used the following files to created the above *adpater*:
1. ![Traces](http://academy.cba.mit.edu/classes/embedded_programming/UPDI/hello.serial-UPDI.3.traces.png)
2. ![Interior](http://academy.cba.mit.edu/classes/embedded_programming/UPDI/hello.serial-UPDI.3.interior.png)
......@@ -68,9 +80,11 @@ Once I created the adapter, I downloaded the [Arduino IDE](https://www.arduino.c
To program my board, I needed to first understand how the UPDI adapter, my PCB board, and the FTDI adapter works. I reached out to one of my instructor, [Greg Buckland](http://fab.academany.org/2018/labs/fablabdassault/students/greg-buckland/about.html), where he explained the process of embedded programming. In short, the takeaway I gained from our sessions were:
1. ![FTDI_adapter](../images/week09/FTDI_adapter.png)
The above image is an FTDI adapter with some Male to Female Jumper wires. FTDI stands for Future Technology Devices International and it is used to establish communication with your board/MCU through your computer. The main reason we use an FTDI adapter is because our boards do not have USB support and the FTDI adapter provides that support. External FTDI adapter has the ability to talk to your PCB board. When using the FTDI adapter, we focus on **VCC**, **GND**, **TXD (Transmit)**, and **RXD(Receive)**. More information about its usage can be found here -> [Link](https://behind-the-scenes.net/ftdi-usb-uart-module/)
2. ![serial_UPDI_3](../images/week09/serial_UPDI_3.png)
The above image is a UPDI adaptor. UPDI stands for Unified Programming and Debug Interface and it is used to program the board. The three sockets allows you to program and power the board.
3. We use the jumper cables to connect the FTDI adapter to the UPDI adapter. It is important to verify that the pins match. For example, we must match the FTDI adapter's **VCC**, **GND**, **TXD**, and **RXD** to the UPDI adapter's **VCC**, **GND**, **TXD**, and **RXD**.
......@@ -89,7 +103,6 @@ Additionally, below is the diagram for serial communication mode:
![diagram_two](../images/week09/diagram_two.png)
## Programming On The Arduino Web IDE
Though I downloaded the Arduino IDE, I decided to test out the Arduino Web IDE and explore its functionality.
![web_ide](../images/week09/web_ide.png)
......@@ -153,12 +166,14 @@ void loop() {
delay(1000); // wait for a second
}
```
I used [CLoudConvert](https://cloudconvert.com/) to convert my recorded video to mp4 and then used [ezgif](https://ezgif.com/) to cut down the video size. The result was the video below:
![blinking](../videos/week09/blinking.mp4)
The **LED_PIN** was set to **4** based on the ATTiny412 pinout. THe LED pinout on the ATTIny412 was on 7th leg. Using the image below, I was able to find the LED pin to be either **PA3** or **4**. However, the image above indicates the leg to be 13. I wasn't quite sure why but, I did use the values associated with 13.
![attiny412_pinout](../images/week09/attiny412_pinout.png)
Now, to plug the FTDI adapter and upload the code.
![successful_code](../images/week09/successful_code.png)
......@@ -202,6 +217,12 @@ void loop() {
}
```
After several trail and errors, I noticed that there was a loose solder on the UPDI adapter. This loose solder caused my code upload to fail. When I press down on the weak solder, the code would get uploaded without fail. But when I do not, the upload would fail. To fix this issue, I need to resolder that part of the pin.
Area that needs to be resoldered:
![resolder_here](../images/week09/resolder_here.png)
Now, the button is a success:
![success_button](../images/week09/success_button.png)
Button not pressed:
......@@ -210,7 +231,8 @@ Button not pressed:
Button pressed:
![button_press](../images/week09/button_press.png)
After several trail and errors, I noticed that there was a loose solder on the UPDI adapter. This loose solder caused my code upload to fail. When I press down on the weak solder, the code would get uploaded without fail. But when I do not, the upload would fail. To fix this issue, I need to resolder that part of the pin.
Short video:
![blinking_button](../videos/week09/blinking_button.mp4)
Area that needs to be resoldered:
![resolder_here](../images/week09/resolder_here.png)
\ No newline at end of file
# Link to Group Assignment
This week group assignment was to compare the performance and development workflows for other architectures.[Group's Page](http://fabacademy.org/2021/labs/dassault/)
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment