Hi, leonel ...

Don't shout at me but I did something like that with a resettable 555 and some CD4000 logic ... it was in one of my prior lives.

Said honestly, the 16F57 is not really the best Choice here ...

Alain