A two-color CCD survey of the North Celestial Cap: I. The method