The present invention relates to an encoder capable of detecting an absolute value of an angle of rotation or the like of a target to be measured by a simple configuration with high accuracy. In the encoder, a photodetecting region of a photodetecting device and regions to be detected arranged on a scale plate satisfy a relational expression of W/2DW provided that a width of a photodetecting region is defined as W and arrangement pitches of the regions to be detected alternately arranged on two lines are defined as D. In this relationship, at least one of two regions to be detected adjacent to each other is always at a position overlapping the photodetecting region. The regions to be detected are different from each other in alignment of light and dark patterns along a second direction perpendicular to a first direction in which the two lines extend, so that the region to be detected that overlaps the photodetecting region can be identified based on light intensity profile data along the second direction. Furthermore, a position in the first direction of the identified region to be detected, based on light intensity profile data along the first direction, can be identified.
展开▼