Autor Tema: problema extraño con el TIMER1 [SOLUCIONADO]  (Leído 1668 veces)

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

Desconectado RodrigoAndres

  • PIC16
  • ***
  • Mensajes: 171
problema extraño con el TIMER1 [SOLUCIONADO]
« en: 04 de Agosto de 2016, 17:12:13 »
hola a todos, estoy compilando el siguiente codigo con mplab x

Código: [Seleccionar]
OpenTimer1(Tx_ON | T1_TMWDIS_OFF | Tx_IDLE_STOP | Tx_GATE_OFF | Tx_PS_1_1, 0);
ConfigIntTimer1(Tx_INT_ON | Tx_INT_PRIOR_0);

 y me bota  el siguiente error:

Código: [Seleccionar]
main.c:57:16: error: 'Tx_ON' undeclared (first use in this function)
     OpenTimer1(Tx_ON | T1_TMWDIS_OFF | Tx_IDLE_STOP | Tx_GATE_OFF | Tx_PS_1_1, 0);
                ^
main.c:57:16: note: each undeclared identifier is reported only once for each function it appears in

main.c:57:40: error: 'Tx_IDLE_STOP' undeclared (first use in this function)
     OpenTimer1(Tx_ON | T1_TMWDIS_OFF | Tx_IDLE_STOP | Tx_GATE_OFF | Tx_PS_1_1, 0);
                                        ^
main.c:57:55: error: 'Tx_GATE_OFF' undeclared (first use in this function)
     OpenTimer1(Tx_ON | T1_TMWDIS_OFF | Tx_IDLE_STOP | Tx_GATE_OFF | Tx_PS_1_1, 0);
                                                       ^
main.c:57:69: error: 'Tx_PS_1_1' undeclared (first use in this function)
     OpenTimer1(Tx_ON | T1_TMWDIS_OFF | Tx_IDLE_STOP | Tx_GATE_OFF | Tx_PS_1_1, 0);
                                                                     ^
main.c:58:21: error: 'Tx_INT_ON' undeclared (first use in this function)
     ConfigIntTimer1(Tx_INT_ON | Tx_INT_PRIOR_0);
                     ^
main.c:58:33: error: 'Tx_INT_PRIOR_0' undeclared (first use in this function)
     ConfigIntTimer1(Tx_INT_ON | Tx_INT_PRIOR_0);

no se porque sale si asi esta en la libreria que estara mal? les agradesco la ayuda
« Última modificación: 04 de Agosto de 2016, 18:09:43 por RodrigoAndres »

Desconectado RodrigoAndres

  • PIC16
  • ***
  • Mensajes: 171
Re:problema extraño con el TIMER1 [SOLUCIONADO]
« Respuesta #1 en: 04 de Agosto de 2016, 18:09:20 »
ya pude encontrar el error es que en donde dicen las x tenia que poner 1 porque es el timer 1:


Código: [Seleccionar]
OpenTimer1(T1_ON | T1_TMWDIS_OFF | T1_IDLE_STOP | T1_GATE_OFF | T1_PS_1_1, 0);
ConfigIntTimer1(T1_INT_ON | T1_INT_PRIOR_0);


 

anything