Yahoo Groups archive

AVR-Chat

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

Thread

Re: *sigh*

Re: *sigh*

2007-07-05 by Rick

--- In AVR-Chat@yahoogroups.com, Thomas Keller <tjkeller1@...> wrote:
>      I can;t find a datasheet for the AT90S8515, so I was using the
data 
> sheet for the ATmega8515.   DAG NAB IT.

The datasheet for the AT90S8515 is available from Atmel's website --
just do a search for "AT90S8515" from their homepage at
<http://www.atmel.com>.

Rick

*sigh*

2007-07-05 by Thomas Keller

Alright.   I am monitoring the control register (OCR0) and it is getting 
the appropriate values to cause the PWM unit to dim the LED, but the LED 
is staying brightly lit, at 100% all the time.   In the simulator, you 
cannot see the PWM output, but by watching the various registers, it 
appears to be working, except that on an actual AT90S8515, the LED never 
dims.   Am I missing something in the PWM setup?

PWM initialization code
;-----------------------------------------------------------------------------
;    initialize counters, PWM module
;

    ldi        TEMP,        0x03            ; enable timer and compare 
match register
    out       TIMSK,      TEMP         ; and store to appropriate register
    ldi        TEMP,        0x0d            ; set up timer prescaler
    out        TCCR0,    TEMP          ; output to correct register



PWM access code:
;-----------------------------------------------------------------------------
;    PWM interrupt handler
;

PWM_Handler:

    rcall    EERead                    ; go read the EEPROM data for 
this angle
    out     OCR0,    TEMP        ; output to PWM controller
    in        r27,    OCR0            ; take a peek at the PWM control 
register and siplay for debugging

    ret                                        ; all done, go home

Re: [AVR-Chat] *sigh*

2007-07-05 by David VanHorn

Possible problem in EEread?
Show quoted textHide quoted text
On 7/5/07, Thomas Keller <tjkeller1@alltel.net> wrote:
>
> Alright.   I am monitoring the control register (OCR0) and it is getting
> the appropriate values to cause the PWM unit to dim the LED, but the LED
> is staying brightly lit, at 100% all the time.   In the simulator, you
> cannot see the PWM output, but by watching the various registers, it
> appears to be working, except that on an actual AT90S8515, the LED never
> dims.   Am I missing something in the PWM setup?
>
> PWM initialization code
> ;-----------------------------------------------------------------------------
> ;    initialize counters, PWM module
> ;
>
>    ldi        TEMP,        0x03            ; enable timer and compare
> match register
>    out       TIMSK,      TEMP         ; and store to appropriate register
>    ldi        TEMP,        0x0d            ; set up timer prescaler
>    out        TCCR0,    TEMP          ; output to correct register
>
>
>
> PWM access code:
> ;-----------------------------------------------------------------------------
> ;    PWM interrupt handler
> ;
>
> PWM_Handler:
>
>    rcall    EERead                    ; go read the EEPROM data for
> this angle
>    out     OCR0,    TEMP        ; output to PWM controller
>    in        r27,    OCR0            ; take a peek at the PWM control
> register and siplay for debugging
>
>    ret                                        ; all done, go home
>
>
>
>
> Yahoo! Groups Links
>
>
>
>

Re: [AVR-Chat] *sigh*

2007-07-05 by Thomas Keller

David VanHorn wrote:
>
> Possible problem in EEread?
>

    Good call, but no, EERead is returning the correct values and they 
are getting programmed into OCR0 correctly,that is what r27 is monitoring.
Show quoted textHide quoted text
> On 7/5/07, Thomas Keller <tjkeller1@alltel. net 
> <mailto:tjkeller1%40alltel.net>> wrote:
> >
> > Alright. I am monitoring the control register (OCR0) and it is getting
> > the appropriate values to cause the PWM unit to dim the LED, but the LED
> > is staying brightly lit, at 100% all the time. In the simulator, you
> > cannot see the PWM output, but by watching the various registers, it
> > appears to be working, except that on an actual AT90S8515, the LED never
>
>

Re: [AVR-Chat] *sigh*

2007-07-05 by John Samperi

At 09:27 AM 6/07/2007, you wrote:
> > appears to be working, except that on an actual AT90S8515, the LED never
> > dims.   Am I missing something in the PWM setup?

Perhaps the fact that the 90S8515 does NOT have PWM on timer0?

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
********************************************************


-- 
No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.476 / Virus Database: 269.10.0/887 - Release Date: 5/07/2007 1:55 PM

Re: [AVR-Chat] *sigh*

2007-07-05 by David VanHorn

> Perhaps the fact that the 90S8515 does NOT have PWM on timer0?

Hopefully he meant T1 ?

True fact, T0 is "dumb", that's why I use it for opsys 1mS timer ticks.
I actually LIKE that it's a nice dumb timer.

Re: [AVR-Chat] *sigh*

2007-07-06 by Thomas Keller

John Samperi wrote:
>
> At 09:27 AM 6/07/2007, you wrote:
> > > appears to be working, except that on an actual AT90S8515, the LED 
> never
> > > dims. Am I missing something in the PWM setup?
>
> Perhaps the fact that the 90S8515 does NOT have PWM on timer0?
>

     ***DOH***     DAMN!    Is that one of the differences between an 
AT90S8515 and an ATmega8515!????

     I can;t find a datasheet for the AT90S8515, so I was using the data 
sheet for the ATmega8515.   DAG NAB IT.

Thanks, John.   **grin*

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.