Autor Tema: EPWM PARA CONTROLAR 2 MOTORES  (Leído 1552 veces)

0 Usuarios y 1 Visitante están viendo este tema.

Desconectado hprince

  • PIC10
  • *
  • Mensajes: 10
EPWM PARA CONTROLAR 2 MOTORES
« en: 08 de Mayo de 2010, 12:01:48 »
#include <p18f4550.h>
#include <delays.h>
#include <pwm.h>

void SetOutputEPWM1(unsigned char outputconfig, unsigned char outputmode);
void OpenEPWM1 ( char PR2 ); // Configure PWM channel x.
void SetDCPEPWM1 ( unsigned int dutycycle ); // Write a new duty cycle value toPWM channel x.
void CloseEPWM1 ( void ); //
void main (void){

TRISDbits.TRISD7 =0;// PWM P1D FORWARD
  TRISCbits.TRISC2 = 0;//PWM P1A FORWARD

PORTDbits.RD7=1;
PORTCbits.RC2=1;
T2CON = 0;
//CloseEPWM1(void)
OpenEPWM1(156);
SetDCPEPWM1(78);
SetOutputEPWM1(1,12);

}


Buenas he empezando a programar EPWM, he hecho este ejemplo para testear y el MPlab output me dice lo siguitene:
Error - could not find definition of symbol 'SetOutputEPWM1' in file './epwmtest.o'.
Es mi primer test y necesito aprenderlo rapido..bueno el programa es para dos motores y he elegido EPWM  para que los motores
realizen la funcion de avanzar y retroceder bueno tambien voltear... pero primero necesito saber que esta fallando!


 

anything