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