Yahoo Groups archive

AVR-Chat

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

Message

Re: [AVR-Chat] PWM help

2007-10-06 by David Kelly

On Oct 5, 2007, at 7:05 PM, Thomas Keller wrote:

>
> I don't know why, I thought I understood it, but I am having  
> difficulty
> determining the correct control register bits to set to obtain the  
> phase
> correct PWM mode I wish to operate in.
>
>   I want to have an interrupt handler set or clear a pair of GPIOs  
> based
> on the status of the PWM module.  I need two GPIOs, because I wish to
> sink ~~40 mA from my LED, without using an external pass transistor
> (I am working with a design which has extremely tight physical size
> restrictions).
>
>   Can someone here assist me in understanding the correct register  
> settings
> to achieve this goal?   Thanks in advance.

Am guessing that if you put the same values in OCR0A and OCR0B that  
you could get both moving together in sync. Whatever, the output pins  
have to be OCR's.

--
David Kelly N4HHE, dkelly@HiWAAY.net
========================================================================
Whom computers would destroy, they must first drive mad.

Attachments

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.