Skip to content

8Mhz Atmel 328 timing issue #3

@Betacarotin

Description

@Betacarotin

Hi,
I am running a Atmel328 on 8Mhz and am using the SetPinFrequencySafe(pin,freq) function.

It shows some quite interesting behaviour.
I start with freq = 100, it outputs PWM 100Hz as wished,
than I read out / send the freq variable and that one shows 50!
Excactly half!
But since the program runs as loop I would expect the frequency to drop, but it does not ?! So I wonder if the 8Mhz mode may cause some trouble or if i have a major bug somewhere?

For my application I just multiply every reading from the variable by two. but it feels really strange and wrong

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions