ATMega is a family in the AVR series of Atmel microcontrollers. This is the main microcontroller of the Arduino prototyping platform. Please Specify the specific part number in your question.

learn more… | top users | synonyms (3)

5
votes
3answers
64 views

Does CKDIV8 save battery life when programmed?

On ATmega328P there is a CKDIV8 fuse bit that when programmed divides clock by 8. I'm wondering if the power consumption is equal on these two setups: micro with 8MHz external crystal and CKDIV8 ...
1
vote
0answers
28 views

Atmega32 can't verify after setting correct fuses for external crystal. HELP

I am having trouble with some Atmega32A's purchased off from eBay. The MCU's does not seem to be fake as they are functioning properly. I am experiencig the following problem: I want to use external ...
2
votes
3answers
63 views

Crystal or Crystal Oscillator for time sensitive device

A device that I'm working on is controlled by ATmega328P microcontroller. This will be some sort of a watch, therefore I want it to be as precise as possible. For instance if left to run for a whole ...
0
votes
1answer
23 views

ATmega8 to MCP23S17 SPI I/O Expander not working

Since three days I'm having the problem that I can not talk to my MCP23S17 SPI I/O Expander from my ATmega8. I've double ...
0
votes
2answers
48 views

Phototelectric smoke sensor with microcontroller

I am trying to connect a photoelectric smoke sensor with Atmega328. The smoke sensor IC has pin 7 as the I/O pin which gives a 9V when smoke is detected. I have connected this pin to the input pin of ...
0
votes
2answers
48 views

Connect an ATmega328 to a Raspberry Pi

I've been stuck on this problem for a couple of months now and haven't had much luck finding the exact information that I need. So, I'm currently working on a project to make a handheld raspberry pi, ...
0
votes
0answers
49 views

Uploading bootloader on ATmega328P SMT package using Arduino Uno [migrated]

I have been trying to upload bootloader on ATmega328P SMT package on a custom PCB using Arduino Uno as ISP, I was quite successful. I have Googled a lot and have tried numerous ways, sometimes I was ...
1
vote
0answers
29 views

Programming Atmega8 with AVRISP mkII Error ispProgramMem

If I go to Tools > Device Programming in AVRStudio 6.0 to program the Atmega8 everything is working fine. I've set the ISP frequency to 1 MHz and checked the ...
4
votes
3answers
331 views

Do I need a Reset Switch?

I'm trying to make a ATmega328 run on a breadboard. I am stuck on deciding if I need a reset switch. Do I need one? Can I just unplug and plug in the battery instead? If I do need one, how would I ...
0
votes
1answer
44 views

Controlling AC devices using ATmega8

I have an microcontroller ATmega8, TRIAC MOC3083 and thyristor M166P. I need to develop and device which will turn on/off lamp(220V). But while I'm developing I don't want work with AC 220V now, DC ...
0
votes
4answers
85 views

Is it possible to power AVR micro project with just one coin cell battery?

My current project setup is: ATmega328P micro with 32 LEDS driven by 4 8-bit shift registers. System without LEDs draws 20mA of current continuously. With all LEDs lit at the same time, it draws ...
0
votes
2answers
64 views

Calculating how many times TIMER1 will overflow

I'm trying to understand how to set up an overflow interrupt on ATmega328 TIMER1 to measure a frequency. I'm feeding pin PD4, which is where TIMER1 is externally clocked, with a 503kHz square wave ...
1
vote
4answers
84 views

Blink LED example does not work

I'm trying to run standard Blink LED example on Atmega8A, but my LED doesn't blink. Here is my circuit: And here is my code: ...
1
vote
1answer
38 views

Input interrupt pin associated with TIMER1 on ATmega168

A few days ago I came across the source-code for this ATmega168 based Inductance Meter from Dan's Workshop Blog. Below is the code that I believe sets up an ATmega168 interrupt to measure an external ...
0
votes
1answer
29 views

How to put these together and do I need a PWM expander?

I'm having here an Atmega8 a PSM42BYGHW603 stepper motor the L298 stepper motor driver ...
1
vote
2answers
135 views

Removable MCU for a PCB

I am trying to make my first PCB, an would like to program an ATmega328P-PU using my Arduino and a breadboard and transfer it to my printed circuit board. My problem is that either I will make a ...
0
votes
1answer
30 views

Microchip 23LC1024 driver for Atmel XMega

Is there driver or any example code available for 23LC1024 SRAM memory implemented with Atmel XMega or mega-series microcontroller?
1
vote
2answers
178 views

What's the deal with a bootloader?

I am planning to buy an ATmega328 chip from Atmel, place it in my Arduino board, program it, detach it later, then solder onto a PCB. Can I just buy the chip and program it on the Arduino board, or ...
0
votes
4answers
237 views

Powering an ATmega328 chip

I am trying to make a printed circuit board for a robot. I would like to make this look as neat as possible, and I would like to have the peripherals like the sensors and other stuff, and the ...
0
votes
3answers
68 views

ATmega8 USB programmer

I bought this USB programmer: USBasp USBISP 3.3V / 5V AVR Programmer USB ATMEGA8 . But I can't understand how to connect it. This picture has got 9 circle inputs and 1 square input but all the ...
0
votes
0answers
4 views

Computer not detecting my Arduino MEGA 2560 R3 [migrated]

I've tried different USB cables, computers, ports and none of them can detect my possibly bricked Mega 2560 R3. Nothing shows up at all in the Device Manager, not even "Unknown Device". When the ...
0
votes
1answer
103 views

Can I loop two GPIO pins on an Arduino/ATmega328?

I'm playing around with some wheel encoder sensors and an Arduino. The sensor needs a bit of debouncing, so that got me wondering how the microcontroller core is seeing the input. That is, what does ...
1
vote
1answer
55 views

ATmega128 Extended I/O

This is my fist time working with a "bigger" micro controller, ATmega128. So far I've worked with ATmega328, ATmega8 etc. Reading through the datasheet, I didn't understand couple of points That ...
0
votes
1answer
57 views

Inform microcontroller that the analogue circuit is powered up

Basically, I want to pull-down the microcontroller pin if some analogue circuit is powered up. The analogue circuit power is 9V, 1.6A. The idea I have is to use something like IRLZ24N MOSFET, connect ...
1
vote
3answers
240 views

Why usb to serial port converter can’t program avr microcontroller?

With a serial port or parallel port in pc programming avr microcontroller is very easy and cheap. Problem is, no modern computer come with serial or parallel port. So, usb to serial converter should ...
0
votes
0answers
101 views

USBasp: Why can I program ATtiny13A but not Atmega8A?

I am using USBasp V 2.0 LC Technology with slow SCK jumper connected. The firmware is not updated. I don’t know if I need to update the firmware. I have successfully programmed ATtiny13A, though ...
0
votes
1answer
21 views

How to check the source of reset in ATMEGA644p

I am trying to find the source of reset for ATMEGA644p, but I couldn't find the way to do it! MCUCSR gives error in atmel studio as not declared and the datasheet also doesn't have it.
2
votes
1answer
112 views

Has anyone programmed ATmega8A using USBasp?

I have failed to program ATmega8A using USBasp. I am sure that the wiring is ok. I have programmed an ATtiny13A several times with the same USBasp. However, no luck with the ATmega8A. This is the ...
1
vote
1answer
39 views

Understand Atmega168P Datasheet

I am in the process of reading through the above mentioned doc from here. In page-21, second paragraph in section 8.5 I/O Memory, line 6 is given as below: ...
3
votes
1answer
472 views

Understanding this statement in ATmega328P's datasheet

While reading ATmega328P's datasheet, I came across the following statement. The Port X output buffers have symmetrical drive characteristics with both high sink and source capability. What does ...
0
votes
0answers
78 views

One-shot sound button/trigger for Arduino Sound Player

I've succeeded in making a simple Arduino ATMega328 sound player on my breadboard following this guide. . . http://highlowtech.org/?p=1963 http://playground.arduino.cc/Code/PCMAudio But, here's my ...
3
votes
3answers
162 views

Why Atmega328P has no PortA

This is a general question regarding Atmega328P. While I was reading the datasheet of Atmega328P, I see that it has Ports B, C, and D. So, I'm surprised to see that there is no PortA. Is there a ...
0
votes
1answer
98 views

Read DS2401 with ATmega 32 and a 1-Wire protocol

DS2401 is a 64-bit ROM memory that used as a hardware-serial-number. [Datasheet : here] It has only two pin. One of them is ground and one of them is Data/Power pin. So for communicate with this chip ...
4
votes
1answer
101 views

AVR ATMega I/O pin overcurrent protection

I want protect I/O pin against overcurrent to make circuit more robust. Atmel's AVR040: EMC Design Considerations discusses internal overvoltage protection in General I/O Pin Protection paragraph. But ...
0
votes
1answer
123 views

Current draw at digital output pin differences in two equally coded segments -probable cause?

I measured the current output of an Arduino Duemilanove (with an ATmega168) in two cases and found out that the currents differ strongly. The following code creates an output of 72mA at pin 13 ...
1
vote
1answer
61 views

Simulate DS2401 with ATmega32?

I have a DS2401 and an ATmega32. I can read the its contents with my AVR micro-controller. I want to know, Is it possible to simulate the DS2401 with my ATmega32? I mean is it possible to connect ...
0
votes
3answers
422 views

Can I do without I²C pull-up resistors?

I am trying to produce a small circuit, and I am looking to reduce the part count. I recently added an I²C EEPROM which is used once when the system boots up, along with this EEPROM I added two ...
7
votes
2answers
398 views

What to do with unused analog inputs?

I am working on an application using ATmega328p atmel microcontroller. I started with the 28 PDIP version, but now I want to use the 32 TQFP, which I noticed has 2 extra inputs after compiling my ...
1
vote
1answer
76 views

AVR Embedded Webserver + Time

I have the task of implementing an embedded webserver (using ATMega328). Broadly, the system would provide the following functionality Allow user to change system parameters using the web interface ...
2
votes
2answers
91 views

Interrupt Management - Large AVR Projects

This is for the more experienced one's out there. I am currently involved with a large AVR project (using ATMega328) and it's getting confusing with respect to interrupts. The project involves ...
3
votes
2answers
178 views

How to turn on ATmega every 6 hours?

My board which is made with atmega operates on battery, it should turn on every 6 hours and log some data, then go back to deep sleep to save battery consumption. I use atmega32 and not atiny because ...
1
vote
1answer
61 views

AVR bootloader restarts on interrupt

For a quite while, I've been using an avr ATmega324PA controller and Atmel studio to write the programs. we wrote a TCP bootloader. It works fine without any interrupt. Later we did add an external ...
1
vote
2answers
94 views

Is the value of XTAL load capacitors for ATmega328p @ 16MHz critical?

I'm going to try to assemble an MCU-based circuit using an ATmega328P-PU (Arduino UNO stripped down to essential parts as in this tutorial). I've skimmed over a lot of posts on EE.SE about load ...
1
vote
1answer
75 views

AVR USART Garbage Data

I have been having issues with my AVR USART. Using a PL2303 USB adapter with the following connections to the AVR What I am seeing is Garbage data (mostly of 0xFF or 0xF7 or 0xE7) even when the ...
1
vote
0answers
48 views

Why am I getting verification errors with avrude?

I am constantly getting verification errors with avrdude and atmega168. I googled a lot, but everyone is getting them at first byte, whereas I am getting them at random bytes: ...
0
votes
0answers
53 views

AVR SPI Loopback test

I would like to do a loopback test on my ATMega328 to ensure that the code I am writing (while learning SPI) is working fine. To do this I would place a jumper between the MOSI and MISO pins. What ...
1
vote
3answers
64 views

Can I switch between two analog references to read signals with different ranges with the ATmega328P?

I want to read two voltages of different ranges with an ATmega328P ADC with the highest resolution possible: The 1st signal varies from 0 to 1V. It's the output of an LM35DZ Temperature Sensor. I ...
2
votes
2answers
188 views

ATmega328P running on CR2032 has issues with timing/sleep code as voltage depreciates over time

I have an ATmega328P running at 16 Mhz on CR2032 with a few sensors and radio for about a week now. It started out at 3+ Volts and is currently measuring at 2.96 Volts. At present, I am not using ...
0
votes
0answers
82 views

How can I tell that USBasp is working?

I have the USBasp programer and I'm trying to burn bootloader on Atmega328 so that it can be used as a replacement chip in Arduino board (replacement chips with the bootloader installed are quite ...
3
votes
2answers
157 views

Watchdog timer issue - AVR ATmega324PA

I was using ATmega32A before and now I am migrating to ATmega324PA just to enhance power management. Now I am testing the new controller in every aspect. This is a simple code to check the watchdog ...