Pages: [1]   Go Down
Author Topic: Assistance reading datasheet please  (Read 511 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Full Member
***
Karma: 0
Posts: 111
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi All

Looking at the datasheet of an ATTiny24 how would I tell which pins are PWM pins?

Thanks
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 443
Posts: 23835
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You could look for these kinds of words:

"11. 8-bit Timer/Counter0 with PWM

Timer/Counter0 is a general purpose 8-bit Timer/Counter module, with two independent Output
Compare Units, and with PWM support. It allows accurate program execution timing (event management)
and wave generation."
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 178
Posts: 12288
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


You can also use the Pin Configurations section.  Pins marked with "OCnZ" where n is a numeric digit and Z is an alphabetic letter are potential PWM pins.
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 111
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@Crossroads  That is a thumbs down answer smiley It does not tell me how many or which pins are PWM...

@CodingBadly
I guess then there are 3 PWM pins on the ATTiny24 - 5, 6 and 8?

Cheers

Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 514
Posts: 31543
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
That is a thumbs down answer
No that is a very good answer.

You did not ask the question "how many or which pins are PWM" you asked "how would I tell which pins are PWM pins" and your title says "Assistance reading datasheet please".

If you want to know just the answer then ask, don't ask how to find out for yourself if you don't want to learn.
Logged

Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 178
Posts: 12288
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I guess then there are 3 PWM pins on the ATTiny24 - 5, 6 and 8?

(PCINT10/INT0/OC0A/CKOUT) PB2

(PCINT7/ICP/OC0B/ADC7) PA7

(PCINT6/OC1A/SDA/MOSI/DI/ADC6) PA6

PA5 (ADC5/DO/MISO/OC1B/PCINT5)

Four.
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 443
Posts: 23835
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks Mike.
Was pretty clear to me from Figure 11-1 where it shows Waveform Generation going to OCnA and OCnB, and
"For the actual placement of I/O pins, refer to Figure 1-1 on page 2."
Up to the OP to determine pins based on the unspecified package being used.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Full Member
***
Karma: 0
Posts: 111
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hmm... I stand corrected Mike.

I took another look at what Crossroads said, and realised he was directing me to section 11. I thought he was simply quoting a section that did not provide any value to me. I should have looked at the datasheet harder. Sorry Crossroads.  smiley-kiss

Still, it is not easy to determine that I need to look for i/o pins in the format COnZ from the documentation, so the easy answer was delivered by CodingBadly which told me how to determine which and how many pins are PWM without spending too much time trying to decode the datasheet.

I cannot tell, knowing now to look for COnZ named pins, whether I would have determined that from the datasheet easily or not... but I guess I was looking for some simple statement saying pins x, y and z are PWM pins.

I still have much to learn smiley

Keep the constructive criticism coming lads smiley

Quote
That is a thumbs down answer
No that is a very good answer.

You did not ask the question "how many or which pins are PWM" you asked "how would I tell which pins are PWM pins" and your title says "Assistance reading datasheet please".

If you want to know just the answer then ask, don't ask how to find out for yourself if you don't want to learn.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 514
Posts: 31543
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
but I guess I was looking for some simple statement saying pins x, y and z are PWM pins.
Yes but data sheets give information for the chip and the chip can be in so many different packages that the pin numbers are not useful. So they have names for the pins. You then have to translate that into pin numbers for the package you use and then further translate that into what those physical pin numbers are called on the board you have.
I know it is convoluted but that is the way it is.  smiley
Logged

Pages: [1]   Go Up
Jump to: