All Projects → carlosefr → atmega

carlosefr / atmega

Licence: MIT license
Bare ATmega 8/168/328 microcontrollers with the Arduino IDE.

Projects that are alternatives of or similar to atmega

oseid
Microchip AVR based smartcard/token with ECC and RSA cryptography
Stars: ✭ 17 (-77.33%)
Mutual labels:  avr, atmega
atmega8-magnetometer-usb-mouse
ATmega8 working as USB mouse, by reading movements from a magnetometer (digital compass). [Projeto Final do curso de Bacharelado em Ciência da Computação DCC/UFRJ]
Stars: ✭ 19 (-74.67%)
Mutual labels:  avr, atmega
DigiOS
Mini OS emulator for Digispark (an Attiny85 based microcontroller).
Stars: ✭ 46 (-38.67%)
Mutual labels:  avr, arduino-ide
AVR-Programmer
Collection of AVR Programmers and Accessories
Stars: ✭ 25 (-66.67%)
Mutual labels:  avr, atmega
Bare Arduino Project
Start your Arduino projects right out of the box
Stars: ✭ 505 (+573.33%)
Mutual labels:  avr, arduino-ide
duino-coin
ᕲ Duino-Coin is a coin that can be mined with almost everything, including Arduino boards.
Stars: ✭ 626 (+734.67%)
Mutual labels:  avr, atmega
MajorCore
An Arduino hardware package for ATmega8515 and ATmega162
Stars: ✭ 32 (-57.33%)
Mutual labels:  avr, boards-manager
Arduino boards
Board definitions for SparkFun-manufactured AVR, ARM, and ESP-based Arduino boards.
Stars: ✭ 189 (+152%)
Mutual labels:  avr, arduino-ide
ariadne-bootloader
A little less unfinished TFTP bootloader for Arduino Ethernet or Arduino with Ethernet Shield
Stars: ✭ 40 (-46.67%)
Mutual labels:  avr, atmega
Arduino-GPIO
General Purpose Input/Output (GPIO) library for Arduino
Stars: ✭ 43 (-42.67%)
Mutual labels:  avr
hologram-dash-arduino-examples
Example Arduino IDE sketches for use with Arduino IDE and the Hologram Dash and Hologram Dash Pro (and similar) boards
Stars: ✭ 22 (-70.67%)
Mutual labels:  arduino-ide
TimerInterrupt
This library enables you to use Interrupt from Hardware Timers on an Arduino, such as Nano, UNO, Mega, etc. It now supports 16 ISR-based timers, while consuming only 1 hardware Timer. Timers' interval is very long (ulong millisecs). The most important feature is they're ISR-based timers. Therefore, their executions are not blocked by bad-behavin…
Stars: ✭ 76 (+1.33%)
Mutual labels:  avr
ATtiny85-TinyDFPlayer
MP3-Player
Stars: ✭ 22 (-70.67%)
Mutual labels:  avr
ArduinoXInput AVR
AVR boards package for the ArduinoXInput project
Stars: ✭ 53 (-29.33%)
Mutual labels:  arduino-ide
blockly
Otto Blockly; a fully integrated graphical programming for any type of Arduino projects, including robots, ready to install in your computer, it works offline and also online
Stars: ✭ 85 (+13.33%)
Mutual labels:  arduino-ide
Arduino-CMake-Toolchain
CMake toolchain for all Arduino compatible boards
Stars: ✭ 108 (+44%)
Mutual labels:  arduino-ide
CanFestival
No description or website provided.
Stars: ✭ 42 (-44%)
Mutual labels:  avr
ATtiny84-TinyCalibrator
OSC Calibrator and High-Voltage Fuse Resetter for 8-Pin ATtinys
Stars: ✭ 39 (-48%)
Mutual labels:  avr
sdfirm
Ultra light weight small device firmware. Well architected to support MMU, SMP, low power idle. Can be run on various CPU architectures.
Stars: ✭ 2 (-97.33%)
Mutual labels:  avr
PalatisSoftPWM
Software PWM library for Arduino
Stars: ✭ 16 (-78.67%)
Mutual labels:  avr

About

With these configuration files you can program bare ATmega microcontrollers from the Arduino IDE, without using the Arduino bootloader. It supports chips using external or internal clocks.

Skipping the Arduino bootloader means sketches start immediately after power-on, without any delay, and you have a little extra flash memory available to your programs. Using the (optional) slower internal clock options means you can save on components, but also on power (since a slower chip draws less current).

Supported Chips and Clocks

  • ATmega8/168: The chips used in early arduino boards (e.g. Arduino NG, Arduino Diecimila).
  • ATmega328p: The chips used in recent arduino boards (eg. Arduino Duemilanove, Arduino UNO).
  • ATmega168p/328: Different but functionally equivalent to the above. People sometimes buy these by mistake.

The core delay() function is not very precise for clock rates other than external 8 and 16MHz. The internal clock should provide enough precision for most cases but external 12 and 20 MHz are useful only if your code does not depend on precision timing.

Install

Open the Arduino IDE preferences window and add the following URL to the Additional Boards Manager URLs list:

Now go to Tools > Board > Boards Manager and search for Barebones ATmega Chips. Select it from the list and click Install. A new section called ATmega Microcontrollers will immediately appear in the Tools > Board menu.

ATmega

Alternatively you can create an <Arduino Sketckbook Folder>/hardware directory and git clone this repository inside it. The Arduino IDE must be restarted for this to take effect.

Programming

To program the microcontroller you will need an ISP programmer. An Arduino as ISP works just fine (don't forget to put a 10uF capacitor between the Arduino's RESET pin and GND if your're using an Arduino UNO):

Arduino as ISP

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 chip configuration for the chosen clock settings.

Note: If you're seeing weird behavior, like things not running at the speed you're expecting, check if you're updated the chip configuration with "Burn Bootloader". The configuration isn't updated automatically when you upload a sketch to the chip.

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/328 families have identical pin configurations. Check this diagram for their correspondence to Arduino pin numbering:

ATmega168/168p/328/328p

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

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.

You may also get this error if you're using an Arduino UNO as an ISP programmer and you forget to put a 10uF capacitor between its RESET and GND pins to prevent it from resetting on upload.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].