Skip to content

Bug in ATtiny85 (ADC in free running mode) #136

Description

@makkiato83

I think there is a bug in the way the simulator handles ADC in free running mode.

This is a mode, documented in the datasheet, in which the ADC keeps sampling the chosen input.
In is configured using the ADCSRA and ADCSRB registers.

To reproduce the error I have prepared this sketch: https://wokwi.com/projects/353310932474416129

In the Wokwi simulation, there is only one message reaching the console.

In a physical Attiny85, the console keeps receiving messages, as it should.

BUG(?): It appears like the simulator somewhere does not properly re-start the ADC conversion.
This bug might (not checked) affect not just the free-running-mode (ADCSRB =0x00) but other interrupt-driven ADC-conversions as well (other values of ADCSRB).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions