Difference between revisions of "Programming Arduino"
(Created page with " ===Loading Arduino bootloader=== It is possible to use the AVRISP program for Arduino to act as a programmer, in order to load the bootloader program onto an Atmel AVR micro-...") |
|||
Line 4: | Line 4: | ||
===Uploading sketches=== | ===Uploading sketches=== | ||
+ | ====To a USB-capable Arduino==== | ||
Arduino boards with built-in USB-to-TTL serial converters are easy to program. One just selects the corresponding serial port in the "Tools>>Serial Port" menu item, preferring "tty." over "cu." in Mac/*nix systems. | Arduino boards with built-in USB-to-TTL serial converters are easy to program. One just selects the corresponding serial port in the "Tools>>Serial Port" menu item, preferring "tty." over "cu." in Mac/*nix systems. | ||
− | + | ====To a USB-less Arduino==== | |
Arduino boards without USB, such as the Mini Arduino Pro, include pins to attach to ground, TX, RX and DTR pins of a serial port or USB-to-TTL adapter. USB-to-TTL adapters may also supply the working voltage. | Arduino boards without USB, such as the Mini Arduino Pro, include pins to attach to ground, TX, RX and DTR pins of a serial port or USB-to-TTL adapter. USB-to-TTL adapters may also supply the working voltage. | ||
− | + | ====To a breadboard Arduino via UART==== | |
Breadboard Arduinos, in other words, Arduinos made by hand around an AVR micro-controller with a bootloader, may be programmed by connecting their TX, RX, and reset pins to the RX, TX, and DTR pins of a serial port.<ref>http://www.yuriystoys.com/2012/02/arduino-on-beadboard-uploading-your.html</ref> | Breadboard Arduinos, in other words, Arduinos made by hand around an AVR micro-controller with a bootloader, may be programmed by connecting their TX, RX, and reset pins to the RX, TX, and DTR pins of a serial port.<ref>http://www.yuriystoys.com/2012/02/arduino-on-beadboard-uploading-your.html</ref> | ||
One can also use an Arduino as a USB-to-TTL adapter if the AVR micro-controller is removable, as in the Arduino Uno.<ref>http://www.yuriystoys.com/2012/02/arduino-on-beadboard-uploading-your.html</ref> | One can also use an Arduino as a USB-to-TTL adapter if the AVR micro-controller is removable, as in the Arduino Uno.<ref>http://www.yuriystoys.com/2012/02/arduino-on-beadboard-uploading-your.html</ref> | ||
+ | ====To a breadboard Arduino via ICSP==== | ||
+ | One can skip using the bootloader, freeing the space that would be used by the bootloader, by uploading a sketch through the SPI interface, using an intermediary programmer like the AVR-ISP or the Arduino-as-ISP.<ref>http://arduino.cc/en/Hacking/Programmer</ref> | ||
==References== | ==References== | ||
<references /> | <references /> | ||
[[Category:Electronics]] | [[Category:Electronics]] |
Revision as of 09:10, 26 March 2014
Contents
Loading Arduino bootloader
It is possible to use the AVRISP program for Arduino to act as a programmer, in order to load the bootloader program onto an Atmel AVR micro-controller. An intermediary Arduino takes serial communications from a computer and sends to the target micro-controller the necessary signals via SPI pins and a reset pin.
Uploading sketches
To a USB-capable Arduino
Arduino boards with built-in USB-to-TTL serial converters are easy to program. One just selects the corresponding serial port in the "Tools>>Serial Port" menu item, preferring "tty." over "cu." in Mac/*nix systems.
To a USB-less Arduino
Arduino boards without USB, such as the Mini Arduino Pro, include pins to attach to ground, TX, RX and DTR pins of a serial port or USB-to-TTL adapter. USB-to-TTL adapters may also supply the working voltage.
To a breadboard Arduino via UART
Breadboard Arduinos, in other words, Arduinos made by hand around an AVR micro-controller with a bootloader, may be programmed by connecting their TX, RX, and reset pins to the RX, TX, and DTR pins of a serial port.[1]
One can also use an Arduino as a USB-to-TTL adapter if the AVR micro-controller is removable, as in the Arduino Uno.[2]
To a breadboard Arduino via ICSP
One can skip using the bootloader, freeing the space that would be used by the bootloader, by uploading a sketch through the SPI interface, using an intermediary programmer like the AVR-ISP or the Arduino-as-ISP.[3]