Yahoo Groups archive

AVR-Chat

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

Thread

Re: ATmega 168 Timer 1 mode 14, fast PWM, problem

Re: ATmega 168 Timer 1 mode 14, fast PWM, problem

2007-04-08 by anding_eunding

Hi Bob,

That's a good tip for a workaround.  Too early to quite give up on 
plan 'A' yet though!  The databook says Timer 1 mode 14 is 16 bit 
fast PWM but, it doesn't do that (behaves like 10 bit dual slope PWM 
with restricted prescaler choices?).  This can't be right.  Am I 
reading the databook totally wrong, or does this AVR not do what the 
book says???  [The chip and the the debugger seem to behave the 
same].  I'm sure someone must have come across this before (I hope!)


-- In AVR-Chat@yahoogroups.com, BobGardner@... wrote:
>
>  
> In a message dated 4/8/2007 7:27:52 A.M. Eastern Daylight Time,  
> anding_eunding@... writes:
> 
> Yup, the  AVR doesn't generate any waveform either...  Really  
> confusing!
> 
> 
> 
> 
> ==============================
> Tried something simpler, like 8 bit fast or 10 bit fast? Just init, 
then  
> write the OCR1A every time you want a new width. Whats the ICP used 
for? You  
> need a pulse of EXACTLY 65535 counts to get 16 bit pwm? Sounds real 
hard to do. 
> 
> 
> 
> ************************************** See what's free at 
http://www.aol.com.
Show quoted textHide quoted text
> 
> 
> [Non-text portions of this message have been removed]
>

Re: [AVR-Chat] Re: ATmega 168 Timer 1 mode 14, fast PWM, problem

2007-04-08 by BobGardner@aol.com

In a message dated 4/8/2007 7:27:52 A.M. Eastern Daylight Time,  
anding_eunding@yahoo.com writes:

Yup, the  AVR doesn't generate any waveform either...  Really  
confusing!




==============================
Tried something simpler, like 8 bit fast or 10 bit fast? Just init, then  
write the OCR1A every time you want a new width. Whats the ICP used for? You  
need a pulse of EXACTLY 65535 counts to get 16 bit pwm? Sounds real hard to do. 



************************************** See what's free at http://www.aol.com.


[Non-text portions of this message have been removed]

Re: ATmega 168 Timer 1 mode 14, fast PWM, problem

2007-04-08 by anding_eunding

Hi John,

Thanks, that's a good idea.  I do not have at the momement but a 
Dragon is a good idea to pick up at some point when I have an order 
going in.

Maybe I could put the question another way:

Does anyone have experience of running Timer 1 Mode 14 successfully 
on an ATmega 168?  If you do, could you share the code fragment 
please?  I may just be doing something very silly, and starting with 
a working model might show me if that's the case.



--- In AVR-Chat@yahoogroups.com, John Samperi <samperi@...> wrote:
Show quoted textHide quoted text
>
> At 10:47 PM 8/04/2007, you wrote:
> >[The chip and the the debugger seem to behave the
> >same].
> 
> Don't rely on the simulator for this kind of thing. Do you have a
> Dragon or JTAGMK2 with debug wire so that you can see what is
> REALLY happening inside the chip?
> 
> Regards
> 
> John Samperi
> 
> ********************************************************
> Ampertronics Pty. Ltd.
> 11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA
> Tel. (02) 9674-6495       Fax (02) 9674-8745
> Email: john@...
> Website  http://www.ampertronics.com.au
> *Electronic Design * Custom Products * Contract Assembly
> ********************************************************
>

Re: [AVR-Chat] Re: ATmega 168 Timer 1 mode 14, fast PWM, problem

2007-04-08 by John Samperi

At 10:47 PM 8/04/2007, you wrote:
>[The chip and the the debugger seem to behave the
>same].

Don't rely on the simulator for this kind of thing. Do you have a
Dragon or JTAGMK2 with debug wire so that you can see what is
REALLY happening inside the chip?

Regards

John Samperi

********************************************************
Ampertronics Pty. Ltd.
11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA
Tel. (02) 9674-6495       Fax (02) 9674-8745
Email: john@ampertronics.com.au
Website  http://www.ampertronics.com.au
*Electronic Design * Custom Products * Contract Assembly
********************************************************

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.