PWM on CLUE

For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
RobertI
 
Posts: 8
Joined: Fri Jul 03, 2020 10:32 am

PWM on CLUE

Post by RobertI »

Which pins on a Clue will work with PWM?

If I want to control something using PWM rather than I2C, can I use the STEMMA connector? It's very convenient.

User avatar
dastels
 
Posts: 15817
Joined: Tue Oct 20, 2015 3:22 pm

Re: PWM on CLUE

Post by dastels »


User avatar
RobertI
 
Posts: 8
Joined: Fri Jul 03, 2020 10:32 am

Re: PWM on CLUE

Post by RobertI »

Thanks. The pinouts (which I had, Adafruit are full of info...) show pins 19 and 20 coming off the Stemma connector.

So the question is, can I use pins 19 and 20 for PWM? Arduinos only let you use a subset, but nothing is shown here either way as to whether those pins are suitable.
**STOP PRESS** - I just saw the "ANY GPIO PIN CAN BE CONFIGURED AS PWM". That wasn't on my older pinout diagram. Are 19 and 20 GPIO pins? that isn't defined.

Also - while I have you here - those two lines are also labelled "48" and "49" in grey parallelograms, which are also not defined. What do they mean?

Thanks R

User avatar
dastels
 
Posts: 15817
Joined: Tue Oct 20, 2015 3:22 pm

Re: PWM on CLUE

Post by dastels »

Yes, they are GPIO which can be used for I2C. But that's only when you create an I2C bus using them. The squiggles on those pins... that generally means they can be used for PWM.

The AVR chips used on the older Arduinos have a limited number of pins that can be used for PWM. In contrast the newer MCUs can use most (if not all) GPIO for PWM.

Alas, the grey parallelograms aren't noted in the key but I believe they refer to physical chip pins.

To use the STEMMA pins for PWM, use D19 and D20 to refer to them.

Dave

User avatar
RobertI
 
Posts: 8
Joined: Fri Jul 03, 2020 10:32 am

Re: PWM on CLUE

Post by RobertI »

Oh! The squiggles on the wires in the pinout are equivalent to the tildes on the Arduino diagrams? Clear now you say it but I'd never have seen it otherwise.

Thanks very much for helping. Just what I needed to know.

User avatar
dastels
 
Posts: 15817
Joined: Tue Oct 20, 2015 3:22 pm

Re: PWM on CLUE

Post by dastels »

Awesome! Have fun!

Locked
Please be positive and constructive with your questions and comments.

Return to “CLUE Board”