Proyecto de Tesis en Mecatrónica. Universidad Técnica del Norte. Ernesto Palacios <mecatronica.mid@gmail.com>

Dependencies:   EthernetNetIf HTTPServer QEI_hw RPCInterface mbed

Committer:
Yo_Robot
Date:
Wed Mar 28 18:42:32 2012 +0000
Revision:
4:552beeda4722
Parent:
3:8d5a9e3cd680
Child:
6:b4dae934e1ea
Generador de frecuencias OK!

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Yo_Robot 2:a1b556d78a7f 1
Yo_Robot 2:a1b556d78a7f 2 #ifndef SETUP_H
Yo_Robot 2:a1b556d78a7f 3 #define SETUP_H
Yo_Robot 2:a1b556d78a7f 4
Yo_Robot 2:a1b556d78a7f 5 #include "mbed.h"
Yo_Robot 2:a1b556d78a7f 6
Yo_Robot 4:552beeda4722 7
Yo_Robot 4:552beeda4722 8 /** @brief: Esta funcion configura al Timer2
Yo_Robot 4:552beeda4722 9 * para que las salidas p5 y p6 del mbed
Yo_Robot 4:552beeda4722 10 * se alternen cada vez que se iguala al
Yo_Robot 4:552beeda4722 11 * registro MR2 y MR3.
Yo_Robot 4:552beeda4722 12 */
Yo_Robot 4:552beeda4722 13 void setTimer2();
Yo_Robot 4:552beeda4722 14
Yo_Robot 4:552beeda4722 15
Yo_Robot 4:552beeda4722 16 /** @brief: Esta es la rutina que maneja las interrupciones
Yo_Robot 4:552beeda4722 17 * seriales, al recibir un caracter.
Yo_Robot 4:552beeda4722 18 */
Yo_Robot 2:a1b556d78a7f 19 void ISR_Serial();
Yo_Robot 2:a1b556d78a7f 20
Yo_Robot 4:552beeda4722 21
Yo_Robot 4:552beeda4722 22 /** @brief: Esta Funcion cambia el valor del Registro 2
Yo_Robot 4:552beeda4722 23 */
Yo_Robot 3:8d5a9e3cd680 24 void setMR2( int newValue );
Yo_Robot 4:552beeda4722 25
Yo_Robot 4:552beeda4722 26
Yo_Robot 4:552beeda4722 27 /** @brief: Esta Funcion detiene el timer
Yo_Robot 4:552beeda4722 28 */
Yo_Robot 3:8d5a9e3cd680 29 void stopTimer2();
Yo_Robot 4:552beeda4722 30
Yo_Robot 4:552beeda4722 31
Yo_Robot 4:552beeda4722 32 /** @brief: Esta Funcion arranca el timer
Yo_Robot 4:552beeda4722 33 */
Yo_Robot 3:8d5a9e3cd680 34 void startTimer2();
Yo_Robot 2:a1b556d78a7f 35
Yo_Robot 4:552beeda4722 36
Yo_Robot 4:552beeda4722 37 /** @brief: Esta Funcion calcula el valor necesario
Yo_Robot 4:552beeda4722 38 * en el MatchRegister para obtener una frecuencia
Yo_Robot 4:552beeda4722 39 * de salida.
Yo_Robot 4:552beeda4722 40 * @param fout Frecuencia de salida deseada
Yo_Robot 4:552beeda4722 41 * @return El valor que debe tener el MatchRegister
Yo_Robot 4:552beeda4722 42 */
Yo_Robot 4:552beeda4722 43 int getMRvalue( int fout );
Yo_Robot 4:552beeda4722 44
Yo_Robot 4:552beeda4722 45
Yo_Robot 4:552beeda4722 46 // Legacy
Yo_Robot 4:552beeda4722 47 void setMR3( int newValue );
Yo_Robot 4:552beeda4722 48 void setPrescaler( int newValue );
Yo_Robot 4:552beeda4722 49
Yo_Robot 4:552beeda4722 50
Yo_Robot 2:a1b556d78a7f 51 #endif