This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Differential square TA0.0 and TA0.1 to a H-Bridge, no dead time needed.

I use a second half of a dual h-bridge to drive a speaker for buzzing sound.
The IC have overshoot protection so no dead-time needed.

This setup works pretty good

mov.w #999,&CCR0
mov.w #OUTMOD_7,&CCTL0
mov.w #500,&CCR1
mov.w #OUTMOD_7,&CCTL1
mov.w #TASSEL_2+MC_1,&TACTL

But what would be the best way to create this?
Maybe even having smoother sound with a rough triangle wave instead, e.g. Positive-off-Negative-off

The IC treat 0-0 and 1-1 as off,
and take in account that one pin is using TA0.0 that it more limited.

 

P.S does counters use power? (battery operated device), turn them off by: 
mov.w   #MC_0,&TACTL  or turning off the SMCLK is the way to save power?
 

 

  • The code you posted doe s not provide a differential signal.
    The tiemr runs in upmode, so it runs from 0 to CCR0.
    CCR0 is in reset/set mode, so it is reset at TAR=CCR0 and reset at TAR=0. This is only a short pulse of one timer tick length. CCR1 will output a 50% DC wave signal.
    You eithe rneed to use CCR1+CCR2 for the putputs (and set CCR2 to the inverse outmod), or run the timer in cont mode and use CCR0 and CCR1 then as complementary units. But then you won't be able to change the cycle time, which probably isn't what you want for your buzzer output.

**Attention** This is a public forum