X1 R2 10k CRYSTAL U1 16 15 R1 4 RA7/OSC1/CLKIN RA6/OSC2/CLKOUT RA5/MCLR 10k RA0/AN0 RA1/AN1 RA2/AN2/VREF RA3/AN3/CMP1 RA4/T0CKI/CMP2 RB0/INT RB1/RX/DT RB2/TX/CK RB3/CCP1 RB4 RB5 RB6/T1OSO/T1CKI RB7/T1OSI PIC16F628A 17 18 1 2 3 6 7 8 9 10 11 12 13 D8 D7 D6 D5 LED-BIGY LED-BIGY LED-BIGY LED-BIGY define osc 4 trisa=%11111111 trisb=%00000000 contar var byte cmcon=7 inicio: contar=contar+1 D4 D3 D2 LED-BIGY LED-BIGY LED-BIGY D1 LED-BIGY if porta.0=0 then portb=contar pause 1000 goto inicio else portb=255 pause 200 endif