diff options
| author | Sadeep Madurange <sadeep@asciimx.com> | 2025-11-02 11:45:32 +0800 |
|---|---|---|
| committer | Sadeep Madurange <sadeep@asciimx.com> | 2025-11-02 11:45:32 +0800 |
| commit | 5c9f61600f3a81de6d1750b07dd609e19af4212f (patch) | |
| tree | 9f85e275a9e3ffb6c0261bf13b0ce43dabe3c21a | |
| parent | 6c9901d88be67a1704d60c6f7fc1745b3c5817ec (diff) | |
| download | www-5c9f61600f3a81de6d1750b07dd609e19af4212f.tar.gz | |
Fix typography in Arduino Uno post.
| -rw-r--r-- | _archive/arduino-due.md | 4 | ||||
| -rw-r--r-- | _archive/arduino-uno.md | 34 | ||||
| -rw-r--r-- | _site/archive/arduino-due/index.html | 5 | ||||
| -rw-r--r-- | _site/archive/arduino-uno/index.html | 34 | ||||
| -rw-r--r-- | _site/feed.xml | 2 | ||||
| -rw-r--r-- | _site/posts.xml | 2 |
6 files changed, 38 insertions, 43 deletions
diff --git a/_archive/arduino-due.md b/_archive/arduino-due.md index 89e3d7f..648bb4b 100644 --- a/_archive/arduino-due.md +++ b/_archive/arduino-due.md @@ -59,9 +59,7 @@ OpenOCD config file and a linker script. ``` $ openocd -f openocd-due.cfg ``` - 2. Open a telnet session and check that the GPNVM1 bit is set. Otherwise - set it to 1: - + 2. Open a telnet session and set the GPNVM1 bit to 1: ``` $ telnet localhost 4444 > halt diff --git a/_archive/arduino-uno.md b/_archive/arduino-uno.md index e750304..99e3985 100644 --- a/_archive/arduino-uno.md +++ b/_archive/arduino-uno.md @@ -5,10 +5,10 @@ author: Wickramage Don Sadeep Madurange layout: post --- -This post is a step-by-step guide for wiring up ATmega328P ICs to run at 5 V -with a 16 MHz crystal and 3.3 V with an 8 MHz crystal. While the 5 V -configuration is common, the 3.3 V configuration can be advantageous in -low-power applications and when interfacing with parts that run at 3.3 V. +This post is a step-by-step guide for wiring up ATmega328P ICs to run at 5V +with a 16MHz crystal and 3.3V with an 8MHz crystal. While the 5V +configuration is common, the 3.3V configuration can be advantageous in +low-power applications and when interfacing with parts that run at 3.3V. ## 5V-16MHz configuration @@ -27,40 +27,40 @@ The steps that follow refer to the following pinout. </tr> </table> - 1. Connect pin 1 to 5 V via a 10 kΩ resistor. - 2. Connect a 16 MHz crystal oscillator across pins 9 and 10. - 3. Connect each pin of the crystal to ground via 22 pF capacitors. - 4. Connect pins 7, 20, and 21 to 5 V. + 1. Connect pin 1 to 5V via a 10kΩ resistor. + 2. Connect a 16MHz crystal oscillator across pins 9 and 10. + 3. Connect each pin of the crystal to ground via 22pF capacitors. + 4. Connect pins 7, 20, and 21 to 5V. 5. Connect pins 8 and 22 to ground. -In addition to the connections described above, it's a good idea to add 0.1 μF +In addition to the connections described above, it's a good idea to add 0.1μF decoupling capacitors between pins 7, 20, and 21 and ground. [Here's](Makefile) a sample Makefile for avr-gcc and avrdude. ## 3.3V-8MHz configuration The following steps use Arduino Uno as an ISP and Arduino utilities to program -ATmega328P's bootloader and the fuses (e.g., BOD level) for a 3.3 V supply. +ATmega328P's bootloader and the fuses (e.g., BOD level) for a 3.3V supply. 1. Upload the 'ArduinoISP' sketch to the Uno. - 2. Wire up the ATmega328P as described in the previous section. Replace the 5 V - supply with a 3.3 V supply and use an 8 MHz crystal instead of the 16 MHz + 2. Wire up the ATmega328P as described in the previous section. Replace the 5V + supply with a 3.3V supply and use an 8MHz crystal instead of the 16MHz crystal. 3. Connect the SPI ports (SCK, MISO, and MOSI) of the two MCUs. 4. Connect Uno's SS pin to the IC's pin 1 (RESET). - 5. The IC can be powered by the Arduino Uno's 5 V pin. + 5. The IC can be powered by the Arduino Uno's 5V pin. 6. Burn the bootloader to the ATmega328P: - - Select 'ATmega328P (3.3 V, 8 MHz)' from Tools > Processor. + - Select 'ATmega328P (3.3V, 8MHz)' from Tools > Processor. - Select 'Arduino as ISP' from Tools > Programmer. - Select Tools > Burn Bootloader. -The ATmega328P is now ready to run at 8 MHz with a 3.3 V power supply. You can +The ATmega328P is now ready to run at 8MHz with a 3.3V power supply. You can upload programs to the ATmega328P as you usually would using avrdude. [Here's](3v3.Makefile) a sample Makefile with adjusted parameters (e.g., baud -rate) for an 8 MHz clock. +rate) for an 8MHz clock. In both configurations, if you intend to use the ATmega328P's analog-to-digital -converter with the internal 1.1 V or AV<sub>cc</sub> voltage as reference, do +converter with the internal 1.1V or AV<sub>cc</sub> voltage as reference, do not connect AREF (pin 21) to V<sub>cc</sub>. Refer to section 23.5.2 ADC Voltage Reference in the datasheet for more information. diff --git a/_site/archive/arduino-due/index.html b/_site/archive/arduino-due/index.html index c4a0d5a..13e006e 100644 --- a/_site/archive/arduino-due/index.html +++ b/_site/archive/arduino-due/index.html @@ -97,10 +97,7 @@ OpenOCD config file and a linker script.</p> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ openocd -f openocd-due.cfg </code></pre></div> </div> </li> - <li> - <p>Open a telnet session and check that the GPNVM1 bit is set. Otherwise -set it to 1:</p> - + <li>Open a telnet session and set the GPNVM1 bit to 1: <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ telnet localhost 4444 > halt > at91sam3 gpnvm show diff --git a/_site/archive/arduino-uno/index.html b/_site/archive/arduino-uno/index.html index 0c233c5..7509267 100644 --- a/_site/archive/arduino-uno/index.html +++ b/_site/archive/arduino-uno/index.html @@ -43,10 +43,10 @@ <h2 class="center" id="title">PROGRAMMING ATMEGA328P CHIPS</h2> <h6 class="center">10 APRIL 2025</h5> <br> - <div class="twocol justify"><p>This post is a step-by-step guide for wiring up ATmega328P ICs to run at 5 V -with a 16 MHz crystal and 3.3 V with an 8 MHz crystal. While the 5 V -configuration is common, the 3.3 V configuration can be advantageous in -low-power applications and when interfacing with parts that run at 3.3 V.</p> + <div class="twocol justify"><p>This post is a step-by-step guide for wiring up ATmega328P ICs to run at 5V +with a 16MHz crystal and 3.3V with an 8MHz crystal. While the 5V +configuration is common, the 3.3V configuration can be advantageous in +low-power applications and when interfacing with parts that run at 3.3V.</p> <h2 id="5v-16mhz-configuration">5V-16MHz configuration</h2> @@ -66,46 +66,46 @@ low-power applications and when interfacing with parts that run at 3.3 V.</p> </table> <ol> - <li>Connect pin 1 to 5 V via a 10 kΩ resistor.</li> - <li>Connect a 16 MHz crystal oscillator across pins 9 and 10.</li> - <li>Connect each pin of the crystal to ground via 22 pF capacitors.</li> - <li>Connect pins 7, 20, and 21 to 5 V.</li> + <li>Connect pin 1 to 5V via a 10kΩ resistor.</li> + <li>Connect a 16MHz crystal oscillator across pins 9 and 10.</li> + <li>Connect each pin of the crystal to ground via 22pF capacitors.</li> + <li>Connect pins 7, 20, and 21 to 5V.</li> <li>Connect pins 8 and 22 to ground.</li> </ol> -<p>In addition to the connections described above, it’s a good idea to add 0.1 μF +<p>In addition to the connections described above, it’s a good idea to add 0.1μF decoupling capacitors between pins 7, 20, and 21 and ground. <a href="Makefile">Here’s</a> a sample Makefile for avr-gcc and avrdude.</p> <h2 id="33v-8mhz-configuration">3.3V-8MHz configuration</h2> <p>The following steps use Arduino Uno as an ISP and Arduino utilities to program -ATmega328P’s bootloader and the fuses (e.g., BOD level) for a 3.3 V supply.</p> +ATmega328P’s bootloader and the fuses (e.g., BOD level) for a 3.3V supply.</p> <ol> <li>Upload the ‘ArduinoISP’ sketch to the Uno.</li> - <li>Wire up the ATmega328P as described in the previous section. Replace the 5 V -supply with a 3.3 V supply and use an 8 MHz crystal instead of the 16 MHz + <li>Wire up the ATmega328P as described in the previous section. Replace the 5V +supply with a 3.3V supply and use an 8MHz crystal instead of the 16MHz crystal.</li> <li>Connect the SPI ports (SCK, MISO, and MOSI) of the two MCUs.</li> <li>Connect Uno’s SS pin to the IC’s pin 1 (RESET).</li> - <li>The IC can be powered by the Arduino Uno’s 5 V pin.</li> + <li>The IC can be powered by the Arduino Uno’s 5V pin.</li> <li>Burn the bootloader to the ATmega328P: <ul> - <li>Select ‘ATmega328P (3.3 V, 8 MHz)’ from Tools > Processor.</li> + <li>Select ‘ATmega328P (3.3V, 8MHz)’ from Tools > Processor.</li> <li>Select ‘Arduino as ISP’ from Tools > Programmer.</li> <li>Select Tools > Burn Bootloader.</li> </ul> </li> </ol> -<p>The ATmega328P is now ready to run at 8 MHz with a 3.3 V power supply. You can +<p>The ATmega328P is now ready to run at 8MHz with a 3.3V power supply. You can upload programs to the ATmega328P as you usually would using avrdude. <a href="3v3.Makefile">Here’s</a> a sample Makefile with adjusted parameters (e.g., baud -rate) for an 8 MHz clock.</p> +rate) for an 8MHz clock.</p> <p>In both configurations, if you intend to use the ATmega328P’s analog-to-digital -converter with the internal 1.1 V or AV<sub>cc</sub> voltage as reference, do +converter with the internal 1.1V or AV<sub>cc</sub> voltage as reference, do not connect AREF (pin 21) to V<sub>cc</sub>. Refer to section 23.5.2 ADC Voltage Reference in the datasheet for more information.</p> diff --git a/_site/feed.xml b/_site/feed.xml index d2dcedc..3548f7c 100644 --- a/_site/feed.xml +++ b/_site/feed.xml @@ -1 +1 @@ -<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.4.1">Jekyll</generator><link href="http://localhost:4000/feed.xml" rel="self" type="application/atom+xml" /><link href="http://localhost:4000/" rel="alternate" type="text/html" /><updated>2025-11-02T11:27:10+08:00</updated><id>http://localhost:4000/feed.xml</id><title type="html">ASCIIMX | Archive</title><author><name>Wickramage Don Sadeep Madurange</name></author><entry><title type="html">Neo4J A* search</title><link href="http://localhost:4000/archive/neo4j-a-star-search/" rel="alternate" type="text/html" title="Neo4J A* search" /><published>2025-09-14T00:00:00+08:00</published><updated>2025-09-14T00:00:00+08:00</updated><id>http://localhost:4000/archive/neo4j-a-star-search</id><author><name>Wickramage Don Sadeep Madurange</name></author><summary type="html"><![CDATA[Back in 2018, we used the Neo4J graph database to track the movement of marine vessels. We were interested in the shortest path a ship could take through a network of about 13,000 route points. Performance issues with Neo4J’s then-available shortest-path algorithms limited our search to about 4,000 route points.]]></summary></entry><entry><title type="html">My first PCB</title><link href="http://localhost:4000/archive/my-first-pcb/" rel="alternate" type="text/html" title="My first PCB" /><published>2025-07-14T00:00:00+08:00</published><updated>2025-07-14T00:00:00+08:00</updated><id>http://localhost:4000/archive/my-first-pcb</id><author><name>Wickramage Don Sadeep Madurange</name></author><summary type="html"><![CDATA[In 2023, I started tinkering with DIY electronics as a hobby. Until now, I’ve been using development boards like the Arduino Uno and ESP-32-WROOM so that I can focus on the software. Recently, I decided to step outside of my comfort zone and design a PCB from scratch for a door lock I’m working on.]]></summary></entry><entry><title type="html">MOSFETs</title><link href="http://localhost:4000/archive/mosfet-switches/" rel="alternate" type="text/html" title="MOSFETs" /><published>2025-06-22T00:00:00+08:00</published><updated>2025-06-22T00:00:00+08:00</updated><id>http://localhost:4000/archive/mosfet-switches</id><author><name>Wickramage Don Sadeep Madurange</name></author><summary type="html"><![CDATA[Recently, I needed a low-power circuit for one of my battery-operated projects. Much of the system’s power savings depended on its ability to switch off power to components, such as servos, electronically when not needed. That’s how I stumbled upon MOSFETs, transistors capable of controlling circuits operating at voltages far above their own.]]></summary></entry><entry><title type="html">Awesome books</title><link href="http://localhost:4000/archive/awesome-books/" rel="alternate" type="text/html" title="Awesome books" /><published>2025-04-20T00:00:00+08:00</published><updated>2025-04-20T00:00:00+08:00</updated><id>http://localhost:4000/archive/awesome-books</id><author><name>Wickramage Don Sadeep Madurange</name></author><summary type="html"><![CDATA[This article contains a list of my favourite books.]]></summary></entry><entry><title type="html">Programming ATmega328P chips</title><link href="http://localhost:4000/archive/arduino-uno/" rel="alternate" type="text/html" title="Programming ATmega328P chips" /><published>2025-04-10T00:00:00+08:00</published><updated>2025-04-10T00:00:00+08:00</updated><id>http://localhost:4000/archive/arduino-uno</id><author><name>Wickramage Don Sadeep Madurange</name></author><summary type="html"><![CDATA[This post is a step-by-step guide for wiring up ATmega328P ICs to run at 5 V with a 16 MHz crystal and 3.3 V with an 8 MHz crystal. While the 5 V configuration is common, the 3.3 V configuration can be advantageous in low-power applications and when interfacing with parts that run at 3.3 V.]]></summary></entry><entry><title type="html">Bare-metal ARM Cortex M3 chips</title><link href="http://localhost:4000/archive/arduino-due/" rel="alternate" type="text/html" title="Bare-metal ARM Cortex M3 chips" /><published>2024-10-05T00:00:00+08:00</published><updated>2024-10-05T00:00:00+08:00</updated><id>http://localhost:4000/archive/arduino-due</id><author><name>Wickramage Don Sadeep Madurange</name></author><summary type="html"><![CDATA[This post is about programming bare metal SAM3X8E Arm Cortex M3 chips found on Arduino Due boards. I had to learn how to do this because none of the high-level tools for programming Arduino Dues are available for OpenBSD, which I use for much of my personal computing.]]></summary></entry></feed>
\ No newline at end of file +<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.4.1">Jekyll</generator><link href="/feed.xml" rel="self" type="application/atom+xml" /><link href="/" rel="alternate" type="text/html" /><updated>2025-11-02T11:45:12+08:00</updated><id>/feed.xml</id><title type="html">ASCIIMX | Archive</title><author><name>Wickramage Don Sadeep Madurange</name></author><entry><title type="html">Neo4J A* search</title><link href="/archive/neo4j-a-star-search/" rel="alternate" type="text/html" title="Neo4J A* search" /><published>2025-09-14T00:00:00+08:00</published><updated>2025-09-14T00:00:00+08:00</updated><id>/archive/neo4j-a-star-search</id><author><name>Wickramage Don Sadeep Madurange</name></author><summary type="html"><![CDATA[Back in 2018, we used the Neo4J graph database to track the movement of marine vessels. We were interested in the shortest path a ship could take through a network of about 13,000 route points. Performance issues with Neo4J’s then-available shortest-path algorithms limited our search to about 4,000 route points.]]></summary></entry><entry><title type="html">My first PCB</title><link href="/archive/my-first-pcb/" rel="alternate" type="text/html" title="My first PCB" /><published>2025-07-14T00:00:00+08:00</published><updated>2025-07-14T00:00:00+08:00</updated><id>/archive/my-first-pcb</id><author><name>Wickramage Don Sadeep Madurange</name></author><summary type="html"><![CDATA[In 2023, I started tinkering with DIY electronics as a hobby. Until now, I’ve been using development boards like the Arduino Uno and ESP-32-WROOM so that I can focus on the software. Recently, I decided to step outside of my comfort zone and design a PCB from scratch for a door lock I’m working on.]]></summary></entry><entry><title type="html">MOSFETs</title><link href="/archive/mosfet-switches/" rel="alternate" type="text/html" title="MOSFETs" /><published>2025-06-22T00:00:00+08:00</published><updated>2025-06-22T00:00:00+08:00</updated><id>/archive/mosfet-switches</id><author><name>Wickramage Don Sadeep Madurange</name></author><summary type="html"><![CDATA[Recently, I needed a low-power circuit for one of my battery-operated projects. Much of the system’s power savings depended on its ability to switch off power to components, such as servos, electronically when not needed. That’s how I stumbled upon MOSFETs, transistors capable of controlling circuits operating at voltages far above their own.]]></summary></entry><entry><title type="html">Awesome books</title><link href="/archive/awesome-books/" rel="alternate" type="text/html" title="Awesome books" /><published>2025-04-20T00:00:00+08:00</published><updated>2025-04-20T00:00:00+08:00</updated><id>/archive/awesome-books</id><author><name>Wickramage Don Sadeep Madurange</name></author><summary type="html"><![CDATA[This article contains a list of my favourite books.]]></summary></entry><entry><title type="html">Programming ATmega328P chips</title><link href="/archive/arduino-uno/" rel="alternate" type="text/html" title="Programming ATmega328P chips" /><published>2025-04-10T00:00:00+08:00</published><updated>2025-04-10T00:00:00+08:00</updated><id>/archive/arduino-uno</id><author><name>Wickramage Don Sadeep Madurange</name></author><summary type="html"><![CDATA[This post is a step-by-step guide for wiring up ATmega328P ICs to run at 5V with a 16MHz crystal and 3.3V with an 8MHz crystal. While the 5V configuration is common, the 3.3V configuration can be advantageous in low-power applications and when interfacing with parts that run at 3.3V.]]></summary></entry><entry><title type="html">Bare-metal ARM Cortex M3 chips</title><link href="/archive/arduino-due/" rel="alternate" type="text/html" title="Bare-metal ARM Cortex M3 chips" /><published>2024-10-05T00:00:00+08:00</published><updated>2024-10-05T00:00:00+08:00</updated><id>/archive/arduino-due</id><author><name>Wickramage Don Sadeep Madurange</name></author><summary type="html"><![CDATA[This post is about programming bare metal SAM3X8E Arm Cortex M3 chips found on Arduino Due boards. I had to learn how to do this because none of the high-level tools for programming Arduino Dues are available for OpenBSD, which I use for much of my personal computing.]]></summary></entry></feed>
\ No newline at end of file diff --git a/_site/posts.xml b/_site/posts.xml index feb444a..1ecb22e 100644 --- a/_site/posts.xml +++ b/_site/posts.xml @@ -1 +1 @@ -<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.4.1">Jekyll</generator><link href="http://localhost:4000/posts.xml" rel="self" type="application/atom+xml" /><link href="http://localhost:4000/" rel="alternate" type="text/html" /><updated>2025-11-02T11:27:10+08:00</updated><id>http://localhost:4000/posts.xml</id><title type="html">ASCIIMX</title><author><name>Wickramage Don Sadeep Madurange</name></author></feed>
\ No newline at end of file +<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.4.1">Jekyll</generator><link href="/posts.xml" rel="self" type="application/atom+xml" /><link href="/" rel="alternate" type="text/html" /><updated>2025-11-02T11:45:12+08:00</updated><id>/posts.xml</id><title type="html">ASCIIMX</title><author><name>Wickramage Don Sadeep Madurange</name></author></feed>
\ No newline at end of file |
