Skip to main content

All Questions

Tagged with
0 votes
0 answers
24 views

AVR128Dx TCB Input Capture issue

Ive made a code for reading SENT sensor using TCB interrupt with event system. It works 90% of the time, but those 10% seems like it doesnt read correct high pulse duration, mby someone will see, what ...
Ralfs Volis's user avatar
0 votes
0 answers
29 views

Problems with OCR1B on Atmega328p

Trying to control 4 servos (SG90) using 4 pots on an arduino nano and the one connected to OC1B keeps having problems, with bits of jittering and it just not moving correctly (occasionally spinning), ...
jimothy's user avatar
1 vote
1 answer
846 views

Simulator of microcontroller runs so slow in Proteus

I am trying to implement a simple program with ATmega128, which display numbers from 0 to F. The problem is when I set the delay time at 500ms, the simulation runs slower, at around 8 seconds for each ...
Becker's user avatar
  • 75
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?
nowsqwhat's user avatar
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 ...
a2640's user avatar
  • 73
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
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
0 votes
0 answers
405 views

How to replace AVR _delay_ms() with timer

Good day. I need problem with replacing _delay_ms() bultin function with timer. MCU: Atmega644@16Mhz My code (simplified): ...
user2120666's user avatar
2 votes
2 answers
527 views

How to store the last counting value in EEPROM in ATmega8 after power failure

I written a program to store the last counting value according to ATmega8 datasheet. but it didn't save the last value. The counter variable went to zero after power failure. Please check the ...
Karim Quet's user avatar
2 votes
1 answer
1k views

Configuring Atmega32 timer using the oscillator without prescaling gives wrong delay time

I am using AVR atmega32 microcontroller. The code below is supposed to toggle the LED connected to PORTD. The frequency of the oscillator connected to the ...
NAND's user avatar
  • 498
1 vote
0 answers
227 views

Atmega328p datasheet mistake "OCRA"

I was reading the atmega328p datasheet, and suddenly, i saw that a register is mentioned called "OCRA", on page 108 and page 160, which normally, should be register "OCR0A", which is widely mentioned ...
Χριστιανίδης Βασίλειος's user avatar
0 votes
1 answer
529 views

ATMega328P Timer Problem in Proteus

I have an ATMega328P microcontroller, and I'm learning how it is programmed. I wrote an example for Timer0 and uploaded it into the microcontroller. It works and a led blinks once a second in while. ...
Faruk UNAL's user avatar
1 vote
1 answer
3k views

Generating 1 second with avr and timer 0 for Atmega32A

dears: we have to Generate 1 second with atmega32A and mikrobasic software. so I have configured timer 0 and avr with this way: ...
Soheil Paper's user avatar
0 votes
1 answer
545 views

Output Compare Interrupt does not work avr atmega

Hey I'm trying to do blinking led using interrupts on 16 bit timer. My atmega model is Atmega168A. Chip clock rate is 12Mhz. Here is my code: ...
bielu000's user avatar
  • 139
0 votes
1 answer
436 views

LED blinking while loop not working AVR timer 0

It is strange and rare. I am trying to blink a LED at PD0 at 2hz, but it doesn't work. Seems to me that while loop doesn't work at all. I have triple checked the code. what is the problem here? ...
user avatar

15 30 50 per page
1
2 3 4 5