Skip to content

Instantly share code, notes, and snippets.

@andersonsp
Forked from anonymous/pump.bas
Last active August 29, 2015 14:05
Show Gist options
  • Save andersonsp/de4bad8a23093aaad469 to your computer and use it in GitHub Desktop.
Save andersonsp/de4bad8a23093aaad469 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
Dim a As Byte
pump:
a = PORTB & %00000111
If a = %00000110 Or a = %00000010 Then
PORTB.3=1
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