High sensitivity fully digital photodetector