<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: SUNG CHUL</title>
    <description>The latest articles on DEV Community by SUNG CHUL (@tony_cha).</description>
    <link>https://dev.to/tony_cha</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1002785%2F83da1a3a-6ee4-467b-ab69-6a5695b1c2e9.png</url>
      <title>DEV Community: SUNG CHUL</title>
      <link>https://dev.to/tony_cha</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tony_cha"/>
    <language>en</language>
    <item>
      <title>Pattern Shift</title>
      <dc:creator>SUNG CHUL</dc:creator>
      <pubDate>Mon, 13 Feb 2023 06:08:35 +0000</pubDate>
      <link>https://dev.to/tony_cha/pattern-shift-2896</link>
      <guid>https://dev.to/tony_cha/pattern-shift-2896</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#include &amp;lt;avr/io.h&amp;gt;
#define F_CPU 16000000L
#include &amp;lt;util/delay.h&amp;gt;
#include &amp;lt;avr/interrupt.h&amp;gt;

volatile int button_state = 0;

ISR(INT0_vect)
{
    button_state = (button_state + 1) % 2;
}

char up_pattern(char pattern)
{
    return((pattern &amp;lt;&amp;lt; 1) | (pattern &amp;gt;&amp;gt; 7));
}

char down_pattern(char pattern)
{
    return((pattern &amp;gt;&amp;gt; 1) | (pattern &amp;lt;&amp;lt; 7));
}

void INIT_INT0(void)
{
    EIMSK |= 1 &amp;lt;&amp;lt; INT0;
    EICRA |= 1 &amp;lt;&amp;lt; ISC01;
    sei();
}

int main(void)
{
    DDRB = 0xFF;
    DDRD = 0x00;                   

    INIT_INT0();

    char pattern = 0x01;
    PORTB = pattern;

    while (1) 
    {
        if(button_state == 1) 
            pattern = up_pattern(pattern);

        else 
            pattern = down_pattern(pattern);


        PORTB = pattern;
        _delay_ms(150);
    }
    return 0;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>Pull up Pull down</title>
      <dc:creator>SUNG CHUL</dc:creator>
      <pubDate>Sat, 11 Feb 2023 02:48:27 +0000</pubDate>
      <link>https://dev.to/tony_cha/pull-up-pull-down-4om0</link>
      <guid>https://dev.to/tony_cha/pull-up-pull-down-4om0</guid>
      <description>&lt;p&gt;When swith turned off, Input gain 1 on pull up system.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffno4yv840ad6ku22rrl7.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffno4yv840ad6ku22rrl7.JPG" alt="Pull UP_0" width="800" height="1000"&gt;&lt;/a&gt;&lt;br&gt;
When swith turned on, Input gain 0 on pull up system.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm5qnc3zf5dfehhyyar6y.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm5qnc3zf5dfehhyyar6y.JPG" alt="Pull UP_1" width="800" height="1000"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;How to make Pull UP system&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffpngn1yu1gosh5nnii2y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffpngn1yu1gosh5nnii2y.png" alt="Pull UP" width="700" height="504"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When swith turned off, Input gain 0 on pull down system.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxzocfl1lkyemamfmcrcq.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxzocfl1lkyemamfmcrcq.JPG" alt="Pull DOWN_0" width="800" height="804"&gt;&lt;/a&gt;&lt;br&gt;
When swith turned on, Input gain 1 on pull down system.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F94qfimsaxn7gv4r8y75j.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F94qfimsaxn7gv4r8y75j.JPG" alt="Pull DOWN_1" width="800" height="805"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;How to make Pull DOWN system&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F239ye0ut334o62qtzsuy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F239ye0ut334o62qtzsuy.png" alt="Pull DOWN" width="800" height="581"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>gratitude</category>
    </item>
    <item>
      <title>Blink an LED v.2</title>
      <dc:creator>SUNG CHUL</dc:creator>
      <pubDate>Mon, 09 Jan 2023 07:00:31 +0000</pubDate>
      <link>https://dev.to/tony_cha/blink-an-led-v2-3bm4</link>
      <guid>https://dev.to/tony_cha/blink-an-led-v2-3bm4</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#define F_CPU 16000000L
#include &amp;lt;avr/io.h&amp;gt;
#include &amp;lt;util/delay.h&amp;gt;


int main(void)
{
    DDRB |= 0x0F;   // xxxx1111

    PORTB = 0x01;
    while (1)
    {   
        while (PORTB != 0x08) {
            _delay_ms(500);
            PORTB = PORTB &amp;lt;&amp;lt; 1;
        }

        while (PORTB != 0x01) {
            _delay_ms(500);
            PORTB = PORTB &amp;gt;&amp;gt; 1;
        }       
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyhq1m4hj6op9lm1svvy6.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyhq1m4hj6op9lm1svvy6.jpg" alt="Image description" width="800" height="246"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Easy&lt;/p&gt;

</description>
      <category>career</category>
      <category>productivity</category>
      <category>watercooler</category>
    </item>
    <item>
      <title>Blink an LED</title>
      <dc:creator>SUNG CHUL</dc:creator>
      <pubDate>Mon, 09 Jan 2023 06:43:45 +0000</pubDate>
      <link>https://dev.to/tony_cha/blink-an-led-3g86</link>
      <guid>https://dev.to/tony_cha/blink-an-led-3g86</guid>
      <description>&lt;p&gt;My code&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#define F_CPU 16000000L
#include &amp;lt;avr/io.h&amp;gt;
#include &amp;lt;util/delay.h&amp;gt;

int main(void)
{
    DDRB |= 0x0F;   // xxxx1111

    PORTB = 0x01;
    while (1)
    {   
        _delay_ms(500);

        PORTB = PORTB &amp;lt;&amp;lt; 1;
        if(PORTB == 0x10)
            PORTB = 0x01;
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;chatGPT's code&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#include &amp;lt;avr/io.h&amp;gt;
#include &amp;lt;util/delay.h&amp;gt;

#define LED_PIN PB0

DDRB |= (1 &amp;lt;&amp;lt; LED_PIN);
int main(void){
    while (1) {
        PORTB |= (1 &amp;lt;&amp;lt; LED_PIN);  // turn the LED on
        _delay_ms(500);  // delay for 500 milliseconds
        PORTB &amp;amp;= ~(1 &amp;lt;&amp;lt; LED_PIN);  // turn the LED off
        _delay_ms(500);  // delay for 500 milliseconds
    }
    return 0;
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--nDxxa-6D--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ja0af09vsuosi50rvxub.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nDxxa-6D--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ja0af09vsuosi50rvxub.jpg" alt="Image description" width="880" height="231"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Easy&lt;/p&gt;

</description>
      <category>microcontroller</category>
      <category>atmega128</category>
      <category>chatgpt</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Advice from ChatGPT</title>
      <dc:creator>SUNG CHUL</dc:creator>
      <pubDate>Fri, 06 Jan 2023 05:49:31 +0000</pubDate>
      <link>https://dev.to/tony_cha/advice-from-chatgpt-105n</link>
      <guid>https://dev.to/tony_cha/advice-from-chatgpt-105n</guid>
      <description>&lt;p&gt;I studied about ATmega128 last semester. I want to know more about it so I borrowed the kit from professor `(&lt;em&gt;&amp;gt;﹏&amp;lt;&lt;/em&gt;)′ but don't know what can I do. So I asked to ChatGPT and this is its(?) his(?) answer.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffhmyao9dmfxw7bl3dov8.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffhmyao9dmfxw7bl3dov8.jpg" alt="Image description" width="800" height="682"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>emptystring</category>
    </item>
    <item>
      <title>I'm a student from ROK.</title>
      <dc:creator>SUNG CHUL</dc:creator>
      <pubDate>Fri, 06 Jan 2023 05:44:01 +0000</pubDate>
      <link>https://dev.to/tony_cha/im-a-student-from-rok-5cj3</link>
      <guid>https://dev.to/tony_cha/im-a-student-from-rok-5cj3</guid>
      <description>&lt;p&gt;I'm student and I don't know what to do now so I'm writing this. This will end when my vacation is over.&lt;/p&gt;

</description>
      <category>beginners</category>
    </item>
  </channel>
</rss>
