Getting started with Arduino UNO

From MCS Wiki
(Difference between revisions)
Jump to: navigation, search
 
(14 intermediate revisions by one user not shown)
Line 1: Line 1:
== Procedure<br/> ==
+
== Procedure for Getting started with Arduino UNO <span style="color:#ff0000">R3</span><br/> ==
  
#Download Arduino Software&nbsp;&nbsp;&nbsp;
+
#Download Arduino Software (which includes the USB driver for Arduino UNO and AVRDUDE)
 
#[http://arduino.cc/en/main/software http://arduino.cc/en/main/software]
 
#[http://arduino.cc/en/main/software http://arduino.cc/en/main/software]
 
#Create an folder Arduino e.g. C:\arduino-1.0.3
 
#Create an folder Arduino e.g. C:\arduino-1.0.3
Line 7: Line 7:
 
#The drivers can be found under C:\arduino-1.0.3\drivers&nbsp;&nbsp;&nbsp;&nbsp; ('''not '''the FTDI USB Drivers)
 
#The drivers can be found under C:\arduino-1.0.3\drivers&nbsp;&nbsp;&nbsp;&nbsp; ('''not '''the FTDI USB Drivers)
 
#If the Arduino UNO was already connected then use following help [http://arduino.cc/en/Guide/UnoDriversWindowsXP http://arduino.cc/en/Guide/UnoDriversWindowsXP] which is similar to Windows7 or Windows8 procedure.
 
#If the Arduino UNO was already connected then use following help [http://arduino.cc/en/Guide/UnoDriversWindowsXP http://arduino.cc/en/Guide/UnoDriversWindowsXP] which is similar to Windows7 or Windows8 procedure.
#[http://avrhelp.mcselec.com/arduino.htm?zoom_highlightsub=arduino http://avrhelp.mcselec.com/arduino.htm?zoom_highlightsub=arduino]
+
#AVRDUDE can be found in folder:&nbsp; C:\arduino-1.0.3\hardware\tools\avr\bin
 +
#Configure the programmer in Bascom-AVR OPTIONS >>>> Programmer
 +
#Select: External programmer
 +
#Select: Hex
 +
#Under Program: select the path to AVRDUDE.exe&nbsp;&nbsp; -->&nbsp; C:\arduino-1.0.3\hardware\tools\avr\bin\avrdude.exe
 +
#Under Parameter use:&nbsp;&nbsp; -v -F -C c:\arduino-1.0.3\hardware\tools\avr\etc\avrdude.conf -p m328p -P '''<span style="color:#0000ff">com8</span>''' -c <span style="color:#008000">arduino </span>-b 115200 -Uflash:w:{FILE}:a
 +
#Change the <span style="color:#0000ff">comX </span>port to the COM port of your Arduino UNO
 +
#The avrdude.conf file can be found here: c:\arduino-1.0.3\hardware\tools\avr\etc\
 +
#When you want to use an Arduino UNO (not R3) then you need to change <span style="color:#008000">arduino </span>to <span style="color:#008000">stk500</span> (not tested info)
  
[[Category:Projects]]
+
 
 +
 
 +
[[File:Arduino uno ext programmer.PNG|border|center|600x600px|Arduino uno ext programmer.PNG]]
 +
 
 +
 
 +
 
 +
== Easy Example Code<br/> ==
 +
 
 +
Source code for Hello World program:
 +
 
 +
<br/><source lang="bascomavr">
 +
$regfile = "m328pdef.dat"
 +
$crystal = 16000000 '16MHz
 +
$hwstack = 60
 +
$swstack = 60
 +
$framesize = 60
 +
 
 +
Config Com1 = 57600 , Synchrone = 0 , Parity = None , Stopbits = 1 , Databits = 8 , Clockpol = 0
 +
 
 +
 
 +
Do
 +
 
 +
Print "Hello World"
 +
Waitms 1000
 +
 
 +
Loop
 +
 
 +
 
 +
End 'end program
 +
</source>
 +
 
 +
== Use Program Chip (F4) for download in Bascom-AVR<br/> ==
 +
 
 +
== Terminal Output of Example:<br/> ==
 +
 
 +
<span style="color:#0000ff">Hello World<br/>Hello World<br/>Hello World<br/>Hello World<br/>Hello World<br/>Hello World<br/>Hello World<br/>Hello World<br/>Hello World<br/>Hello World</span>
 +
 
 +
== Used Versions<br/> ==
 +
 
 +
Bascom-AVR 2.0.7.6
 +
 
 +
Windows8
 +
 
 +
== Author<br/> ==
 +
 
 +
MAK3
 +
 
 +
[[Category:Arduino Ethernet with Bascom-AVR]]

Latest revision as of 10:48, 9 March 2013

Contents

Procedure for Getting started with Arduino UNO R3

  1. Download Arduino Software (which includes the USB driver for Arduino UNO and AVRDUDE)
  2. http://arduino.cc/en/main/software
  3. Create an folder Arduino e.g. C:\arduino-1.0.3
  4. Copy the Arduino files into C:\arduino-1.0.3
  5. The drivers can be found under C:\arduino-1.0.3\drivers     (not the FTDI USB Drivers)
  6. If the Arduino UNO was already connected then use following help http://arduino.cc/en/Guide/UnoDriversWindowsXP which is similar to Windows7 or Windows8 procedure.
  7. AVRDUDE can be found in folder:  C:\arduino-1.0.3\hardware\tools\avr\bin
  8. Configure the programmer in Bascom-AVR OPTIONS >>>> Programmer
  9. Select: External programmer
  10. Select: Hex
  11. Under Program: select the path to AVRDUDE.exe   -->  C:\arduino-1.0.3\hardware\tools\avr\bin\avrdude.exe
  12. Under Parameter use:   -v -F -C c:\arduino-1.0.3\hardware\tools\avr\etc\avrdude.conf -p m328p -P com8 -c arduino -b 115200 -Uflash:w:{FILE}:a
  13. Change the comX port to the COM port of your Arduino UNO
  14. The avrdude.conf file can be found here: c:\arduino-1.0.3\hardware\tools\avr\etc\
  15. When you want to use an Arduino UNO (not R3) then you need to change arduino to stk500 (not tested info)


Arduino uno ext programmer.PNG


Easy Example Code

Source code for Hello World program:


$regfile = "m328pdef.dat"
$crystal = 16000000 '16MHz
$hwstack = 60
$swstack = 60
$framesize = 60
 
Config Com1 = 57600 , Synchrone = 0 , Parity = None , Stopbits = 1 , Databits = 8 , Clockpol = 0
 
 
Do
 
 Print "Hello World"
 Waitms 1000
 
Loop
 
 
End 'end program

Use Program Chip (F4) for download in Bascom-AVR

Terminal Output of Example:

Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World

Used Versions

Bascom-AVR 2.0.7.6

Windows8

Author

MAK3

Personal tools
Namespaces
Variants
Actions
Navigation
Language