Event System

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

What do you guys use the event system for? I've just discovered that xMega is not only massively more powerful, uses less power AND is less expensive :P

If you don't know my whole story, keep your mouth shut.

If you know my whole story, you're an accomplice. Keep your mouth shut. 

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

I use it to let one timer count the overflow events of another timer, but it could be used to count anything that can generate an event. And the input capture functionality isn't tied up to a specific pin but is triggered by events, so you can get a time-stamp on anything that can generate an event. That could be useful.

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

The Xprotolab use all 8 event channels:

    CH0: TCE0 overflow used for ADC CH1: ADCA CH0 conversion complete
    CH2: EXT Trigger for freq. measuring
    CH3: TCD1 overflow used for DAC (waveform generator)
    CH4: TCC0 overflow used for freq. measuring
    CH5: TCC1 overflow used for freq. measuring
    CH6: CLKPER / 32768 (slow clock source)
    CH7: TCD0L underflow: 0.04096mS period - 24.4140625 Hz

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

I'm seeing... It can do things between peripherals without cpu intervention. Interesting.

So, like, when your timer tells it to, the adc takes a sample, then puts it into memory, without interrupting the cpu.

Oh, yes, Gabriel. I need to do something about my late, lamented xprotolab. Oh, yes, I'm out of money again too.

If you don't know my whole story, keep your mouth shut.

If you know my whole story, you're an accomplice. Keep your mouth shut. 

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

I've used it for starting/stopping a TC for measuring pulse width.

Gamu The Killer Narwhal
Portland, OR, US
_________________
Atmel Studio 6.2
Windows 8.1 Pro
Xplained boards mostly

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

And I've used it to synchronize the start of ADC sampling with a PWM chopped current source.

Have a nice day,
Kraal

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

I use it with a pin change interrupt to reset a timer that looks for the gaps between batches of sentences received from a GPS module. I also use it for triggering the ADC at regular intervals without any interrupts.

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

I've always thought an interesting feature of the event system is increasing the clock prescaler divide ratio. Most peripherals have a limited range, but the event system can divide the clock by up to 2^16 resulting in a peripheral (like ADC) that can operate at a very low rate without wasting a timer or other code intervention.