Skip to main content

All Questions

Tagged with
1 vote
1 answer
66 views

Cannot stop Microcontroller's Hardware Timer from running

I'm using an Atmel ATMega8 microcontroller to control a stepper motor. (Datasheet). Timer1 (a 16-bit hardware counter) is used in CTC mode to modulate an IO pin to provide the stepping signal to the ...
Wossname's user avatar
  • 657
0 votes
1 answer
52 views

How to make a circuit which can give divided voltage to ADC and can send a trigger pulse to INT0 when I press a button?

I connected 4 buttons to the ADC module of AVR-ATMega328p with different resistor values, To know which button is pressed this ...
in.yssh's user avatar
  • 45
0 votes
1 answer
111 views

AVR32 goes to unrecoverable exception when exiting interrupt routine

I'm using an ATUC128D3 microcontroller and have 5 switches connected to it. I have the GPIO interrupt configured to trigger on a falling edge and this works just fine. It enters the interrupt and the ...
Alex Jegers's user avatar
1 vote
1 answer
768 views

Simple AVR interrupts in C - How to cleanly stop and restart "INT0"?

I'm trying to use an ATTiny84's INT0 pin to detect a falling edge event on a 1 kHz signal. What is the correct way to temporarily halt this interrupt INT0, and then resuming it at a later time, ...
user882326721's user avatar
0 votes
1 answer
299 views

Faster Timer0 overflow than 2 ms on Attiny85

I'm trying to get a Timer0 overflow with an overflow every 500us, but can't find a solution to get it so low. I'm running the Attiny85 on its internal 1 MHz clock, so I know it is not gonna be the ...
jonas's user avatar
  • 309
0 votes
1 answer
72 views

Problem or misunderstand of ADATE bit on ATTiny45

I have 2 buttons connected to pulled-down ADC input. I want to trigger ISR(SIG_ADC) when ADC finishes conversion - this is working. If I start ADC using ...
filimonic's user avatar
  • 209
0 votes
1 answer
212 views

UART doesn't transmit all characters when using UDREn interrupt

Note: I am beginner :) MCU: Atemega328p In Method 1, I am using a UDRn data register empty interrupt once the transmit buffer is empty and inputting characters from ...
user13174343's user avatar
1 vote
2 answers
261 views

Does this interrupt improve performance even with while loop in ISR?

Note: I am a beginner :) MCU: Atmega328p Which program below burdens the CPU the least? Would it be a significant difference? Objective: to make a more "efficient" serial monitor by ...
user13174343's user avatar
0 votes
1 answer
222 views

Error Real Time Clock implementation AVR microcontroller

I want to create a real-time clock using ATmega328p microcontroller. The microcontroller's frequency is 1 MHz. So, I think I should use timer interrupts in CTC mode to generate interrupt every second. ...
manueld4722623's user avatar
-3 votes
3 answers
673 views

How to write own ISR handler [closed]

I am learning about AVR programming and I know we have to use avr/interrupt.h library to use interrupts. However, my main reason to learn AVR programming is to program without any library so I want to ...
Syed M Erdum Adnan's user avatar
3 votes
0 answers
418 views

ISR won't modify a global variable (IAR)?

First, some background on what I'm working on. I have a custom board with ATmega324A that I designed as part of a project I'm working on. Originally, software for the uC was written for GCC in Atmel ...
0xd4v3's user avatar
  • 109
0 votes
0 answers
118 views

AVR Interrupt: LED kept blinking and won't stop

Lately I realize I am still a newbie, when you can't blink a freaking LED properly. It's kinda sad. I try to simplify this LED code to the simplest form possible, and it still won't work properly. ...
user avatar
1 vote
1 answer
588 views

Where is Interrupt Vector Table stored in ATmega32A?

Given that Atmega32A has three types of memory : 1) SRAM. 2) Flash (Program memory). 3)EEPROM. In which section the Interrupt Vector Table is stored ?
Mohamed Atef's user avatar
0 votes
2 answers
115 views

AVR MCU Interrupt toggle a LED problem with 100 extra toggle

I am playing around with an AVR MCU. I am having trouble toggling a LED. It's being toggled faster than I have expected. It should be toggling at 500hz, but it's up to 600hz and not very stable. I ...
user avatar
0 votes
1 answer
160 views

in AVR, if i use .ORG 0 with the main program , where is the interrupt vector table and .INCLUDE file data go?

I am studying AVR from the book "the AVR microcontroller and Embedded system by Mohamed mazidi" and "atmega32A data sheet" in the book, it puts samples of cade which start like this ...
mr.Arrow's user avatar

15 30 50 per page
1
2 3 4 5
9