Yahoo Groups archive

AVR-Chat

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

Message

Re: RE:[AVR-Chat] Phase correct PWM

2005-03-18 by Luke.Wei

--- In AVR-Chat@yahoogroups.com, "ttse7" <ttse7@y...> wrote:
> 
> I also use c language to implement your code and pulse comes out.  I
> have few questions:why you don't need to set COM01 and COM00 and why
> you set FOC0.  As stated in datasheet, FOC0 is set when using non-
PWM
> mode.

Dear... 

I set tccr0 = 0x61...

bit  | pin   | 0/1
-----------------------------
bit7 | FOC0  | 0 (MSB
bit6 | WGM00 | 1
bit5 | COM01 | 1
bit4 | COM00 | 0
bit3 | WGM01 | 0
bit2 | CS02  | 0
bit1 | CS01  | 0
bit0 | CS00  | 1 (LSB
-----------------------------
0110 0001 bin
6 1 hex
-----------------------------

so FOC0 = 0 ... not 1
and i have set COM0n[0..1]......

cheers!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Luke.

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.