Yes it can be connected to usb port. Leds are used for signalization.
The circuit is Ok !
But I can't say you what do exactly this hole circuit since the response depend on the program to be fashed in the µc.
There is also a problem with the way the oscillator is connected. The 20mhz crystal and caps to ground should have one side of the circuit connected to Pic pin 13 and the other side connected to Pic pin 14 and Vdd pins 11 and 13 should be connected to your +5v supply. Pic pin 1 (mclr) should only be connected to the reset button and the 4.7k resistor.
Like picengineer stated, the manner in which this circuit would work is entirely controlled by the program loaded into the PIC's memory.
master_picengineer and BobK ..thank you for your reply
in the figure ..the alarm circuit is connected to pin 3 (RA1)...but it is an A/D channel in pic 18f4550..right?? is it allowed to connect an alarm circuit to A/D???
one other question ..if I want to insert an analog signal to this pic..can I directly connect it to an A/D converter for sampling and digitizing?? or it should be entered to some port then be moved to A/D???