samd21g18a PWM output for 4 channels - which pins and how to config

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

We have a hardware design based on samd21g18a.    Would like 4 PWM outputs for controlling LED dimming.  With Arduino, 3 outputs are easily done with AnalogWrite function.   The fourth is proving challenging.

 

Reading the datasheet, specifically section 7 on I/O Multiplexing and Considerations has further confused the situation.

 

TC[3-5] and TCC[0-2] appear to be available for pwm.   Output of PWM appears to be via WOx channels.   Pin muxing the TC / TCC WOx channel is proving challenging.  It would seem that there are limited WOx channels for output.

 

Here's my question

 

Can this part output 8 bit independent PWM signals?

 

Is it possible to use pin 7, pin 19, pin 23 and pin 24 for those outputs?

 

Thanks,

 

Thom

 

 

Last Edited: Wed. Feb 5, 2020 - 11:03 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You've posted in the Arduino forum, in the AVR Community.

 

thommaughan wrote:
We have a hardware design based on samd21g18a

That's not an AVR - is it an Arduino ?

 

For questions about direct hardware access, you'd be better in the SAM forums:

 

https://community.atmel.com/forums/atmel-smart-arm-based-mcus

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for redirecting - I was having trouble navigating the site.