Go Down

Topic: Assistance reading datasheet please (Read 704 times) previous topic - next topic

AgeingHippy

Hi All

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

Thanks

CrossRoads

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."
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Coding Badly


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.

AgeingHippy

@Crossroads  That is a thumbs down answer :) 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


Grumpy_Mike

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.

Coding Badly

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.

CrossRoads

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.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

AgeingHippy

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.  :*

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 :)

Keep the constructive criticism coming lads :)


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.

Grumpy_Mike

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.  :)

Go Up