Está en la página 1de 1

Device=16F877A

Xtal 20

*************************************************************************
*
Declare LCD_DTPin PORTD.4
Declare LCD_ENPin PORTD.1
Declare LCD_RSPin PORTD.0
Declare LCD_Lines 2
Declare LCD_Type 0
Declare LCD_Interface 4
*************************************************************************
**************
Cls
Declare Adin_Res 8
Declare Adin_Tad FRC
Declare Adin_Stime 50
TRISA=%111111
Dim VALOR As Byte
Print At 1,1,"VALOR:"

BUCLE:
VALOR=ADIn 0
DelayMS 15
Print At 1,8,Dec VALOR," "
If VALOR>100 Then
PORTC.7=0
Else
PORTC.7=1
EndIf
DelayMS 100
GoTo BUCLE

También podría gustarte