You are on page 1of 1

ejemplo4.

mbas

14/11/2011 12:19:53

1: 2: 3: 4: 5:

6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: if Button(PORTC, 0, 10, 0) then 31: PORTD=255 32: end if 33: 34: if Button(PORTC, 1, 10, 0) then 35: PORTD=0 36: end if 37: wend 38: end.

program ejemplo4 ' * ' * Nombre ' Ejemplo 4 ' En este ejemplo utilizamos el puerto C como ingresos mediante pulsantes, la funci n Button. . ' * Autor: ' Ing. Pablo Rodas Msc -UETS' * Fecha: ' 14/11/2011: ' ' * Descripcion ' Manejo de vectores y de la funcion SYMBOL ' ' * Configuracion ' MCU: P16F887 ' Archivo Simulacion PROTEUS: Entrenador ' Oscillador: HS, 4.0000 MHz ' ' * NOTAS ' Declarations section sub procedure setup TRISC=255 TRISD=0 end sub main: ' Main program setup while true

1/1

mikroBasic Pro for PIC by mikroElektronika

You might also like