Hi,
I am inexperienced still in picbasic but I try
Reading her user guide, and studying examples of code

I noticed in this post the code from aratti, It is exactly what I need (thank you very much aratti)
I used him as a basis, and I made changes so that him I adapt in my work

Here I would want your help, so that I use also port C from the 16F876, so that I increase the inputs (push button) circuit in 16

Thank you in advance
regards

Here it is the code and the circuit, that works perfect
Code:
DEFINE OSC 10
DEFINE SHIFT_PAUSEUS 100


TRISA = %00000000
TRISB = %11111111 
TRISC = %00000000
ADCON1 = 7
'************************************        
alarm var BYTE
Flag   var BYTE
bleg   var word
B0      var word
'************************************
Symbol data_pin=PORTA.0
Symbol clock=PORTA.1
Symbol strb=PORTA.2
Symbol oe=PORTA.3
'************************************
alarm=0
Flag = 0
B0 = 0
bleg= 900
portC = %00000000

'************************************


start:

oe= 0:pause bleg

B0 = PortB & %11111111
Alarm = (0 + B0) * 1
If Alarm <> Flag then gosub Print
oe= 1:pause bleg
goto start      

'************************************
Print:

ShiftOut data_pin,clock,1,[alarm]                              
strb = 1  : PAUSEUS 100 :  STRB = 0
Flag = Alarm
return

end
Name:  alarm-sch.png
Views: 1542
Size:  10.7 KB