Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

Questions tagged [avr]

AVR is a 8- and 32-bit microcontroller core developed by Atmel. AVR was chosen as microcontroller for the popular Arduino SBCs.

117 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
0answers
185 views

Why accessing the SRAM is slower with AVR XMega load instructions?

The AVR XMega has 16 GPIO registers in I/O space in addition to its internal SRAM. Interestingly the timing of LD instructions differ to these locations: Accessing the (rather large) I/O space is ...
2
votes
1answer
47 views

How to include paths for the C compiler in atmel studio?

I have a folder project and it consists of multiple folder and .c and .h files what is the best way to include them all without including the individual folders?
2
votes
1answer
68 views

Multi-tasking on an 8bit AVR -

I'm using an ATTINY816 (the new series AVRs) to manage a system that includes the following tasks: Simple audio "effect processing" (delay, pitch up, pitch down...) using internal ADC + DAC Storage ...
2
votes
0answers
70 views

Deployoing compiled program from Atmel Studio or Avr dude to Atmel “XMEGA-A3BU Xplained”

Im attempting for the last 3-4 days to connect the Atmel dev board to the computer in order to either load the .elf or hex file to the bootloader in order to turn on a LED. Im following instructions ...
2
votes
1answer
241 views

“light_ws2812” library 10x slower than required (AVR C, ATMega328p int. 8Mhz)

So I'm trying to run some SK6812 (WS2812 clones) on a standalone ATMega328p. The output signal is too slow! I define F_CPU as 8000000 (8Mhz), both in the code and in the Atmel Studio Symbols, but my ...
2
votes
0answers
585 views

Atmel XMEGA PDI Issue

I have an Xmega chip I've been using for a year and had no problems with the PDI interface programming it with the Atmel-ICE debugger/programmer. The problem is I accidentally connected the cable to ...
2
votes
1answer
196 views

How to reduce the effect of electric lighter noise on Micro controller?

I am using a kind of electric lighter in my circuit in order to turn the fire on. And also i have used some sensors that alert in danger by sending a signal to the MCU (ATmega 32) interrupt. The ...
2
votes
0answers
628 views

AVR interrupt setup seems to stop program execution

On ATMEGA168PA I have problems with interrupt-driven character reception over UART. When I include the line setup_interrupt() it seems that program execution stops ...
2
votes
0answers
5k views

How to get an ENC28J60 to work?

For starters: Yes I know I'm about to reinvent the wheel with the following task ahead. I want to create my own library for the ENC28J60 for an AVR (ATMEGA1284P). So I've been browsing the net for ...
2
votes
0answers
728 views

AVR: Usage of Force Output Compare bits

Currently I'm dealing with Tiny2313 for my project. Timer runs in CTC (WGM12) mode so OCR1A is used to set TOP of the timer. I want to use OCR1B to generate output signal. In documentation is ...
2
votes
0answers
299 views

ATtiny85, timer 1B does not work if COM1A1|COM1A0==0

I read the datasheet, and checked http://www.avrfreaks.net forum, but I cannot understand why on an ATtiny85: ...
2
votes
1answer
616 views

Arduino code compiles both on Eclipse and on AVR Studio 5, but only Eclipse version is functional

I'm trying to choose an IDE for arduino development. I installed both Eclipse and AVR Studio 5. And configured them using the instruction on the Arduino site (for Eclipse) and those two tutorials (AVR ...
1
vote
0answers
98 views

AVR - Timer0 is not firing if INT5 is enabled in EIMSK

I'm using an ATMEGA2560. Compiler: avr-gcc (AVR_8_bit_GNU_Toolchain_3.4.5_1522) 4.8.1 I have setup TIMER0 for periodic tasks: ...
1
vote
0answers
51 views

AVR SPI stops clocking if the main loop contains a delay

I have a weird issue here using an ATMega48: ...
1
vote
1answer
208 views

Regulate an RGB LED via PWM, both in brightness and in hue

I am looking to regulate programmatically an RGB LED both in terms of brightness and in terms of hue. So far I have learned that I can use PWM to do this, but I am unsure as to what the details are. I ...
1
vote
0answers
82 views

Can't manipulate array with atmega8

I am quite new to AVR programming and I am currently having some troubles with arrays. I am trying to write an Arduino code that will be run on a Atmega32u4. The goal is to communicate with a AX12-A ...
1
vote
2answers
223 views

Low-power solar cell source using capacitors

I am designing a circuit using AtTiny10 to supply a downstream microcontroller with power using only capacitors and a small solar cell. Would the following design work ? The basic idea is that the ...
1
vote
0answers
169 views

AVR ADC multiplexer odd behaviour

I noticed strange behaviour, for which I cannot find any documented confirmation. In my program I measure two ADC channels: ADC0 Internal 1.1 V bandgap reference (in order to know the value of ...
1
vote
0answers
351 views

Can UPDI Enabled AVRs be Programmed at 1.8V?

Microchip's new line of Tiny AVRs use the new UPDI programming interface. After looking at the datasheets for the ATtiny817/1617, the Atmel ICE interface document, and the internet, it's still ...
1
vote
0answers
423 views

30A Relay resets Atmega8A MCU as it engages. Are these PCB layouts to blame?

I am designing a PCB that uses an ATMega8A MCU to switch two high power relays (Songle SLA-12VDC-SL-A). I have used 2 separate approaches with the same disappointed result: the ATmega8A will reset as ...
1
vote
1answer
70 views

Consecutive PWM signals with different prescaler settings

My ATtiny85 circuit generates signals like this one on PB1 (OC0B) using fast PWM (preamble, 16 bit data, stop pulse): I have trouble with the leftmost longer pulse. At the moment i use simple ...
1
vote
0answers
347 views

ATMEGA328/ESP8266 communication works ~80% of the time

I have ATMEGA328 connnected to ESP8266 via UART. All I'm trying to do is simply send a constant value over WIFI to a simple TCP server. This is the blueprint of UART commands sent by ATMEGA328 (full ...
1
vote
1answer
118 views

Shared programming pins

Alright so there is a question that I need to ask. I am designing a PCB and I plan to include a ISP header for programming. Now one of the programming pins (PB3 - MOSI) is connected to a push button ...
1
vote
0answers
321 views

Reuse I2C SCL or SDA Pins to signal interrupt

In an I2C network, I am using an AVR microcontroller (AtMega328p) as a Master and I hooked it up to multiple sensors as Slaves, such as the TMP102, SI1145, MPU9250, among others. All of these sensors ...
1
vote
0answers
276 views

Serial Connection ATMEGA328p

I wrote up a function to connect via UART and print a string for debugging purposes. But my logic does not add up somehow... I see the line "Random Number" printed in the console but blazingly fast... ...
1
vote
1answer
267 views

AT90USBKEY as USB host

Can AT90USBKEY be used as dev. board for USB host device? What I would like to try is to use this board to check if I can send SCPI commands to some third party device via USB. And can this usb ...
1
vote
0answers
572 views

Atmel AVR XMEGA I2C/TWI max speed

I'm planning a communication bus between one ATxmega256A3U and multiple ATxmega64A3s. The challenge is that I need to use as few wires as possible, so I would like to address the slaves without a ...
1
vote
1answer
235 views

Atmel ATxmega128A identical boards - one fails to enter programming mode

I have two identical boards both equipped with ATxmega128A. I am using Atmel-ICE for programming using PDI Interface. The first board, I can read the device signature without any issues. On the ...
1
vote
0answers
484 views

atmega328p not responding to avrdude

I have this prototype pcb with an atmel avr atmega328p on it and it doesn't respond correctly to my AVRISP Mk2. From what i can tell the signature is wrong for that part. Here is the output from ...
1
vote
0answers
149 views

Problems programming a 29GL256

I've been experimenting with Python scripts and using an Teensy 2.0 ++ to program different flash memories. So far I've found a script to program a 29GL128, which works perfectly, but I'm trying to ...
1
vote
0answers
1k views

DRV8711 SPI mode

I'm facing some problems with SPI bus of DRV8711 (http://www.ti.com/lit/ds/symlink/drv8711.pdf). Repetitive reads of the same register give the same values but the communication doesn't seem reliable. ...
1
vote
0answers
1k views

PCINT0 interrupt on attiny

I'm started working with AVRs few days ago. Started with assembler and simulating in Proteus. My current goal is to enable Pin Change interrupt on PCINT0, which is PB0 on my attiny13. Right now I'm ...
1
vote
0answers
49 views

Avr file hex address overlapped problem

I am writing one microbasic codes for atmega 32 ,the program works on Proteus simulation but when i want to program it the programmer got this error: file hex address overlapped problem So the Codes ...
1
vote
0answers
133 views

High voltage and low voltage sensing via the same pin

I am trying to put together a high-voltage programmer for AVR, which involves applying 12V to the target's nRESET in an otherwise 5V system. However, I also want to use nRESET for presence sensing ...
1
vote
0answers
154 views

Very high frequency out of SPI pin in ATmega16A

I was trying to interface ATmega16A with ENC28J60, and I was facing problems with it, so I decided to physically look at the signals b/w the master µC and the Ethernet chip using an oscilloscope. But ...
1
vote
0answers
114 views

DAC via I2C: detect error conditions

We are using a MAX517 DAC-device as slave and an ATmega8535 controller as master. Communication errors can be readily detected by comparing (TWSR & 0xF8) with 0x08 for Start, 0x18 for address ...
1
vote
0answers
632 views

Mystery while driving a NeoPixel Ring (WS2812) with a GEMMA (ATtiny85)

I am working with an Adafruit GEMMA and NeoPixel Ring 16 LEDs (ATtiny85 and 16 WS2812 leds) and trying to get a program to light the LEDs according to my "pattern" structure below, representing R, G, ...
1
vote
0answers
2k views

Can AVR ISP mkII programmer be used in Mac OS?

I'm trying to program an ATmega644A. It works fine from Linux, but when I try the same project with the same programmer, an Olimex AVR ISP mkII, I get the following error: ...
1
vote
0answers
2k views

XMega waveform generation with DMA and USART

I'm using an Atmel XMEGA128A4U. I need to generate a high speed digital waveform with minimal CPU overhead, and have set up a USART to output the waveform and DMA to transfer data from a table to the ...
1
vote
0answers
392 views

Error reading characters over serial on ATmega8 using CVAVR (USART)

I am trying to program ATmega8 for testing purposes using CVAVR as cross compiler and avrdude GUI as burner. Though I am able to burn the program, I think I am missing something in the coding part. It ...
1
vote
0answers
7k views

How to get rid of “Invalid opcode 0x002A at PC=0x004” in ISIS Proteus?

I have used ATmega 8 and have simulated a circuit to use interrupts, when i give an external interrupt i.e. when a push button is pressed all the LEDs connected to PORTB supposed to be lit up, but i ...
1
vote
0answers
417 views

Why there is no respond on rs232 port

We are working on communication between AVR and a Crous PTZ. We can see some details about Crous communication ports on page 15 of its guide : We found Crous protocol doc (Got it here) and now we ...
1
vote
1answer
2k views

ATXMega32D4 Two Wire Interface

Lately i have been using ATMega32A and ATMega324PA and learnt various coding techniques in AVR C programming. One such code i wrote is avr_twi.c for communicating with an I2C accelerometer Now i got ...
1
vote
1answer
2k views

Proper configuration of a PWM fan which should be stopped when the controller power is cut off

Recently I am working on a controller to drive a PWM fan (datasheet). I am using a atmega32u4 and it sends a 25khz PWM signal to the fan and it's working well. I want the fan to be off when I cut the ...
1
vote
2answers
3k views

ATMega32 USBasp not programming

I use no Arduino just trying to program a simple ATMega32 using USBASP. Getting this message: ...
0
votes
2answers
18 views

What is IDC connector pitch on a USBAsp?

I am planning to use a USBASP programmer to program one of my boards, and I want to use a fitting receptacle on my board. I fail to find the exact pitch that the USBAsp's IDC connector has (as I ...
0
votes
0answers
30 views

How to connect an SPI angular sensor (AVAGO AEAT-9000-1GSH0) with RS485 transceivers to an AVR microprocessor?

I need to connect an AVAGO AEAT-9000-1GSH0 angular sensor to an ATMEGA32U4 processor. I designed two versions: one using IC-s, one using resistors. I do not now witch of my two designs is better (or ...
0
votes
0answers
32 views

Timer/Counter Compare match event fired on next clock tick

I'm using ATmega2560's timer-counter3 to count external pulses. I need to switch some output pin to logical 1, wait for some amount of input pulses at T3 pin and then immediately disable output. I've ...
0
votes
1answer
31 views

What does _SFR_IO8(0x04) is doing? AVR

I'm trying to write a program in assembly to toggle the on-board LED of the Arduino MEGA2560 in assembly. To do so I just have to indicate the direction of the pin (13 in this case which is PB7) as ...
0
votes
0answers
26 views

Help With ATMega32 Fuses

I decided I wanted to learn Atmel Studio to be able to work with all their microcontrollers problem being i'm trying to use a brand new ATMega32 with default fuse settings and an external crystal ...