8515 OC1B refuses to disconnect

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have come across a problem when using T1 in 8bit pwm mode. According to the 8515 data sheets, clearing bits 5,4 of TCCR1A should disconnect OC1B , however it does not . I use this output as a motor drive (buffered of course) and the only way that I can stop the motor is to completely disable the pwm by clearing bits 1,0 of TCCR1A. This causes other dramas as the counter can then run past 0xff and has to be reset before I can restart pwm in 8bit mode. Does anyone know why OC1B behaves like this?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I am not 100% sure about this, but I think the cause is the different functionality of TCCR1A when TC1 is in PWM mode.

Have a look at page 36, table 12 in the datasheet. If you clear COM1B1 and COM1B0, the funcion reads 'Not connected', and only values 1,0 or 1,1 will have some effect. And neither actually switches the pulse off. I think the clearning of the pins will only disable the output to OC1B when it is used in toggle or set high/low mode.

I am not sure what the proper solution for this would be. If stopping the PWM mode kills your program, then I guess disabling cmpB interrupt wouldn't work either.

What kind of motor are you trying to drive?

M.

admin's test signature
 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If Anyone is interested, Atmel have confirmed that this may indeed be a hardware bug and their I.C. development group are looking into it. Sorry Marcin, I was right, but thanks for your input anyway.
Shaun.