All Questions
203
questions
0
votes
2
answers
143
views
AVR ATmega328P if statement wrongly executed after reset
I have simplified the listing to bare minimum where I can still observe this behaviour.
When this program is running, it works as expected. Button press causes LED to show up.
The problem exist on ...
0
votes
1
answer
134
views
Why is nothing happening on my CLKOUT pin, despite the RTC working fine? [closed]
I apologize for the (probably) trivial question -- I'm just starting to get back into coding for MCUs after a long hiatus, so please be patient with me.
I'll preface this by acknowledging that there ...
0
votes
0
answers
251
views
ESP32 UART TX slow response rate
I`m having issue with UART communication between AVR and ESP32. Issue is with TX response rate.
Here is what I`m sending with AVR, first 2 bytes are command, last 3 are data:
...
6
votes
7
answers
3k
views
Why is a register initialised through bitwise operations instead of a binary string?
I'm learning microcontrollers, and have picked AVRs to start with. In many AVR tutorials I find the registers are initialised by performing some bitwise operations on the assignment, for example ...
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 ...
2
votes
1
answer
375
views
What does LSB mean in PWM?
I have this PWM exam preparation question in Computer Engineering where it says "What is one V_LSB?". However we've discussed nothing about LSB in the PWM section.
What does it means?
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, ...
1
vote
2
answers
248
views
AVR-libc `uart_putchar` implementation
In AVR-libc page 143 the implementation of the function uart_putchar() is typical as the following:
...
0
votes
2
answers
147
views
How many times can a register bit be changed in AVR?
I am writing a program for an ATmega328P.
I have a while loop inside which I am enabling the UART receiver complete interrupt flag using the command ...
0
votes
1
answer
279
views
Making duty cycle with CTC mode in AVR without using interrupt
I am writing a program to make an output with a 30% duty cycle and a frequency of 3 kHz using an ATmega32 microcontroller. My controller's frequency is 8 MHz and I am going to decrease it to 1 MHz by ...
1
vote
0
answers
263
views
Writing an Array to EEPROM Problem
When I write an array to EEPROM and read it I always get 0xFF.
I am writing in addres 0x0001 to 0x0005.
The password I am entering is 1,1,1,1,1 saved in uint8 array ...
0
votes
1
answer
530
views
RTC with ATmega32 and DS1307 showing the year completely wrong
I'm building a clock/calendar with an ATmega, a DS1307, and a 20*4 LCD (LM044L).
I have implemented the code showing the time correctly, I have initialized the RTC too, but for some reason when I try ...
0
votes
1
answer
114
views
Unnexpected Behaviour From Software UART On ATtiny84A AVR
I am trying to implement a software UART for the ATtiny84A, as it does not come with a UART out of the box.
The following is an example of the UART TX:
...
0
votes
2
answers
140
views
`sizeof` Function Is not Working as Expected With AVR Microcontroller [closed]
Observe the following example code (Microcontroller used: ATtiny84A):
...
2
votes
1
answer
155
views
Configuring the Ports of an AVR Microcontroller for SPI Use
I am trying to configure the an ATtiny84A for use with SPI, but I have some confusion with what Is being said in the datasheet for configuring the ports. The ATtiny84A has, what the datasheet calls, &...