1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

AVR Timer

Discussion in 'AVR' started by Jakksynth, Mar 6, 2018.

  1. Jakksynth

    Jakksynth New Member

    Mar 3, 2018
    I am using a Attiny2313 to create a PWM at PIN14 (OCOA). I assume that this will also set PIN9 (OCOB) as a PWM too since they share the same counter. What do I need to do in order to be able to use Pin9 as a normal I/O Pin. I don't want the timer to affect it!
  2. wkrug

    wkrug Active Member

    May 30, 2010
    I guess You have set the COM0B0 and/or the COM0B1 bit in the TCCR01 to 1.
    This activates the connection between the OCR0B Unit and the Pin.
    Set both bits to 0 and the I/O Pin should work normal.
    Take a look at the Datasheet at section 11.9.1 for further information.

    I know the whole datasheet is very huge, but there are all the needed informations about the controller.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice