Skip to content

Instantly share code, notes, and snippets.

Created August 15, 2014 18:09
Show Gist options
  • Save anonymous/7856e9621ea8306fe7dd to your computer and use it in GitHub Desktop.
Save anonymous/7856e9621ea8306fe7dd to your computer and use it in GitHub Desktop.
Device 16F877A
XTAL 20 'Cristal de 20Mhz
ALL_DIGITAL true 'Todos los puertos Digitales
'TRISA=%00000000
TRISB=%00000111 'Configuracion del Puerto A
pump:
If PORTB=%00000110 Or PORTB=%00000010 Then
PORTB=%00001000
DelayMS 1000
Else
DelayMS 2000
PORTB.3=0
EndIf
GoTo pump
End
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment