-
-
Save everblut/2769781 to your computer and use it in GitHub Desktop.
PIC
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <16F628A.h> //Pic a utilizar | |
#FUSES NOWDT //No usar el watchdog | |
#FUSES INTRC_IO //Usar el cristal interno, sin CLKOUT | |
#FUSES BROWNOUT //activa el brownout | |
#use delay(clock=4000000) // frecuencia de 4Mhz | |
void main( void ){ | |
set_tris_b( 0x00 ); //ponemos como salida el puertoB | |
output_low(pin_B1); //Apagamos las entradas a usar | |
output_low(pin_B0); | |
while(1){ | |
// Se inicia una secuencia simple para poder verificar el funcionamiento | |
// del motor en conjunto con el pic. | |
output_low(pin_B0); | |
delay_ms(600); | |
output_high(pin_B1); | |
delay_ms(600); | |
output_low(pin_B1); | |
delay_ms(600); | |
output_high(pin_B0); | |
delay_ms(600); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment