diff --git a/docs/adrianino.html b/docs/adrianino.html index 650f4f9c0141867b14c542158567437b46508f3b..31a172408bd93c4cded833c11604183375eabc56 100644 --- a/docs/adrianino.html +++ b/docs/adrianino.html @@ -148,7 +148,7 @@ <p>Another important thing that the datasheet is telling us is that you have to keep in mind which kind of input component you are using, digital or analog: for instance, if you are using a temperature sensor (analog component) you have to connect it to an ACD (analog to digital converter) port otherwise the microcontroller isn't able to transform the information that is receiving from the sensor to a digital data.</p> - <h1><a id="bom"></a>BOM and Schematic</h1> + <h1><a id="bom"></a>BOM and Schematic for Adrianino</h1> <p>This is the schematic where you can see all the components.</p> @@ -313,25 +313,25 @@ <p>I follow the <a href="https://gitlab.fabcloud.org/academany/fabacademy/2020/bootcamp/spicy/blob/master/Program1614.md"><b>tutorial</b></a> that Pablo taught me that they used in the <b>Bootcamp in India</b> that <b>Santi</b> from <b>Fab Lab BCN</b> created.</p> - <ul><li>1. For this I install Arduino. Within Arduino, in the preferences tab we will add the URL to load the Arduino IDE with other cards or microcontrollers. <a href="https://github.com/SpenceKonde/megaTinyCore"><b> Spence Konde tutorial</b></a></li></ul> + <ul><li><b>1.</b> For this I install Arduino. Within Arduino, in the preferences tab we will add the URL to load the Arduino IDE with other cards or microcontrollers. <a href="https://github.com/SpenceKonde/megaTinyCore"><b> Spence Konde tutorial</b></a></li></ul> <p><img src="images/week08/week08.06.jpg" width="80%"; max-width="700" /></p> - <ul><li>2. I download <a href="https://github.com/mraardvark/pyupdi"><b>"pyupdi".</b></a> - <li>3. Open terminal. Install dependeces: <b><i>pip3 install intelhex pylint pyserial</i></b> </ul> + <ul><li><b>2.</b> I download <a href="https://github.com/mraardvark/pyupdi"><b>"pyupdi".</b></a> + <li><b>3. Open terminal.</b> Install dependeces: <b><i>pip3 install intelhex pylint pyserial</i></b> </ul> <p><img src="images/week08/week08.14.jpg" width="80%"; max-width="700" /></p> - <ul><li>4. I connect the USB-FTDI. - <li>5. I run <b><i>dmesg -w</i></b> - <li>6. Connect and disconet the ftdi cable and take note of the "port name" where:</ul> + <ul><li><b>4.</b> I connect the USB-FTDI. + <li><b>5.</b> I run <b><i>dmesg -w</i></b> + <li><b>6.</b> Connect and disconet the ftdi cable and take note of the "port name" where:</ul> <p><img src="images/week04/week04.40.jpg" width="80%"; max-width="700" /></p> - <ul><li>7. I configure the Arduino IDE for the ATtiny 1614; I configure the clock to 20MHz, the TX and RX ports and in my case the communication port with the <b>/dev/ttyUSB0</b> microcontroller.</ul> + <ul><li><b>7.</b> I configure the Arduino IDE for the ATtiny 1614; I configure the clock to 20MHz, the TX and RX ports and in my case the communication port with the <b>/dev/ttyUSB0</b> microcontroller.</ul> <p><img src="images/adrianino/a_02.jpg" width="80%"; max-width="700" /></p> - <ul><li>8. Only the code is <b>compiled.</b> In the Arduino IDE dialog box, we will see where the temporary files are located.</ul> + <ul><li><b>8.</b> Only the code is <b>compiled.</b> In the Arduino IDE dialog box, we will see where the temporary files are located.</ul> <p><img src="images/adrianino/a_03.jpg" width="80%"; max-width="700" /></p> - <ul><li>9. We look for the <b>.hex file</b> which is the one we need, it is in a temporary folder. Once located, we copy it and paste it in the <b>pyupdi folder.</b> </ul> + <ul><li><b>9.</b> We look for the <b>.hex file</b> which is the one we need, it is in a temporary folder. Once located, we copy it and paste it in the <b>pyupdi folder.</b> </ul> <p><img src="images/adrianino/a_04.jpg" width="80%"; max-width="700" /></p> - <ul><li>10. I connect it as follows.<b> USB-Serial-FT230X + UPDI-VCC.</b></ul> + <ul><li><b>10.</b> I connect it as follows.<b> USB-Serial-FT230X + UPDI-VCC.</b></ul> <p><img src="images/adrianino/a_05.jpg" width="60%"; max-width="700" /></p> - <ul><li>11. Go into the "pyupdi" folder. - <li>12. Program the board using python -> run <b><i>sudo python3 pyupdi.py -d tiny1614 -c /dev/ttyUSB0 -b 115200 -f Blink.ino.hex -v</i></b></ul> + <ul><li><b>11.</b> Go into the "pyupdi" folder. + <li><b>12.</b> Program the board using python -> run <b><i>sudo python3 pyupdi.py -d tiny1614 -c /dev/ttyUSB0 -b 115200 -f Blink.ino.hex -v</i></b></ul> <p>In this short video you can see the process of loading the programming and the operation of a Blink on pin PA1 (8 in Arduino) where the LED is integrated. 😠</p> diff --git a/docs/assignments/samdino/carcasa_samd.stl b/docs/assignments/samdino/carcasa_samd.stl new file mode 100644 index 0000000000000000000000000000000000000000..0ab2662a807eaf5c9b8dd956299a319e34ff1a52 Binary files /dev/null and b/docs/assignments/samdino/carcasa_samd.stl differ diff --git a/docs/images/samdino/blink1.mp4 b/docs/images/samdino/blink1.mp4 new file mode 100644 index 0000000000000000000000000000000000000000..38a18026c503f78b9eebe9cc0ddd58313b3e0915 Binary files /dev/null and b/docs/images/samdino/blink1.mp4 differ diff --git a/docs/images/samdino/s_07.jpg b/docs/images/samdino/s_07.jpg new file mode 100644 index 0000000000000000000000000000000000000000..cac394b995e81ec92fbe3180e2ca0ac428ca25e5 Binary files /dev/null and b/docs/images/samdino/s_07.jpg differ diff --git a/docs/images/samdino/s_08.jpg b/docs/images/samdino/s_08.jpg new file mode 100644 index 0000000000000000000000000000000000000000..8febb27dd1691ba0d53c4b806439c53602bbe2c7 Binary files /dev/null and b/docs/images/samdino/s_08.jpg differ diff --git a/docs/images/samdino/s_09.jpg b/docs/images/samdino/s_09.jpg new file mode 100644 index 0000000000000000000000000000000000000000..e73b59c554c4c30231524a9fd1464632685f8b29 Binary files /dev/null and b/docs/images/samdino/s_09.jpg differ diff --git a/docs/images/samdino/s_10.jpg b/docs/images/samdino/s_10.jpg new file mode 100644 index 0000000000000000000000000000000000000000..31000e0dd63fd3014537c776eeb2753665b44fc1 Binary files /dev/null and b/docs/images/samdino/s_10.jpg differ diff --git a/docs/images/samdino/s_11.jpg b/docs/images/samdino/s_11.jpg new file mode 100644 index 0000000000000000000000000000000000000000..96daa9e8f9dffc1a358910337e580a5ed3fa6dd0 Binary files /dev/null and b/docs/images/samdino/s_11.jpg differ diff --git a/docs/images/samdino/s_12.jpg b/docs/images/samdino/s_12.jpg new file mode 100644 index 0000000000000000000000000000000000000000..c072f0fe7586bdd82bfa57d857c16b593dd2a451 Binary files /dev/null and b/docs/images/samdino/s_12.jpg differ diff --git a/docs/images/samdino/s_13.jpg b/docs/images/samdino/s_13.jpg new file mode 100644 index 0000000000000000000000000000000000000000..3377cb93e76844be2c467a625efa712e4e7bd9df Binary files /dev/null and b/docs/images/samdino/s_13.jpg differ diff --git a/docs/images/samdino/s_14.jpg b/docs/images/samdino/s_14.jpg new file mode 100644 index 0000000000000000000000000000000000000000..d993983ebd3a9c56ca2e40ea66905a29c2fa1cbb Binary files /dev/null and b/docs/images/samdino/s_14.jpg differ diff --git a/docs/images/samdino/s_15.jpg b/docs/images/samdino/s_15.jpg new file mode 100644 index 0000000000000000000000000000000000000000..5e505baabfb668911f818efe3dc4c42d631d09fc Binary files /dev/null and b/docs/images/samdino/s_15.jpg differ diff --git a/docs/images/samdino/s_16.jpg b/docs/images/samdino/s_16.jpg new file mode 100644 index 0000000000000000000000000000000000000000..90edf9d81f7e47e5fd3b54127527d7746c0e731d Binary files /dev/null and b/docs/images/samdino/s_16.jpg differ diff --git a/docs/images/samdino/s_17.jpg b/docs/images/samdino/s_17.jpg new file mode 100644 index 0000000000000000000000000000000000000000..618db1d7c5fda83812e2a41cf1cab921af67ac6c Binary files /dev/null and b/docs/images/samdino/s_17.jpg differ diff --git a/docs/images/samdino/s_18.jpg b/docs/images/samdino/s_18.jpg new file mode 100644 index 0000000000000000000000000000000000000000..9bba4ca45acbe564122cd7defb3d6613a3f9e848 Binary files /dev/null and b/docs/images/samdino/s_18.jpg differ diff --git a/docs/samdino.html b/docs/samdino.html index 398dde7ed54f9416f10c6b800f88592a03f68652..6ff74e5f57c34b7fda639bb841ae5d3f1a254ecf 100644 --- a/docs/samdino.html +++ b/docs/samdino.html @@ -149,7 +149,7 @@ </ul> <p>Another important thing that the datasheet is telling us is that you have to keep in mind which kind of input component you are using, digital or analog: for instance, if you are using a temperature sensor (analog component) you have to connect it to an ACD (analog to digital converter) port otherwise the microcontroller isn't able to transform the information that is receiving from the sensor to a digital data.</p> - <a href=""><b></b></a> + <h1><a id="freedap"></a>SAMD11C Free Dap Programmer.</h1> @@ -158,51 +158,65 @@ <p><img src="images/samdino/s_03.jpg" width="60%"; max-width="700" /></p> - <p>Here you can see the boards already milled. IMPORTANT: remember to remove the excess copper around the USB, you could produce a short circuit. The other image with the materials prepared.</p> + <p>Here you can see the boards already milled. IMPORTANT: remember to remove the excess copper around the USB, you could produce a short circuit. The other image with the BOM prepared.</p> <span class="image main"><img src="images/samdino/s_04.jpg" alt="" /></span> + <p>Once all the components have been soldered, I have created a <a href="assignments/samdino/carcasa_samd.stl"><b>3D case</b></a> to make a better connection of the USB and I have also painted the red color for VCC and the white color for GND on the 1.27 mm SMD connectors. So when connecting flat cables there is no confusion.</p> + <p><img src="images/samdino/s_07.jpg" width="60%"; max-width="700" /></p> - - <h1><a id="programming"></a>Programming</h1> - <h2>Windows + Arduino</h2> - - <p>I follow the <a href="https://gitlab.fabcloud.org/academany/fabacademy/2020/bootcamp/spicy/blob/master/Program1614.md"><b>tutorial</b></a> that Pablo taught me that they used in the <b>Bootcamp in India</b> that <b>Santi</b> from <b>Fab Lab BCN</b> created.</p> - - <ul><li>1. For this I install Arduino. Within Arduino, in the preferences tab we will add the URL to load the Arduino IDE with other cards or microcontrollers. <a href="https://github.com/SpenceKonde/megaTinyCore"><b> Spence Konde tutorial</b></a></li></ul> - <p><img src="images/week08/week08.06.jpg" width="80%"; max-width="700" /></p> - <ul><li>2. I download <a href="https://github.com/mraardvark/pyupdi"><b>"pyupdi".</b></a> - <li>3. Open terminal. Install dependeces: <b><i>pip3 install intelhex pylint pyserial</i></b> </ul> - <p><img src="images/week08/week08.14.jpg" width="80%"; max-width="700" /></p> - <ul><li>4. I connect the USB-FTDI. - <li>5. I run <b><i>dmesg -w</i></b> - <li>6. Connect and disconet the ftdi cable and take note of the "port name" where:</ul> - <p><img src="images/week04/week04.40.jpg" width="80%"; max-width="700" /></p> - <ul><li>7. I configure the Arduino IDE for the ATtiny 1614; I configure the clock to 20MHz, the TX and RX ports and in my case the communication port with the <b>/dev/ttyUSB0</b> microcontroller.</ul> - <p><img src="images/adrianino/a_02.jpg" width="80%"; max-width="700" /></p> - <ul><li>8. Only the code is <b>compiled.</b> In the Arduino IDE dialog box, we will see where the temporary files are located.</ul> - <p><img src="images/adrianino/a_03.jpg" width="80%"; max-width="700" /></p> - <ul><li>9. We look for the <b>.hex file</b> which is the one we need, it is in a temporary folder. Once located, we copy it and paste it in the <b>pyupdi folder.</b> </ul> - <p><img src="images/adrianino/a_04.jpg" width="80%"; max-width="700" /></p> - <ul><li>10. I connect it as follows.<b> USB-Serial-FT230X + UPDI-VCC.</b></ul> - <p><img src="images/adrianino/a_05.jpg" width="60%"; max-width="700" /></p> - <ul><li>11. Go into the "pyupdi" folder. - <li>12. Program the board using python -> run <b><i>sudo python3 pyupdi.py -d tiny1614 -c /dev/ttyUSB0 -b 115200 -f Blink.ino.hex -v</i></b></ul> - - <p>In this short video you can see the process of loading the programming and the operation of a Blink on pin PA1 (8 in Arduino) where the LED is integrated. 😠</p> + <h2>Create a SAMD11C Free Dap Programmer. (Windows)</h2> - - <p><video controls width="100%"; max-width="800"><source src="images/adrianino/blink.mp4" type="video/mp4"></video></p> + <p>As I mentioned in the previous step, one of the advantages of this microcontroller is that we can turn it into a <b>programmer.</b> For this we need <a href="https://www.microchip.com/DevelopmentTools/ProductDetails/ATATMEL-ICE"><b>Atmel-ICE</b></a> or <a href="https://store.particle.io/products/particle-debugger"><b>Particle</b></a> programmer. In my case I use the Particle.</p> + + <p><img src="images/samdino/s_08.jpg" width="60%"; max-width="700" /></p> + + <p>We will connect the flat cables in the following way, from the Particle to the 10-4 converter, then with the 4-wire flat cable (in my case, 6-wire) to the future programmer.</p> + + <span class="image main"><img src="images/samdino/s_09.jpg" alt="" /></span> + + <p><b>IMPORTANT:</b> We will connect the Particle or the programmer to the computer and our Free Dap Programmer to an external power supply (that is not the same computer).</p> + + <ul><li><b>1.</b> We will download the <a href="https://github.com/ataradov/edbg"><b>EDBG,</b></a> in my case I download the <a href="https://dl.bintray.com/ataradov/edbg/master/"><b>B74 version. The version is important when executing the installation.</b></a></li></ul> + <p><img src="images/samdino/s_10.jpg" width="80%"; max-width="700" /></p> + + <ul><li><b>2.</b> Then on the <b>Fab Academy</b> page (Embedded Programming) we will find the Free Dap bootloader that we will also <a href="http://academy.cba.mit.edu/classes/embedded_programming/SWD/free_dap_d11c_mini.bin"><b>download.</b></a> </li></ul> + <p><img src="images/samdino/s_11.jpg" width="80%"; max-width="700" /></p> + <ul><li><b>3. Open terminal.</b> We execute inside the EDBG folder <b><i>edbg-b74-WINDOWS-7029fc4.exe -bpv -t samd11 -f free_dap_d11c_mini.bin </i></b> The LED of our programmer should light up and appear on our screen like the following capture.</ul> + <p><img src="images/samdino/s_12.jpg" width="80%"; max-width="700" /></p> + + <p>With this programming we get a programmer, now we can program other SAMD11C and have our own programmer or for the Fab Lab. This would be the connection, remember to feed the programmer to the computer and the future programmer to an external power source. Then we repeat the previous steps and program it.</p> + <p><img src="images/samdino/s_13.jpg" width="80%"; max-width="700" /></p> + + <h2>SAM11C with Arduino</h2> + + <p>Once we have the SAMD11C as a Free Dap programmer, we can change the bootloader so that we can program the SAMD11C through the Arduino IDE. For this we will follow the following steps. You can find more information on the <a href="https://github.com/mattairtech/ArduinoCore-samd"><b>Mattairtech Git Hub.</b></a></p> + + <ul><li><b>1.</b> We will <a href="https://github.com/mattairtech/ArduinoCore-samd/blob/master/bootloaders/zero/binaries/sam_ba_Generic_D11C14A_SAMD11C14A.bin"><b>download</b></a> the sam_ba_Generic_D11C14A bootloader.</li> + <li><b>2. Open terminal.</b> We execute inside the EDBG folder <b><i>edbg-b74-WINDOWS-7029fc4.exe -bpv -e -t samd11 -f sam_ba_Generic_D11C14A_SAMD11C14A.bin </i></b> Appear on our screen like the following capture.</ul> + <p><img src="images/samdino/s_14.jpg" width="80%"; max-width="700" /></p> + <ul><li><b>3.</b> We open the Arduino program. + <li><b>4.</b> In Preferences, we will add the URL of the additional cards that you can find <a href="https://www.mattairtech.com/software/arduino/package_MattairTech_index.json"><b>here.</b></a> We need the <a href="https://github.com/arduino/Arduino/wiki/Unofficial-list-of-3rd-party-boards-support-urls"><b>MattairTech LLC.</b></a></ul> + <p><img src="images/samdino/s_15.jpg" width="50%"; max-width="700" /></p> + <ul><li><b>5.</b> The next step is to download Generic SAMD11C in the boards manager.</ul> + <p><img src="images/samdino/s_16.jpg" width="50%"; max-width="700" /></p> + <ul><li><b>6.</b> We configure the Arduino IDE for the SAMD11C. The SAMD11C will appear in the COM port, in my case in COM 8.</ul> + <p><img src="images/samdino/s_17.jpg" width="80%"; max-width="700" /></p> + <ul><li><b>7.</b> Now load the Blink program so that the LED on pin 14 blinks. When we upload it, all this information appears in the notifications section.</ul> + <p><img src="images/samdino/s_18.jpg" width="80%"; max-width="700" /></p> + + <p>In this short video you can see the operation of a Blink on pin PA14 (14 in Arduino) where the LED is integrated. 😠</p> + + <p><video controls width="100%"; max-width="800"><source src="images/samdino/blink1.mp4" type="video/mp4"></video></p> - - <h1><a id="bom"></a>BOM and Schematic</h1> + <h1><a id="bom"></a>BOM and Schematic for Samdino</h1> <p>This is the schematic where you can see all the components.</p> @@ -319,7 +333,7 @@ <td>2,10 €</td> </tr> <tr> - <td><a href="https://www.digikey.es/product-detail/es/sullins-connector-solutions/GRPB022VWQS-RC/S9012E-02-ND/1786411"> Connector Header SMD 4POS 1.27MMr</a></td> + <td><a href="https://www.digikey.es/product-detail/es/sullins-connector-solutions/GRPB022VWQS-RC/S9012E-02-ND/1786411"> Connector Header SMD 4POS 1.27mm</a></td> <td>Digikey</td> <td>1</td> <td>0,39 €/unit</td>