Download - Using Arduino Boards in at Mel Studio
-
7/25/2019 Using Arduino Boards in at Mel Studio
1/11
Using Arduino Boards in AtmelStudio
-
7/25/2019 Using Arduino Boards in at Mel Studio
2/11
ContentsIntroduction........................................................................................................... 3
Installing Atmel Studio and Making the First Project..............................................3
Downloading Avrdude............................................................................................ 3
hecking !M Port................................................................................................ "
!#ening the Atmel Studio and using avrdude.......................................................$
Making a Project....................................................................................................%
Programming the Arduino Board............................................................................&
'he I #ins........................................................................................................... ()
*e+erences...........................................................................................................()
-
7/25/2019 Using Arduino Boards in at Mel Studio
3/11
Introduction 'here are varieties o+ hardware tools to #rogram Atmel microcontrollers. But i+ the chi#s have ,ootloaders- the can ,e #rogrammed using serial #orts withoutneeding to use an hardware tools. Bootloader is small so+tware which gets the#rogram through the serial #ort and #rograms the I chi#.
'he microcontrollers o+ Arduino ,oards have ,oot loaders. As a result ou canconnect them to the P and use them as an A/* trainer ,oard. 'he documentteaches ou to use Arduino 'rainer ,oards in Atmel Studio.
0ou can also ,urn the ,oot loader on a new chi# and make our own trainer,oard. But to #rogram the ,oot loader onto the new chi# ou need a#rogrammer.
Installing Atmel Studio and Making the First Project 'o install Atmel Studio and make the 1rst #roject- read one o+ the +ollowingdocuments2
Assem,l Programming in Atmel Studio .4 5Ste# , ste# tutorial6
Programming in Atmel Studio .4 5Ste# , ste# tutorial6
Downloading Avrdude(. 'o #rogram Arduino ,oards ou need Avrdude . Download Avrdude +rom the
+ollowing we,site2
htt#277mirror.rackdc.com7savannah77avrdude7avrdude8$.((8Patch% ()8win34.9i#
4. Un9i# the downloaded 1le- rename the director to avrdude - and co# itinto our C drive.
NoteI+ ou alread have the Arduino ID: on our P - the avrdude.e;e 1le is located
in2
-
7/25/2019 Using Arduino Boards in at Mel Studio
4/11
Checking COM Port(. *ight click on the Computer icon and choose Manage .
4. lick on Device Manager and then Ports (COM & LPT) . heck the COM#ort.
-
7/25/2019 Using Arduino Boards in at Mel Studio
5/11
Opening the Atmel Studio and using avrdude3. !#en the Atmel Studio ID:.". >o to the Tools menu and choose External Tools .
$. In the External Tools dialog2a. Press the Add ,utton,. ?ame it Arduino Programmer .c. ' #e the +ollowing address ne;t to the Command 2
C !avrdude!avrdude"e#e
d. Avrdude needs the +ollowing arguments2 avrdude!con" 1le- the!M #ort- the serial ,aud rate- the he; 1le to ,e #rogrammed and
the microcontroller #art num,er. 'he +ollowing ta,le gives thearguments +or di@erent Arduino ,oard. 'he should ,e t #ed in the
Arguments te;t,o;2
$oard IC Chip ArgumentsArduino
%noAtmega34
=#8 2
-
7/25/2019 Using Arduino Boards in at Mel Studio
6/11
. >o to the Tools menu again. Arduino Programmer should ,e added to
the Tools menu.
-
7/25/2019 Using Arduino Boards in at Mel Studio
7/11
Making a Project%. >o to the %ile menu. lick on #e and then Pro'ect .
=. hoose CC C Executa le Pro'ect and name the #roject astogglePro'ect . 'hen #ress O* .
-
7/25/2019 Using Arduino Boards in at Mel Studio
8/11
&. hoose ATmega+,- +rom the list and #ress O* .
().' #e the +ollowing #rogram.
7E E toggleProgram.c
E E 'his #rogram toggles #orts B- - and D.
-
7/25/2019 Using Arduino Boards in at Mel Studio
9/11
E E reated2 "7374)($ "2"32$( PM E Author2 ?aimiE7
include Gavr7io.hH
de1ne F PU ( ))))))UJinclude util7dela .h
int main 5void 6K
DD*B L );FFDD* L );FF
while 5(6 77loo# +oreverK
P!*'B NL );FF 77toggle #ort BP!*' NL );FF 77toggle #ort
dela ms 5()))6 77wait ( secondO
O
Programming the Arduino $oard((. onnect our Arduino ,oard to the P .
(4.>o to the Tools menu- and click on Arduino Programmer . 'he +ollowingte;ts a##ear in the Output window and the * J:D starts ,linking on the,oard.
-
7/25/2019 Using Arduino Boards in at Mel Studio
10/11
-
7/25/2019 Using Arduino Boards in at Mel Studio
11/11
+he IC pins 'he +ollowing #icture shows the Arduino U?! ,oard together with the Atmega34=#ins.
*a,e
l
Port
A) P )5AD )6
A- P (5AD (6
A& P 45AD 46
A. P 35AD 36
A/ P "5AD "6
A' P $5AD $6
*a,el
Port
SC*
P $5AD $7SJ6
SDA
P "5AD "7SDA6
A01F
A*:F
2ND >?D-. PB$5S 6
-& PB"5MIS!6-- PB35M!SI6-) PB45! (B63 PB(5! (A64 PB)5 PD%( PD' PD$/ PD". PD35I?'(6& PD45I?')6
- PD(5' D6) PD)5* D6
0e6erenceshtt#277www.atmel.com7
htt#277www.nongnu.org7avrdude7
htt#277www.ja cons stems.com7tutorial7atmer#t(7
http://www.atmel.com/http://www.nongnu.org/avrdude/http://www.jayconsystems.com/tutorial/atmerpt1/http://www.atmel.com/http://www.nongnu.org/avrdude/http://www.jayconsystems.com/tutorial/atmerpt1/