Hi,
I am trying to generate a PWM output signal on the pin of my MSP430f169 embedded microcontroller (bought from Olimex). The duty cycle of a 1 kHz, 5V output signal determines the length an 'I' type Firgelli Linear Actuator moves. The microcontroller high output is 3.3 V, so at the moment I have a connection from the output pin 1.2 running through a logic level translator to change the signal to 5 V.
The connections and wires seem to work fine, and the pins have worked fine for when I move a separate stepper motor (not through PWM). And the program is being uploaded onto the microcontroller fine.
However, at the moment the actuator will not move at all.
I would appreciate any help. The code I am using is given below:
-----------------------------------------------------------------------------------------------
#include <msp430x16x.h>
void main(void)
{
WDTCTL = WDTPW + WDTHOLD; // Stop WDT
P1DIR |= BIT4; // P1.4 to output
P1DIR |= BIT2; // P1.2 to output
P1OUT |= BIT4; // High output enables Voltage translator
P1SEL |= BIT2; // P1.2 to TA0.1
CCR0 = 800-1; // PWM Period
CCTL1 = OUTMOD_7; // CCR1 reset/set
CCR1 = 400; // CCR1 PWM duty cycle
TACTL = TASSEL_2 + MC_1; // SMCLK, up mode
_BIS_SR(LPM0_bits); // Enter LPM0
}