Skip to main content

All Questions

Tagged with
0 votes
1 answer
36 views

Why did fuse bits successfully reset using ICSP and USBASP programmer?

I read a lot about fuse bits in AVR microcontrollers and everyone says that fuse bits can be reset by using high-voltage programmer only, they can't be reset via UART<->ICSP. So, I've received ...
Alexander Perechnev's user avatar
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 ...
smajli's user avatar
  • 940
1 vote
3 answers
300 views

ATMEGA328 out of memory, but avr-size reports I still have a lot of space

I have a program written in C. I have 390 byte array defined and a long string value consisting of around 475 bytes. Now I hit a problem if I add more characters to the string value, around 30 bytes, ...
0x29a's user avatar
  • 481
1 vote
1 answer
94 views

ATMega328p wakes immediately after sleep

I'm having issues with my current AVR-C project that runs on an ATMega328p. After issuing the sleep command the chip wakes up again immediately. I want to wakeup with an external interrupt, but while ...
Julian F. Weinert's user avatar
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
1 vote
1 answer
387 views

How do I measure distance of Ultrasonic Sensor HC-SR04 using the ATmega328P Timer Input Capture?

I am using an ATmega328P MCU with an 16 MHz external oscillator. I need to measure distance of Ultrasonic Sensor HC-SR04 using the ATmega328P Timer 1 Input Capture interrupt. I have to measure the ...
Pumbaa's user avatar
  • 25
0 votes
1 answer
83 views

Software serial not sending the first byte correctly

I implemented the following program to send data to a serial monitor.When I run it, I expect to see abcd but I always see ⸮bcd: <...
kovac's user avatar
  • 475
0 votes
1 answer
142 views

ESP8266 responds with gibberish and 'ready' to AT commands from C program

I have gotten the ESP8266 working by sending commands manually from the TTY. Now, I'm trying to connect to wifi using the following C program: ...
kovac's user avatar
  • 475
6 votes
1 answer
460 views

How does USART know which port to use for IO?

I'm trying to learn to use USART on an ATmega328P. I'm using this datasheet. I'm using the following code to echo characters I type on my terminal: ...
kovac's user avatar
  • 475
0 votes
0 answers
92 views

What are the control lines in the ATmega328P for?

I'm trying to understand the block diagram for AVR architecture in the datasheet for ATmega328P on page 9. In it, I see that instruction decoder is connected to control lines. What are they in terms ...
kovac's user avatar
  • 475
1 vote
1 answer
476 views

Understanding assembly code for LED blink with ATmega328P

I wrote the following program to turn an LED on and off at 1-second intervals: ...
kovac's user avatar
  • 475
3 votes
2 answers
2k views

ATMEGA328P reset circuit, not pulling down fully

Attached is the schematic of a reset circuit. When I press the reset button, the voltage on the reset pin is 2.5 V. Rmoving R13 naturally solves the issue, but I'm unclear as to why the ...
Matt Roberts's user avatar
1 vote
0 answers
248 views

Best frequency for ATmega328P using internal oscillator?

I wonder what frequency I should set for the internal oscillator of my ATmega328P. I'll only be reading and outing digital signals, 1s and 0s. I'd like for the processing to be as fast as it can get, ...
Israel Almaraz Vásquez's user avatar
1 vote
2 answers
1k views

Reading LM35 temperature sensor with atmega328p [closed]

I want to read the temperature using LM35 and atmega328p so when the temperature equals or less than 30 a red LED (PINB0) will be turned ON, otherwise a green LED (PINB1) will be ON but I did not get ...
Muntadher Mohammed's user avatar
2 votes
1 answer
76 views

Strange behavior when splitting an AVR program across functions

I'm trying to run a very basic "blinker" program on an Atmega328P. Here it is in its entirety: ...
Melllvar's user avatar
  • 147

15 30 50 per page
1
2 3 4 5