Tagged Questions

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)

0
votes
0answers
19 views

Atmega 168A fuse programming

I'm currently programming over an Atmega 168A micro controller through a USB Tiny programmer and an ISP interface. The micro controller is set up with an external oscillator and an external person ...
2
votes
2answers
114 views
+50

MOSFET PWM switch jamming on - why?

The circuit presented here is sized to switch 100W at a minimum pulse width matching 250Hz. But actually it's currently only being asked to switch around 10-20W. The load is an array of LEDs. Q1 ...
2
votes
1answer
50 views

AVR USART wait for AVR's reponse to continue text stream

AVR USART wait for AVR's reponse to continue protocol I am doing a senior project, and I need to send a large text file line by line to an AVR (atmega32) which will control a piano using ~36 ...
0
votes
1answer
25 views

Problem initializing 4-bit mode LCD(DEM 20486 SBH-PW-N)

I've got an ATMEGA16 with a LCD display DEM 20486 SBH-PW-N (datasheet) connected to port C like so C0 - RS C1 - RW C2 - E C3 - not Set C4 - D4 C5 - D5 C6 - D6 C7 - D7 D0-D3 are grounded I ...
0
votes
0answers
23 views

Programming ATMega2560 using USBasp

I own an USBasp programmer and have experience programming the ATMega16A microcontroller using the same.Also,I use WinAVR and a makefile to generate the .hex file. A new project demands the usage of ...
0
votes
1answer
29 views

Can't read/write to/from the atmega328p

I cant communicate with the Atmega328p. I've flashed fuses low: 0x59, high: 0xD9 and changed wiring. Now I've connected 16Mhz crystal to the XTAL1, XTAL2 pins, and 2x22pF to the crystal. But I can't ...
0
votes
1answer
68 views

Can I use an electrolytic capacitor on UCAP?

I have a small board based on the ATmega32u4, which I'm assembling. I only have electrolytic capacitors in 1uF value sitting around. Can I use an electrolytic cap from UVCC to ground, instead of a ...
1
vote
1answer
67 views

ATMEGA328P SPI MMC/SDIO

I want to connect an ATMEGA328P to a mobile phone, a Samsung Galaxy S3 to interface some data. I need to use the microSD port behind the battery cover for this purpose, so here is the question, Is it ...
1
vote
0answers
44 views

BH1750FVI with I2C won't work

I have the led driver of Adafruit connected to my atmega32. I adjusted their library for the Arduino, so now I just need a µcontroller and not an Arduino. This thing works. Now I want to control the ...
0
votes
0answers
7 views

16 bit PWM on a mega [migrated]

I have two Arduinos, a nano and a mega. I want to output 16 bit PWM, but can seem to only get it working on the nano. I'm adapting the code from this website: ...
2
votes
2answers
329 views

Best method to transfer two int percentage values over a CAN bus

I have two integers: int A is a value from -100 until 0 and int B is a value from 0 to 100 What is the most effective way to put this into a CAN message and decode it again at the other ...
2
votes
2answers
52 views

Register Syntax question

I was reading some code to use an on an arduino ATMEGA328P and I can't figure out what this line of code does. ASSR &= ~(_BV(EXCLK) | _BV(AS2)); I know that ...
0
votes
1answer
74 views

Arduino (ATmega328) In circuit programming?

I am designing a circuit/software for some guy.. I am using a Atmega328 surface mounted micro in the design and am just supplying the schematic and code. He is going to build it (make a PCB) and use ...
0
votes
1answer
36 views

nrf24l01+ works on channel 10 but not channel 82?

Setup is nrf24l01+ with 328p running internal oscillator at 8Mhz. I have been using it like this for a while with no problems at channel 10, but now want to change to a higher channel such as 82, but ...
0
votes
0answers
17 views

about IR sensor RP6 V2 IC3

I try to use the IR sensor that with RP6 V2 and. I don't know that sensor belong witch port? I mean receiver and the light sensor to send the light to measure or find the obstacle belong witch ...
0
votes
1answer
21 views

Finding pulse period for output compare on ATmega128 (10-bit fast PWM)

Ok, so I have ATmega128 board. I have clock of 16MHz with a prescaler of 8 (2MHz). I am using fast 10-bit PWM to generate a waveform with a top value of 1023. Given a number, the value put in OCR1A ...
0
votes
2answers
31 views

Need help with pushbutton on atmega8

This is what I have: Atmega 8 wired for programming, confirmed working, programmer is my power supply. 2 leds connected via 470Ohm pull up reisistors to ports PORTB0, PORTB1 and to GROUND, working. ...
0
votes
1answer
70 views

ATmega8 LED blinking project not working properly

I am making a simple project using ATmega8 microchip. I uploaded this code to the AVR: ...
1
vote
3answers
145 views

May I power atmega32a-pu microcontroller from AA batteries?

I need to provide +-4.5V to the microcontroller. That would be fine by having 4x rechargable batteries, but how is it with current? On each AA battery is written min.2550mAh. I am not sure but I think ...
0
votes
2answers
85 views

Arduino as ISP programming the Arduino, not the connected ATmega328P

I am trying to program an ATmega328P with an Arduino Uno R3. When I click 'Upload to Programmer' in the Arduino IDE (version 1.0.5), the Arduino programs itself and not the chip. Stranger still, the ...
0
votes
1answer
25 views

ATmega128 output compare normal mode. Generating a waveform with ISR

So here are specifications: -prescaler of 8 -Channel A -pulse_width is determined by user defined degrees (converted to clock ticks) -pulse_period is 40000 clock ticks (20ms) -Normal mode -Timer3 So ...
1
vote
2answers
99 views

Tie Arduino - ATMEGA328P reset pin directly to +5V?

I would like to know if it's okay to tie the reset pin on an ATMEGA328P directly to +5V without using a resistor to avoid random resets and lower part count. If it's not okay, can you explain why it's ...
0
votes
2answers
31 views

Bitbang ATMega-328PU with CT210x using avrdude

I have made a breadboard-arduino with an ATMega-328PU and the standard components taking help from http://arduino.cc/en/Main/Standalone I interfaced the CT2102 Breakout Board with this assembly: DTR ...
1
vote
1answer
32 views

AVR SPI2X has no effect

I've got an ATMega88A configured to run on internal 8MHz clock: lfuse = 0xE2 hfuse = 0xDF efuse = 0x01 F_CPU defined as 8000000 This in confirmed in the 'real ...
3
votes
3answers
175 views

AVR SRAM limitation

I'm just an enthusiast looking for some advice. I'd like to use a microcontroller to read frames from a camera and write those frames to a small LCD screen. The camera and screen are on the same SPI ...
1
vote
1answer
42 views

ATmega 23K256 SPI RAM and ISP together

I want to connect 23K256 SPI RAM to ATmega. Do ISP programming will work together with SPI RAM connected. Thanks.
6
votes
1answer
61 views

Millis versus centis on AVR platform

I am building a device on the AVR platform. The device will need some timing information, so I was thinking of reimplementing Arduino millis-like functionality ...
1
vote
1answer
75 views

One PWM timer to two outputs?

first post here, so sorry for any bad styling. I'm working on a group project and using an Atmega328, without going into specifics, I need to drive two fans, two servos, and 1 CTC based function from ...
2
votes
1answer
66 views

ATmega328A UART: everything working, but not as expected

I am trying to get UART working via the ATmega328A. I want to enter a character, and get that character to be printed out. However, when my code is run this is what happens: I enter one character, ...
2
votes
0answers
88 views

AVR program code location

I'm working with an ATmega328P and I wanted to interface with the flash memory writing data to it with the macros provided by avr-libc. This is the memory map for my chip: I don't understand where ...
0
votes
1answer
90 views

Writing flash on ATmega328

I have struggled to understand this code but I can't understand the little endian for loop. Why is it necessary? And how could I read the page back? One byte at a time as an array? Is it even ...
1
vote
1answer
100 views

SPI not working, ATmega328 only sending 1 byte

I am trying to get SPI working on an ATmega328. This is my code: ...
0
votes
1answer
46 views

Single Phase Energy Meter using Atmega32

Version 1 : We are trying to measure the input voltage from the AC mains (which theoretically should be 230 V). The circuit to measure this is a simple resistor divider network as shown below. The ...
1
vote
1answer
28 views

How to drain power with pins for led matrix on atmega32 instead of using a led driver

I want to make a led driver without the tlc594 series. I use the atmega32 of which I can use 1 PWM pin. The PWM pin will be connected to the base of the transistors. With the PWM pulse I can dim the ...
0
votes
1answer
53 views

How does this construct drive the RESET pin low?

I've seen this in a bunch of ATMega / Arduino reference designs: The RESET pin is pulled up high with R10, pulled low with a switch (S1), but then tied to the DTR line from a UART breakout via C27 ...
0
votes
3answers
139 views

2 Digit 7 Segment Display Driver

I need to display the temperature acquired by my LM35 on a 2 digit 7 segment display. What I have is LTD383-R2 Common Anode Display. Datasheet here. The display has 1 Anode pin + 14 Cathode pins for ...
0
votes
0answers
80 views

I2C interfacing with ATmega32 and ArduinoMega2560 failed

I'm trying out I2C interfacing the ATmega32 with Arduino Mega2560 Board without success. The Arduino Board is configured to be the Master Read. The Atmega32 is configured to be the Slave Write. I ...
1
vote
1answer
58 views

Update ATmega168 program with serial

I'm working with an ATmega168 with a Linux based board (TI DM365). The ATmgea168 communicates with the TI over UART. The Atmel is programmed using AVRMKII and is running fine. I was wondering if ...
2
votes
1answer
135 views

AVR simple bootloader - how to call application code?

I am using the atmega328. I want to create a simple test application using a bootloader. I want to: Blink an led at one speed in the bootloader section of flash, and then blink at another speed in ...
1
vote
1answer
76 views

ATmega328P not responding

All of the sudden my ATmega328P stopped responding to flash commands with avrdude. Here is the output of the attempt: ...
0
votes
0answers
82 views

SPI always returns null while reading

We need some help in SPI protocol. We've been using an AVR microcontroller ATMega324PA (DIP) and an ADXL344 accelerometer (QFN Breakout). Both chip operates at 1.8V and supports I2C & SPI. Lately ...
3
votes
2answers
244 views

How to get the PWM frequency and duration of each pulse?

I have an ATmega8 and I started working on servo motor HS-645MG. What frequency works with the HS-645MG? How do I get the frequency of PWM and the duration/length of each pulse? Is there a ...
1
vote
1answer
43 views

Read strings from ATmega or Arduino

I have found out that one can disassemble an ATmega with objdump or avrdude. And if the LB1 and LB2 bits are set low it would be much harder. So if these bits are set high or just reading the flash is ...
0
votes
1answer
29 views

Set LB1 and LB2 low on Arduino and ATmega

I have searched for a possibility to objdump microcontrollers. I then have found this post. There it says that LB1 and LB2 can be set to low to prevent the most people to read from it. My questions ...
0
votes
1answer
83 views

ATmega 328P SMD version

Currently I am using the normal ATmega328P chip with my barebone Arduino I have made. I am planning to switch it with an SMD version of ATmega328P, since it's smaller in size it will consume less ...
6
votes
5answers
608 views

EEPROM endurance in energy meter?

I am designing an energy meter for electricity billing purposes by converting an analogue energy meter and counting the number of pulses given by the analogue meter's LED. Since power may be cut off ...
0
votes
1answer
61 views

How to get 32u4 arduino to ignore DTR for USB Serial?

32u4 based "USB Serial Ports" refuse to send data to the PC unless DTR on the PC software side is set to high. If the PC software does not set DTR to true (high?), then Serial.print() on Arduino goes ...
0
votes
0answers
53 views

AT86RF212b connections

I'm trying to communicate at86rf212b with atmega328 , I have connected all SPI connections( MISO, MOSI, SCk, SS), IRQ, SLP_TR and RST with suitable 5v/3.3v conversion (74hc4050) and trying to read ...
0
votes
0answers
52 views

AVR TWI/I2C Not Responding

I use Twi module of AVR Atmega168 to talk to DS1307. ...
-3
votes
1answer
66 views

Controlling brushless motor using ATmega16 [closed]

How can I control a brushless motor using an ATmega16? My motor is of 1600kv and ESC of 30A. I'm giving the 2 sec delay for motor ON and OFF but it's not working.