TC 32 bit output compare config

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

Hello,

I just want to verify possibilities for using a 32 bit TC (two cascaded 16 bits TC) with output capture. And I am using PORTE on my ATxmega256A3 for this. If I use OCxA is my output compare pin the PE0 or PE4?

I do not find example on this setup.
I only see example of setup of a 32 bit input capture and in this case the input capture pin is PE0.

I am just trying to figure it out since I am about to design my schematic.

Thanks,

Br Leif G

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

See AVR1001 pdf and its code for how to do this .

1) Studio 4.18 build 716 (SP3)
2) WinAvr 20100110
3) PN, all on Doze XP... For Now
A) Avr Dragon ver. 1
B) Avr MKII ISP, 2009 model
C) MKII JTAGICE ver. 1

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

This document only describe how to use input capture.
But if I have understand correct so fare I could cascade 2 16bit TC but I need to toggle the pin in a third timer. I am not sure how to do so??

Br Leif G

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

Quote:
This document only describe how to use input capture.
It's about multiple apps and see section 4.3 which is about configuring for a 32 bit timer ( with ICP support, but you can ignore that part of the code ) . It also gives another pdf about 32 bit timers, AVR1306 .

Edit: AVR1306 has a 32 bit T/C section, but it also is for ICP . :? It looks like doing OC with a 32 timer can't be done, at least in hardware . Maybe it's possible to setup a 32 bitter and work it with a s.ware OC ... ?

What app. do you think would need 32 bit resolution for OC/PWM ?

1) Studio 4.18 build 716 (SP3)
2) WinAvr 20100110
3) PN, all on Doze XP... For Now
A) Avr Dragon ver. 1
B) Avr MKII ISP, 2009 model
C) MKII JTAGICE ver. 1

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

Quote:
But if I have understand correct so fare I could cascade 2 16bit TC but I need to toggle the pin in a third timer. I am not sure how to do so??

I am not sure exactly what you are trying to do, but I wanted to make sure you were aware of the ability to cascade two 16-bit Timer/Counters into a 32 bit timer/counter using the Event System.

JC