Using timer pins for general IO

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

On the XMEGA383C3, or any XMEGA. Is it possible to use, say, Timer1, or Timer2 OC0A, 0C0B, etc pins for GPIO pins if you are using the associated timer in software for counting/timing (not using compare / capture)?

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Not sure about Xmega but in tiny/mega even though a timer may have output wave generation functions (PWM etc) that only comes into play once you set the COMxx bits for a particular output channel to say how you want the output to behave for certain events in the timer. I think it unlikely that Xmega are radically different in this sense.

 

(off to dig out a PDF...)

 

EDIT: OK I see this:

 

As long as point 1 is not satisfied there will be no output to the pins. What is not immediately obvious is how you enable/disable compare channels though.

Last Edited: Wed. Oct 26, 2016 - 04:13 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:

What is not immediately obvious is how you enable/disable compare channels though.

 

Greg Muth

Portland, OR, US

Xplained/Pro/Mini Boards mostly

 

Make Xmega Great Again!

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks!