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