Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosefr committed Jun 12, 2016
1 parent 4d1797d commit 36e84ef
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@ Skipping the Arduino bootloader means sketches start immediately after power-on,
Install
=======

Add https://raw.githubusercontent.com/carlosefr/atmega/master/package_carlosefr_atmega_index.json in the Arduino IDE Preferences under `File > Preferences` for the setting `Additional Boards Manager URLs`
Go to the **Preferences** window and add the folloing URL to the `Additional Boards Manager URLs` list:

And then install via `Tools > Board > Boards Manager`.
* `https://raw.githubusercontent.com/carlosefr/atmega/master/package_carlosefr_atmega_index.json`

The chip definitions are now available to be installed from the **Boards Manager**. Search for `Barebones ATmega Chips` in `Tools > Boards > Boards Manager`, select it and click `Install`.

![ATmega](https://raw.githubusercontent.com/carlosefr/atmega/master/atmega_addon.png)

Programming
===========
Expand All @@ -19,27 +23,31 @@ To program the microcontroller you will need an ISP programmer. An [Arduino as I

![Arduino as ISP](http://arduino.cc/en/uploads/Tutorial/SimpleBreadboardAVR.png)

Choose your ISP programmer in the `Tools > Programmer` menu. Then choose your ATmega microcontroller from `Tools > Board` and your choice of clock source and clock frequency from `Tools > Clock`.
Choose your ISP programmer in the `Tools > Programmer` menu. Then choose your ATmega microcontroller family from `Tools > Board`, the specific chip you have from `Tools > Processor` and your choice of clock frequency and source from `Tools > Clock`.

To set the ATmega configuration fuses, use the `Tools > Burn Bootloader` menu item. This doesn't actually burn an Arduino bootloader onto the chip, it only sets the fuses for the chosen clock settings.
To set the ATmega configuration fuses, use the `Tools > Burn Bootloader` menu item. This doesn't actually burn an Arduino bootloader onto the chip, it only sets the chip configuration for the chosen clock settings.

To load programs into the microcontroller, use the `Sketch > Upload with Programmer` menu entry. The IDE will upload the code using the selected ISP programmer.
To load programs into the microcontroller, use the `Upload` button as usual. You can also use the `Sketch > Upload with Programmer` menu entry. Both will make the IDE upload the code using the selected ISP programmer.

Pin Mapping
===========

The ATmega168(p) and ATmega328(p) have identical pin configurations. Check [this diagram](http://arduino.cc/en/Hacking/PinMapping168) for their correspondence to Arduino pin numbering:
The ATmega168/328 families have identical pin configurations. Check [this diagram](http://arduino.cc/en/Hacking/PinMapping168) for their correspondence to Arduino pin numbering:

![ATmega168/168p/328/328p](http://arduino.cc/en/uploads/Hacking/Atmega168PinMap2.png)
![ATmega168/168p/328/328p](https://raw.githubusercontent.com/carlosefr/atmega/master/atmega328p.png)

The pin layout for the ATmega8 is also identical to these, but additional functions may be missing (eg. PWM on the left-side pins).

Arduino IDE Versions
====================

These configuration files are meant for Arduino IDE 1.6 or later. If you're still using version 1.0 of the IDE, you'll need to get the [ide-1.0.x](https://github.com/carlosefr/atmega/releases/tag/ide-1.0.x) release instead (Does not include 8/168p/328).
These configuration files are meant for Arduino IDE 1.6 or later. If you're still using version 1.0 of the IDE, you'll need to get the [ide-1.0.x](https://github.com/carlosefr/atmega/releases/tag/ide-1.0.x) release instead (only the ATmega168 and 328p are supported).

Tips and Caveats
================

If you're using an ATmega chip that already has the Arduino bootloader inside or has otherwise been configured to require an external clock source, you may get an `avrdude: Yikes! Invalid device signature.` error. In this case, connect an appropriate external clock source to it (most likely 16 MHz) and try again. Once the ATmega has been configured to use its internal clock source, you can remove the external one and the error shouldn't happen again.

The core `delay()` function is not very precise for clock rates other than external 8 and 16MHz. The internal clock is not so bad but external 12 and 20MHz drift very noticeably. If this is a problem for you code, beware.

The ATmega168p and ATmega328 chip variants supported by this addon were never used in Arduino boards, if you're wondering.
Binary file added atmega328.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added atmega_addon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 36e84ef

Please sign in to comment.