avatarJ3

Free AI web copilot to create summaries, insights and extended knowledge, download it at here

1784

Abstract

eadmedium.com/v2/resize:fit:800/1d5ahl-VVemQRm18fj1gXpA.png"><figcaption></figcaption></figure><p id="18c7">Step#<b>06</b>→Copy/paste this code;</p><div id="e612"><pre><span class="hljs-meta">#<span class="hljs-keyword">include</span> <span class="hljs-string"><avr/io.h></span>int </span> <span class="hljs-built_in">main</span>(<span class="hljs-type">void</span>) { <span class="hljs-comment">/ PORTB Data Register - DS pg 92 /</span> DDRB |= (<span class="hljs-number">1</span><<DDB5); <span class="hljs-comment">/ just turns pin 5 of Port B on forever /</span> <span class="hljs-keyword">while</span> (<span class="hljs-number">1</span>) { <span class="hljs-comment">/ Set Pin 5 high */</span> PORTB |= (<span class="hljs-number">1</span><<PORTB5); } }</pre></div><figure id="a814"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*XES73L5Ulo0IwSUw9jNhzw.png"><figcaption></figcaption></figure><p id="0a77">Step#<b>07</b>→Go to menu <b><i>Build > Build Solution</i></b> (or press<b><i> F7</i></b>) and compile the code; you’ll see…</p><figure id="84ad"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*NkT9HQAW48KTQwpiWfs5sQ.png"><figcaption></figcaption></figure><div id="6411"><pre>Build succeeded.</pre></div><div id="aaf0"><pre><span class="hljs-section">==== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ====</span></pre></div><p id="c9f8">Step#<b>08</b>→Finally <b><i>Tools > Send to Arduino UNO </i></b>and the code will be loaded into your Arduino UNO …</p><figure id="1e10"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*CYhrRxpSaBG4RWxTmJ9o_g.png"><figcaption></figcaption></figure><p id="4c82">and there you have it!</p><p id="157f">In the next post we will Introduce <b><i>AVR

Options

LibC</i></b> functions . Our goal is to work with IO, ADC, TIMERS, PWM, EEPROM and much more on Arduino… you never seen nothing like this serie on net!</p><p id="8ae9">So stay tuned!</p><p id="ab46"><a href="https://github.com/giljr/avr/tree/master/atmel">Atmel Code base Github</a></p><h2 id="67bc">References & Credits</h2><p id="09ea">Follow along with the entire ‘Getting Started with AVR’ series: <a href="https://www.youtube.com/redirect?event=video_description&amp;v=gLrMgKGZtHg&amp;q=http%3A%2F%2Fbit.ly%2FGettingStartedwithAVR&amp;redir_token=7jbgaQLTZaAq1GzO5JFmMEIPaBt8MTUyNzk1Nzg0NUAxNTI3ODcxNDQ1">http://bit.ly/GettingStartedwithAVR</a></p><h2 id="1b3e">→Goto Episode#02</h2><p id="2413">Complete Serie:</p><p id="8f40"><a href="https://readmedium.com/atmel-studio-7-uno-ep-00-969b9cc3cf7b">#<b>00</b> HowTo-Load-Into-Arduino-AS7</a></p><p id="7cce"><a href="https://readmedium.com/atmel-studio-7-uno-serie-9508c1e89ace">#01_Hello-World</a></p><p id="12ad"><a href="https://readmedium.com/atmel-studio-7-uno-episode-02-42a006338c3c">#02_Presents-AVR-Freaks</a></p><p id="8af6"><a href="https://readmedium.com/atmel-studio-7-uno-serie-ep-03-9882f3c246ed">#03_Pressing-Button</a></p><p id="d400"><a href="https://readmedium.com/atmel-studio-7-uno-episode-04-92967d0f4d79">#04_Pin-Change-Interrup</a></p><p id="341e"><a href="https://readmedium.com/atmel-studio-7-uno-serie-episode-05-9ae1543f7b86">#05_Battery-Driven-App</a></p><p id="92aa"><a href="https://readmedium.com/timer-counter-w-atmel-studio-7-uno-serie-episode-06-6dfda5a8c7c3">#06_Timer Counter</a></p><p id="babe"><a href="https://readmedium.com/compare-mode-w-atmel-studio-7-uno-episode-07-129ee964689b">#07_Compare Mode</a></p><p id="4222">#08</p><p id="d027">#09</p><p id="b0df">#10</p></article></body>

Hello-World w/ Atmel Studio 7 & UNO Serie (Episode#01)

We need to pave our road first…

Run Episode#00 first!

Our goal is to work with IO, ADC, TIMERS, PWM, EEPROM and much more on Arduino inside AS7… you never seen nothing like this serie on net!

After guaranteeing to record via USB in an arduino (via Ep # zero) we will enter our Hello World!

Let’s get Started!

Atmel Studio 7 & Arduino UNO

ATMEL STUDIO 7 Project

This is a HELLO WORLD ARDUINO UNO + ATMEL STUDIO 7! We’re gonna turn on led on pin 5 of the Arduino B port. Nothing special uh…;b

We need to know the simple first...

Let’s get started!

Step#01→ Go to Episode#00 and make Arduino works in Atmel Studio 7;)

Step#02→Close and open a new project; name it Arduino_AVR_Ep_01;

Step#03→Choose GCC C Executable Project (C/C++);

Step#04→Now Select ATmega328p as device;

Step#05→A barebone code will be created as below;

Step#06→Copy/paste this code;

#include <avr/io.h>int 
main(void)
{
/* PORTB Data Register - DS pg 92 */
DDRB |= (1<<DDB5);
/* just turns pin 5 of Port B on forever */
while (1)
{
/* Set Pin 5 high */
PORTB |= (1<<PORTB5);
}
}

Step#07→Go to menu Build > Build Solution (or press F7) and compile the code; you’ll see…

Build succeeded.
==== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ====

Step#08→Finally Tools > Send to Arduino UNO and the code will be loaded into your Arduino UNO …

and there you have it!

In the next post we will Introduce AVR LibC functions . Our goal is to work with IO, ADC, TIMERS, PWM, EEPROM and much more on Arduino… you never seen nothing like this serie on net!

So stay tuned!

Atmel Code base Github

References & Credits

Follow along with the entire ‘Getting Started with AVR’ series: http://bit.ly/GettingStartedwithAVR

→Goto Episode#02

Complete Serie:

#00 HowTo-Load-Into-Arduino-AS7

#01_Hello-World

#02_Presents-AVR-Freaks

#03_Pressing-Button

#04_Pin-Change-Interrup

#05_Battery-Driven-App

#06_Timer Counter

#07_Compare Mode

#08

#09

#10

Recommended from ReadMedium