Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
226 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
287 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
0 answers
57 views

MEGA2560 only starts program after pressing RESET button multiple times

I am working on a program where I am controlling an MP3 player by using UART between my MEGA2560 and the MP3 player. The MEGA2560 sends serial commands to the MP3 player when external interrupts are ...
user164324's user avatar
0 votes
1 answer
266 views

USART ISR on TXC breaking delays from <util/delay.h>?

I am trying to work out USART ISR's on the ATmega 328P. So far I have got the USART rx and tx working. I have come across a strange issue when it comes to the UART ISR's, though. The ISR seems to ...
user avatar
0 votes
1 answer
721 views

Using UDRIE0 interrupt in ATmega168

I only have some limited knowledge in interrupts. This is what I understand about following ISR functions ISR(USART_RX_vect) will get called when a new data ...
Athul's user avatar
  • 241
1 vote
2 answers
543 views

USART ISR keeps repeating 4 times

Hi, ​I'm having a problem with the USART_RX_vect interrupt of the ATMega 328p. The receiving works fine and I'm able to evaluate the sent bits (so it's not due to the baudrate) but everytime I send a ...
Ardupi de's user avatar
0 votes
0 answers
294 views

How can I echo characters from UART0 to UART1

I am looking for a good tutorial or help in working with two UART's at the same time. I have UART1 connected to a BT modem and UART0 connected to a cell modem. I want to be able to have good two way ...
Eddie's user avatar
  • 135
0 votes
1 answer
971 views

Timer causes UART problem

I have a problem, found on both ATMEGA1284P and ATMEGA2560. I have set a 16-bit timer in CTC (tried both Timer1 and Timer5) to give an interrupt every 1ms so I can increment a 32-bit volatile time ...
Johis's user avatar
  • 247
2 votes
0 answers
993 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 ...
Reidar Gjerstad's user avatar
6 votes
3 answers
10k views

How to read whole data sent to USART with interrupt?

I am currently able to read byte by byte from USART with this code ...
Zgrkpnr__'s user avatar
  • 209
3 votes
1 answer
2k views

AVR USART Random Behaviour

I seem to be getting random character in my USART output with an ATMEGA8 uart.c ...
Ankit's user avatar
  • 1,761
0 votes
1 answer
2k views

AVR Atmega8 USART and ADC and PWM

I have created 2 different PWMs using timer 1 and 2 on ATmega8, that is used to control a linear motor. I'm using a hall effect sensor to detect changes in voltage as the linear motor moves left and ...
subz's user avatar
  • 623
4 votes
3 answers
7k views

AVR ADC performance: interrupts vs. manual conversion

I have a device on ATMega16 microcontroller that is supposed to constantly send ADC measurement results over USART. The controller is operating at 16MHz with an external crystal and ADC prescaler is ...
Ashton H.'s user avatar
  • 811