Quote from Themoteo on June 23, 2026, 10:07 pm'm having trouble getting the capture mode to work on the falling edge. Even setting the ICSE1 bit to 0, it only works on the rising edge.
'm having trouble getting the capture mode to work on the falling edge. Even setting the ICSE1 bit to 0, it only works on the rising edge.
Quote from arcachofo on June 24, 2026, 9:05 amHi.
Input Capture Unit in Atmega328 is working for me at both edges.
Can you share circuit and firmware to reproduce the issue?
Hi.
Input Capture Unit in Atmega328 is working for me at both edges.
Can you share circuit and firmware to reproduce the issue?
Quote from Themoteo on June 24, 2026, 11:08 amI observe the capture of TCNT1 to ICR1 in MCU MONITOR and, even changing the value of the ICSE1 bit, the capture only happens on the rising edge.
I observe the capture of TCNT1 to ICR1 in MCU MONITOR and, even changing the value of the ICSE1 bit, the capture only happens on the rising edge.
Uploaded files:Quote from arcachofo on June 24, 2026, 12:45 pmThank you for the files.
Your code works for me in rising or falling edge.
But I have to use a pullup resistor on PB0:sbi PORTB,0 ; pulup do pino PB0
Thank you for the files.
Your code works for me in rising or falling edge.
But I have to use a pullup resistor on PB0:
sbi PORTB,0 ; pulup do pino PB0
Uploaded files: