IR generation using counter timers

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

I am trying to build a WIfi remote using ATSAMD21E16 MCU and WINC1500 wifi controller. I am receiving some data from the cloud to my Atmel IC like frequency, data length and IR data ( an array of integers which are just length of the pulses to be generated on the PWM pin). How do i generate an IR sequence with data in the form data=[342,171, 21,21,21,60...........upto length 67] ? I am using TCC0 for PWM and TCs for counting the pulses.

dexter

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

Dumb question: How is each digit in the IR data sequence to be interpreted, especially which digit is interpreted as the pulse length? How many pulses are produced for each length, how do you knw when you've reached the end of the IR data.

If the sequence isn't too fast you could set up a pointer to the next PWM length and an interrupt at the end of the pulse. In the interrupt handler set the next pulse length and bump the pointer to the next length. If the sequence is fast it gets a bit more complicated.

Jerry