Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

Re: [AVR-Chat] PB0 & PB2 on ATtiny26

Re: [AVR-Chat] PB0 & PB2 on ATtiny26

2004-12-24 by Leon Heller

----- Original Message ----- 
Show quoted textHide quoted text
From: ethan@bufbotics.org
To: avr-chat@yahoogroups.com
Sent: Friday, December 24, 2004 5:56 PM
Subject: [AVR-Chat] PB0 & PB2 on ATtiny26


Hello,

I am trying to figure out from the ATtiny26 datasheet whether I can use
PB0 & PB2 as I/O pins while using PWM outputs on PB1 & PB3.

Can anybody please shed some light on this?  I'd hate to lose two extra
I/O pins when using PWM.

I am planning on using PB1 & PB3 to drive the power setting of two motors
(via an H-bridge chip), and I need two other output pins to control the
direction of the motors.

Any thoughts?


On page 90 it says that enabling the alternate function on some of the pins 
doesn't affect the use of the other pins as general digital I/O, which 
implies that you can use PB0 and PB2 for I/O, with PWM on PB1 and PB3. 
Looking at Table 25 on page 55, it appears as though you can enable/disable 
the inverted outputs in TCCR1A, so you should be OK. I'd test it in the 
simulator, and see what happens.

Leon 



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.298 / Virus Database: 265.6.4 - Release Date: 22/12/2004

PB0 & PB2 on ATtiny26

2004-12-24 by ethan@bufbotics.org

Hello,

I am trying to figure out from the ATtiny26 datasheet whether I can use
PB0 & PB2 as I/O pins while using PWM outputs on PB1 & PB3.

Can anybody please shed some light on this?  I'd hate to lose two extra
I/O pins when using PWM.

I am planning on using PB1 & PB3 to drive the power setting of two motors
(via an H-bridge chip), and I need two other output pins to control the
direction of the motors.

Any thoughts?

Thanks, Merry Christmas & Happy New Year!!

Ethan
www.bufbotics.org

RE: [AVR-Chat] PB0 & PB2 on ATtiny26

2004-12-24 by Larry Barello

Page 74 of the complete data sheet along with table 35 (next page) covers
this topic pretty well. Pay particular attention to the table.

Cheers!
Show quoted textHide quoted text
-----Original Message-----
From: ethan@bufbotics.org


Hello,

I am trying to figure out from the ATtiny26 datasheet whether I can use
PB0 & PB2 as I/O pins while using PWM outputs on PB1 & PB3.

Can anybody please shed some light on this?  I'd hate to lose two extra
I/O pins when using PWM.

I am planning on using PB1 & PB3 to drive the power setting of two motors
(via an H-bridge chip), and I need two other output pins to control the
direction of the motors.

Any thoughts?

Thanks, Merry Christmas & Happy New Year!!

Ethan
www.bufbotics.org

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.